Delen via


PoolOperationsExtensions.EnableAutoScaleAsync Method

Definition

Enables automatic scaling for a Pool.

public static System.Threading.Tasks.Task<Microsoft.Azure.Batch.Protocol.Models.PoolEnableAutoScaleHeaders> EnableAutoScaleAsync (this Microsoft.Azure.Batch.Protocol.IPoolOperations operations, string poolId, Microsoft.Azure.Batch.Protocol.Models.PoolEnableAutoScaleParameter poolEnableAutoScaleParameter, Microsoft.Azure.Batch.Protocol.Models.PoolEnableAutoScaleOptions poolEnableAutoScaleOptions = default, System.Threading.CancellationToken cancellationToken = default);
static member EnableAutoScaleAsync : Microsoft.Azure.Batch.Protocol.IPoolOperations * string * Microsoft.Azure.Batch.Protocol.Models.PoolEnableAutoScaleParameter * Microsoft.Azure.Batch.Protocol.Models.PoolEnableAutoScaleOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Batch.Protocol.Models.PoolEnableAutoScaleHeaders>
<Extension()>
Public Function EnableAutoScaleAsync (operations As IPoolOperations, poolId As String, poolEnableAutoScaleParameter As PoolEnableAutoScaleParameter, Optional poolEnableAutoScaleOptions As PoolEnableAutoScaleOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of PoolEnableAutoScaleHeaders)

Parameters

operations
IPoolOperations

The operations group for this extension method.

poolId
String

The ID of the Pool on which to enable automatic scaling.

poolEnableAutoScaleParameter
PoolEnableAutoScaleParameter

The parameters for the request.

poolEnableAutoScaleOptions
PoolEnableAutoScaleOptions

Additional parameters for the operation

cancellationToken
CancellationToken

The cancellation token.

Returns

Remarks

You cannot enable automatic scaling on a Pool if a resize operation is in progress on the Pool. If automatic scaling of the Pool is currently disabled, you must specify a valid autoscale formula as part of the request. If automatic scaling of the Pool is already enabled, you may specify a new autoscale formula and/or a new evaluation interval. You cannot call this API for the same Pool more than once every 30 seconds.

Applies to