IPoolOperations.EnableAutoScaleWithHttpMessagesAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Enables automatic scaling for a Pool.
public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationHeaderResponse<Microsoft.Azure.Batch.Protocol.Models.PoolEnableAutoScaleHeaders>> EnableAutoScaleWithHttpMessagesAsync (string poolId, Microsoft.Azure.Batch.Protocol.Models.PoolEnableAutoScaleParameter poolEnableAutoScaleParameter, Microsoft.Azure.Batch.Protocol.Models.PoolEnableAutoScaleOptions poolEnableAutoScaleOptions = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member EnableAutoScaleWithHttpMessagesAsync : string * Microsoft.Azure.Batch.Protocol.Models.PoolEnableAutoScaleParameter * Microsoft.Azure.Batch.Protocol.Models.PoolEnableAutoScaleOptions * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationHeaderResponse<Microsoft.Azure.Batch.Protocol.Models.PoolEnableAutoScaleHeaders>>
Public Function EnableAutoScaleWithHttpMessagesAsync (poolId As String, poolEnableAutoScaleParameter As PoolEnableAutoScaleParameter, Optional poolEnableAutoScaleOptions As PoolEnableAutoScaleOptions = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationHeaderResponse(Of PoolEnableAutoScaleHeaders))
Parameters
- 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
- 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 a required parameter is null
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
Azure SDK for .NET