Pools

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

Changed on

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.

post/pools/{poolId}/evaluateautoscale

Request

  • Base URL
    {endpoint}
  • Auth
    OAuth 2
    Implicithttps://login.microsoftonline.com/common/oauth2/v2.0/authorize
    Scopeshttps://batch.core.windows.net//.default

Path parameters

poolIdstring required

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

Query parameters

api-versionstring required

The API version to use for this operation.

timeOutinteger

The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.".

Headers

client-request-idstring

The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0.

return-client-request-idboolean

Whether the server should return the client-request-id in the response.

ocp-datestring date-time-rfc7231

The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly.

Request body

autoScaleFormulastring required

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://learn.microsoft.com/azure/batch/batch-automatic-scaling).

Response

The request has succeeded.

timestampstring date-time required

The time at which the autoscale formula was last evaluated.

resultsstring

The final values of all variables used in the evaluation of the autoscale formula. Each variable value is returned in the form $variable=value, and variables are separated by semicolons.

Changes

    • warning

      deleted the query request parameter timeout

    • info

      api operation id Pool_EvaluateAutoScale removed and replaced with Pools_EvaluatePoolAutoScale

    • info

      added the new optional query request parameter timeOut