Condividi tramite


IPoolOperations.EvaluateAutoScaleWithHttpMessagesAsync Method

Definition

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

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Batch.Protocol.Models.AutoScaleRun,Microsoft.Azure.Batch.Protocol.Models.PoolEvaluateAutoScaleHeaders>> EvaluateAutoScaleWithHttpMessagesAsync (string poolId, string autoScaleFormula, Microsoft.Azure.Batch.Protocol.Models.PoolEvaluateAutoScaleOptions poolEvaluateAutoScaleOptions = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member EvaluateAutoScaleWithHttpMessagesAsync : string * string * Microsoft.Azure.Batch.Protocol.Models.PoolEvaluateAutoScaleOptions * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Batch.Protocol.Models.AutoScaleRun, Microsoft.Azure.Batch.Protocol.Models.PoolEvaluateAutoScaleHeaders>>
Public Function EvaluateAutoScaleWithHttpMessagesAsync (poolId As String, autoScaleFormula As String, Optional poolEvaluateAutoScaleOptions As PoolEvaluateAutoScaleOptions = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationResponse(Of AutoScaleRun, PoolEvaluateAutoScaleHeaders))

Parameters

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/documentation/articles/batch-automatic-scaling).

poolEvaluateAutoScaleOptions
PoolEvaluateAutoScaleOptions

Additional parameters for the operation

customHeaders
Dictionary<String,List<String>>

The headers that will be added to request.

cancellationToken
CancellationToken

The cancellation token.

Returns

Exceptions

Thrown when the operation returned an invalid status code

Thrown when unable to deserialize the response

Thrown when a required parameter is null

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