CloudPool.ResizeAsync Method (Int32, Nullable<TimeSpan>, Nullable<ComputeNodeDeallocationOption>, IEnumerable<BatchClientBehavior>)
Resizes this pool.
Namespace: Microsoft.Azure.Batch
Assembly: Microsoft.Azure.Batch (in Microsoft.Azure.Batch.dll)
Syntax
public Task ResizeAsync(
int targetDedicated,
Nullable<TimeSpan> resizeTimeout = null,
Nullable<ComputeNodeDeallocationOption> deallocationOption = null,
IEnumerable<BatchClientBehavior> additionalBehaviors = null
)
public:
Task^ ResizeAsync(
int targetDedicated,
Nullable<TimeSpan> resizeTimeout = null,
Nullable<ComputeNodeDeallocationOption> deallocationOption = null,
IEnumerable<BatchClientBehavior^>^ additionalBehaviors = null
)
member ResizeAsync :
targetDedicated:int *
resizeTimeout:Nullable<TimeSpan> = null *
deallocationOption:Nullable<ComputeNodeDeallocationOption> = null *
additionalBehaviors:IEnumerable<BatchClientBehavior> = null -> Task
Public Function ResizeAsync (
targetDedicated As Integer,
resizeTimeout As Nullable(Of TimeSpan),
deallocationOption As Nullable(Of ComputeNodeDeallocationOption),
additionalBehaviors As IEnumerable(Of BatchClientBehavior)
) As Task
Parameters
targetDedicated
Type: System.Int32The desired number of compute nodes in the pool.
resizeTimeout
Type: System.Nullable<TimeSpan>The timeout for allocation of compute nodes to the pool or removal of compute nodes from the pool. If the pool has not reached the target size after this time, the resize is stopped. The default is 10 minutes.
deallocationOption
Type: System.Nullable<ComputeNodeDeallocationOption>Specifies when nodes may be removed from the pool, if the pool size is decreasing. The default is Requeue.
additionalBehaviors
Type: System.Collections.Generic.IEnumerable<BatchClientBehavior>A collection of BatchClientBehavior instances that are applied to the Batch service request after the CustomBehaviors.
Return Value
Type: System.Threading.Tasks.Task
A Task that represents the asynchronous operation.
Remarks
The resize operation requests that the pool be resized. The request puts the pool in the Resizing allocation state. The Batch service will perform the actual resize without any further client action, and set the allocation state to Steady once complete.
You can only resize a pool when its AllocationState is Steady. You cannot resize pools which are configured for automatic scaling (that is, the AutoScaleEnabled property of the pool is true). If you decrease the pool size, the Batch service chooses which nodes to remove. To remove specific nodes, call RemoveFromPoolAsync.
The resize operation runs asynchronously.
See Also
CloudPool Class
Microsoft.Azure.Batch Namespace
Return to top