Share via


PoolOperationsExtensions.Resize Method

Definition

Changes the number of Compute Nodes that are assigned to a Pool.

public static Microsoft.Azure.Batch.Protocol.Models.PoolResizeHeaders Resize (this Microsoft.Azure.Batch.Protocol.IPoolOperations operations, string poolId, Microsoft.Azure.Batch.Protocol.Models.PoolResizeParameter poolResizeParameter, Microsoft.Azure.Batch.Protocol.Models.PoolResizeOptions poolResizeOptions = default);
static member Resize : Microsoft.Azure.Batch.Protocol.IPoolOperations * string * Microsoft.Azure.Batch.Protocol.Models.PoolResizeParameter * Microsoft.Azure.Batch.Protocol.Models.PoolResizeOptions -> Microsoft.Azure.Batch.Protocol.Models.PoolResizeHeaders
<Extension()>
Public Function Resize (operations As IPoolOperations, poolId As String, poolResizeParameter As PoolResizeParameter, Optional poolResizeOptions As PoolResizeOptions = Nothing) As PoolResizeHeaders

Parameters

operations
IPoolOperations

The operations group for this extension method.

poolId
String

The ID of the Pool to resize.

poolResizeParameter
PoolResizeParameter

The parameters for the request.

poolResizeOptions
PoolResizeOptions

Additional parameters for the operation

Returns

Remarks

You can only resize a Pool when its allocation state is steady. If the Pool is already resizing, the request fails with status code 409. When you resize a Pool, the Pool's allocation state changes from steady to resizing. You cannot resize Pools which are configured for automatic scaling. If you try to do this, the Batch service returns an error 409. If you resize a Pool downwards, the Batch service chooses which Compute Nodes to remove. To remove specific Compute Nodes, use the Pool remove Compute Nodes API instead.

Applies to