BatchClient.ResizePool Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Changes the number of Compute Nodes that are assigned to a Pool.
public virtual Azure.Compute.Batch.ResizePoolOperation ResizePool(string poolId, Azure.Compute.Batch.BatchPoolResizeOptions resizeOptions, TimeSpan? timeOutInSeconds = default, DateTimeOffset? ocpDate = default, Azure.RequestConditions requestConditions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ResizePool : string * Azure.Compute.Batch.BatchPoolResizeOptions * Nullable<TimeSpan> * Nullable<DateTimeOffset> * Azure.RequestConditions * System.Threading.CancellationToken -> Azure.Compute.Batch.ResizePoolOperation
override this.ResizePool : string * Azure.Compute.Batch.BatchPoolResizeOptions * Nullable<TimeSpan> * Nullable<DateTimeOffset> * Azure.RequestConditions * System.Threading.CancellationToken -> Azure.Compute.Batch.ResizePoolOperation
Public Overridable Function ResizePool (poolId As String, resizeOptions As BatchPoolResizeOptions, Optional timeOutInSeconds As Nullable(Of TimeSpan) = Nothing, Optional ocpDate As Nullable(Of DateTimeOffset) = Nothing, Optional requestConditions As RequestConditions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ResizePoolOperation
Parameters
- poolId
- String
The ID of the Pool to get.
- resizeOptions
- BatchPoolResizeOptions
The options to use for resizing the pool.
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.".
- ocpDate
- Nullable<DateTimeOffset>
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly.
- requestConditions
- RequestConditions
The content to send as the request conditions of the request.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
poolId
or resizeOptions
is null.
poolId
is an empty string, and was expected to be non-empty.
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. <returns> The ResizePoolOperation object to allow for polling of operation status. </returns>