PoolOperationsExtensions.EvaluateAutoScaleAsync(IPoolOperations, String, String, PoolEvaluateAutoScaleOptions, CancellationToken) Method

Definition

Gets the result of evaluating an automatic scaling formula on the pool.

public static System.Threading.Tasks.Task<Microsoft.Azure.Batch.Protocol.Models.AutoScaleRun> EvaluateAutoScaleAsync (this Microsoft.Azure.Batch.Protocol.IPoolOperations operations, string poolId, string autoScaleFormula, Microsoft.Azure.Batch.Protocol.Models.PoolEvaluateAutoScaleOptions poolEvaluateAutoScaleOptions = null, System.Threading.CancellationToken cancellationToken = null);
static member EvaluateAutoScaleAsync : Microsoft.Azure.Batch.Protocol.IPoolOperations * string * string * Microsoft.Azure.Batch.Protocol.Models.PoolEvaluateAutoScaleOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Batch.Protocol.Models.AutoScaleRun>

Parameters

operations
IPoolOperations

The operations group for this extension method.

poolId
String

The ID of the pool on which to evaluate the automatic scaling formula.

autoScaleFormula
String

The formula for the desired number of compute nodes in the pool. The formula is validated and its results calculated, but it is not applied to the pool. To apply the formula to the pool, 'Enable automatic scaling on a pool'. For more information about specifying this formula, see Automatically scale compute nodes in an Azure Batch pool (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling).

poolEvaluateAutoScaleOptions
PoolEvaluateAutoScaleOptions

Additional parameters for the operation

cancellationToken
CancellationToken

The cancellation token.

Returns

Task<AutoScaleRun>

Remarks

This API is primarily for validating an autoscale formula, as it simply

returns the result without applying the formula to the pool. The pool must

have auto scaling enabled in order to evaluate a formula.

Applies to