public virtual Response <AutoScaleRun> EvaluateAutoScale(string poolId, PoolEvaluateAutoScaleParameter poolEvaluateAutoScaleParameter, PoolEvaluateAutoScaleOptions poolEvaluateAutoScaleOptions, CancellationToken cancellationToken = default)
 {
     return(RestClient.EvaluateAutoScale(poolId, poolEvaluateAutoScaleParameter, poolEvaluateAutoScaleOptions, cancellationToken));
 }
 public virtual async Task <Response <AutoScaleRun> > EvaluateAutoScaleAsync(string poolId, PoolEvaluateAutoScaleParameter poolEvaluateAutoScaleParameter, PoolEvaluateAutoScaleOptions poolEvaluateAutoScaleOptions, CancellationToken cancellationToken = default)
 {
     return(await RestClient.EvaluateAutoScaleAsync(poolId, poolEvaluateAutoScaleParameter, poolEvaluateAutoScaleOptions, cancellationToken).ConfigureAwait(false));
 }
示例#3
0
 /// <summary>
 /// Gets the result of evaluating an automatic scaling formula on the Pool.
 /// </summary>
 /// <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.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolId'>
 /// The ID of the Pool on which to evaluate the automatic scaling formula.
 /// </param>
 /// <param name='autoScaleFormula'>
 /// 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).
 /// </param>
 /// <param name='poolEvaluateAutoScaleOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static AutoScaleRun EvaluateAutoScale(this IPoolOperations operations, string poolId, string autoScaleFormula, PoolEvaluateAutoScaleOptions poolEvaluateAutoScaleOptions = default(PoolEvaluateAutoScaleOptions))
 {
     return(operations.EvaluateAutoScaleAsync(poolId, autoScaleFormula, poolEvaluateAutoScaleOptions).GetAwaiter().GetResult());
 }
示例#4
0
 /// <summary>
 /// Gets the result of evaluating an automatic scaling formula on the Pool.
 /// </summary>
 /// <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.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolId'>
 /// The ID of the Pool on which to evaluate the automatic scaling formula.
 /// </param>
 /// <param name='autoScaleFormula'>
 /// 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).
 /// </param>
 /// <param name='poolEvaluateAutoScaleOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <AutoScaleRun> EvaluateAutoScaleAsync(this IPoolOperations operations, string poolId, string autoScaleFormula, PoolEvaluateAutoScaleOptions poolEvaluateAutoScaleOptions = default(PoolEvaluateAutoScaleOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.EvaluateAutoScaleWithHttpMessagesAsync(poolId, autoScaleFormula, poolEvaluateAutoScaleOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets the result of evaluating an automatic scaling formula on the pool.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolId'>
 /// The id of the pool on which to evaluate the automatic scaling formula.
 /// </param>
 /// <param name='autoScaleFormula'>
 /// A formula for the desired number of compute nodes in the pool.
 /// </param>
 /// <param name='poolEvaluateAutoScaleOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static AutoScaleRun EvaluateAutoScale(this IPoolOperations operations, string poolId, string autoScaleFormula, PoolEvaluateAutoScaleOptions poolEvaluateAutoScaleOptions = default(PoolEvaluateAutoScaleOptions))
 {
     return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IPoolOperations)s).EvaluateAutoScaleAsync(poolId, autoScaleFormula, poolEvaluateAutoScaleOptions), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }