共用方式為


CloudPool.EvaluateAutoScaleAsync Method

Definition

Gets the result of evaluating an automatic scaling formula on this pool. This is primarily for validating an autoscale formula, as it simply returns the result without applying the formula to the pool.

public System.Threading.Tasks.Task<Microsoft.Azure.Batch.AutoScaleRun> EvaluateAutoScaleAsync (string autoscaleFormula, System.Collections.Generic.IEnumerable<Microsoft.Azure.Batch.BatchClientBehavior> additionalBehaviors = default, System.Threading.CancellationToken cancellationToken = default);
member this.EvaluateAutoScaleAsync : string * seq<Microsoft.Azure.Batch.BatchClientBehavior> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Batch.AutoScaleRun>
Public Function EvaluateAutoScaleAsync (autoscaleFormula As String, Optional additionalBehaviors As IEnumerable(Of BatchClientBehavior) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AutoScaleRun)

Parameters

autoscaleFormula
String

The formula to be evaluated on the pool.

additionalBehaviors
IEnumerable<BatchClientBehavior>

A collection of BatchClientBehavior instances that are applied to the Batch service request after the CustomBehaviors.

cancellationToken
CancellationToken

A CancellationToken for controlling the lifetime of the asynchronous operation.

Returns

The result of evaluating the autoscaleFormula on this pool.

Remarks

The formula is validated and its results calculated, but is not applied to the pool. To apply the formula to the pool, use EnableAutoScaleAsync(String, Nullable<TimeSpan>, IEnumerable<BatchClientBehavior>, CancellationToken).

This method does not change any state of the pool, and does not affect the LastModified or ETag.

The evaluate operation runs asynchronously.

Applies to