Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Pool

Package version

Class representing a Pool.

Hierarchy

  • Pool

Index

Constructors

constructor

Methods

add

  • When naming pools, avoid including sensitive information such as user names or secret project names. This information may appear in telemetry logs accessible to Microsoft Support engineers.

    summary

    Adds a pool to the specified account.

    Parameters

    • pool: PoolAddParameter

      The pool to be added.

    • Optional options: Models.PoolAddOptionalParams

    Returns Promise<Models.PoolAddResponse>

    Promise<Models.PoolAddResponse>

  • Parameters

    • pool: PoolAddParameter

      The pool to be added.

    • callback: msRest.ServiceCallback<void>

      The callback

    Returns void

  • Parameters

    Returns void

deleteMethod

  • deleteMethod(poolId: string, options?: Models.PoolDeleteMethodOptionalParams): Promise<Models.PoolDeleteResponse>
  • deleteMethod(poolId: string, callback: msRest.ServiceCallback<void>): void
  • deleteMethod(poolId: string, options: PoolDeleteMethodOptionalParams, callback: msRest.ServiceCallback<void>): void
  • When you request that a pool be deleted, the following actions occur: the pool state is set to deleting; any ongoing resize operation on the pool are stopped; the Batch service starts resizing the pool to zero nodes; any tasks running on existing nodes are terminated and requeued (as if a resize pool operation had been requested with the default requeue option); finally, the pool is removed from the system. Because running tasks are requeued, the user can rerun these tasks by updating their job to target a different pool. The tasks can then run on the new pool. If you want to override the requeue behavior, then you should call resize pool explicitly to shrink the pool to zero size before deleting the pool. If you call an Update, Patch or Delete API on a pool in the deleting state, it will fail with HTTP status code 409 with error code PoolBeingDeleted.

    summary

    Deletes a pool from the specified account.

    Parameters

    • poolId: string

      The ID of the pool to delete.

    • Optional options: Models.PoolDeleteMethodOptionalParams

    Returns Promise<Models.PoolDeleteResponse>

    Promise<Models.PoolDeleteResponse>

  • Parameters

    • poolId: string

      The ID of the pool to delete.

    • callback: msRest.ServiceCallback<void>

      The callback

    Returns void

  • Parameters

    • poolId: string

      The ID of the pool to delete.

    • options: PoolDeleteMethodOptionalParams

      The optional parameters

    • callback: msRest.ServiceCallback<void>

      The callback

    Returns void

disableAutoScale

  • disableAutoScale(poolId: string, options?: Models.PoolDisableAutoScaleOptionalParams): Promise<Models.PoolDisableAutoScaleResponse>
  • disableAutoScale(poolId: string, callback: msRest.ServiceCallback<void>): void
  • disableAutoScale(poolId: string, options: PoolDisableAutoScaleOptionalParams, callback: msRest.ServiceCallback<void>): void
  • summary

    Disables automatic scaling for a pool.

    Parameters

    • poolId: string

      The ID of the pool on which to disable automatic scaling.

    • Optional options: Models.PoolDisableAutoScaleOptionalParams

    Returns Promise<Models.PoolDisableAutoScaleResponse>

    Promise<Models.PoolDisableAutoScaleResponse>

  • Parameters

    • poolId: string

      The ID of the pool on which to disable automatic scaling.

    • callback: msRest.ServiceCallback<void>

      The callback

    Returns void

  • Parameters

    • poolId: string

      The ID of the pool on which to disable automatic scaling.

    • options: PoolDisableAutoScaleOptionalParams

      The optional parameters

    • callback: msRest.ServiceCallback<void>

      The callback

    Returns void

enableAutoScale

  • 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.

    summary

    Enables automatic scaling for a pool.

    Parameters

    • poolId: string

      The ID of the pool on which to enable automatic scaling.

    • poolEnableAutoScaleParameter: PoolEnableAutoScaleParameter

      The parameters for the request.

    • Optional options: Models.PoolEnableAutoScaleOptionalParams

    Returns Promise<Models.PoolEnableAutoScaleResponse>

    Promise<Models.PoolEnableAutoScaleResponse>

  • Parameters

    • poolId: string

      The ID of the pool on which to enable automatic scaling.

    • poolEnableAutoScaleParameter: PoolEnableAutoScaleParameter

      The parameters for the request.

    • callback: msRest.ServiceCallback<void>

      The callback

    Returns void

  • Parameters

    Returns void

evaluateAutoScale

  • evaluateAutoScale(poolId: string, autoScaleFormula: string, options?: Models.PoolEvaluateAutoScaleOptionalParams): Promise<Models.PoolEvaluateAutoScaleResponse>
  • evaluateAutoScale(poolId: string, autoScaleFormula: string, callback: msRest.ServiceCallback<AutoScaleRun>): void
  • evaluateAutoScale(poolId: string, autoScaleFormula: string, options: PoolEvaluateAutoScaleOptionalParams, callback: msRest.ServiceCallback<AutoScaleRun>): void
  • 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.

    summary

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

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

    • Optional options: Models.PoolEvaluateAutoScaleOptionalParams

    Returns Promise<Models.PoolEvaluateAutoScaleResponse>

    Promise<Models.PoolEvaluateAutoScaleResponse>

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

    • callback: msRest.ServiceCallback<AutoScaleRun>

      The callback

    Returns void

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

    • options: PoolEvaluateAutoScaleOptionalParams

      The optional parameters

    • callback: msRest.ServiceCallback<AutoScaleRun>

      The callback

    Returns void

exists

  • exists(poolId: string, options?: Models.PoolExistsOptionalParams): Promise<Models.PoolExistsResponse>
  • exists(poolId: string, callback: msRest.ServiceCallback<boolean>): void
  • exists(poolId: string, options: PoolExistsOptionalParams, callback: msRest.ServiceCallback<boolean>): void
  • Gets basic properties of a pool.

    Parameters

    • poolId: string

      The ID of the pool to get.

    • Optional options: Models.PoolExistsOptionalParams

    Returns Promise<Models.PoolExistsResponse>

    Promise<Models.PoolExistsResponse>

  • Parameters

    • poolId: string

      The ID of the pool to get.

    • callback: msRest.ServiceCallback<boolean>

      The callback

    Returns void

  • Parameters

    • poolId: string

      The ID of the pool to get.

    • options: PoolExistsOptionalParams

      The optional parameters

    • callback: msRest.ServiceCallback<boolean>

      The callback

    Returns void

get

  • get(poolId: string, options?: Models.PoolGetOptionalParams): Promise<Models.PoolGetResponse>
  • get(poolId: string, callback: msRest.ServiceCallback<CloudPool>): void
  • get(poolId: string, options: PoolGetOptionalParams, callback: msRest.ServiceCallback<CloudPool>): void
  • Gets information about the specified pool.

    Parameters

    • poolId: string

      The ID of the pool to get.

    • Optional options: Models.PoolGetOptionalParams

    Returns Promise<Models.PoolGetResponse>

    Promise<Models.PoolGetResponse>

  • Parameters

    • poolId: string

      The ID of the pool to get.

    • callback: msRest.ServiceCallback<CloudPool>

      The callback

    Returns void

  • Parameters

    • poolId: string

      The ID of the pool to get.

    • options: PoolGetOptionalParams

      The optional parameters

    • callback: msRest.ServiceCallback<CloudPool>

      The callback

    Returns void

getAllLifetimeStatistics

  • getAllLifetimeStatistics(options?: Models.PoolGetAllLifetimeStatisticsOptionalParams): Promise<Models.PoolGetAllLifetimeStatisticsResponse>
  • getAllLifetimeStatistics(callback: msRest.ServiceCallback<PoolStatistics>): void
  • getAllLifetimeStatistics(options: PoolGetAllLifetimeStatisticsOptionalParams, callback: msRest.ServiceCallback<PoolStatistics>): void
  • Statistics are aggregated across all pools that have ever existed in the account, from account creation to the last update time of the statistics. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes.

    summary

    Gets lifetime summary statistics for all of the pools in the specified account.

    Parameters

    • Optional options: Models.PoolGetAllLifetimeStatisticsOptionalParams

    Returns Promise<Models.PoolGetAllLifetimeStatisticsResponse>

    Promise<Models.PoolGetAllLifetimeStatisticsResponse>

  • Parameters

    Returns void

  • Parameters

    Returns void

list

listNext

  • listNext(nextPageLink: string, options?: Models.PoolListNextOptionalParams): Promise<Models.PoolListResponse>
  • listNext(nextPageLink: string, callback: msRest.ServiceCallback<CloudPoolListResult>): void
  • listNext(nextPageLink: string, options: PoolListNextOptionalParams, callback: msRest.ServiceCallback<CloudPoolListResult>): void
  • summary

    Lists all of the pools in the specified account.

    Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • Optional options: Models.PoolListNextOptionalParams

    Returns Promise<Models.PoolListResponse>

    Promise<Models.PoolListResponse>

  • Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • callback: msRest.ServiceCallback<CloudPoolListResult>

      The callback

    Returns void

  • Parameters

    Returns void

listUsageMetrics

  • If you do not specify a $filter clause including a poolId, the response includes all pools that existed in the account in the time range of the returned aggregation intervals. If you do not specify a $filter clause including a startTime or endTime these filters default to the start and end times of the last aggregation interval currently available; that is, only the last aggregation interval is returned.

    summary

    Lists the usage metrics, aggregated by pool across individual time intervals, for the specified account.

    Parameters

    • Optional options: Models.PoolListUsageMetricsOptionalParams

    Returns Promise<Models.PoolListUsageMetricsResponse>

    Promise<Models.PoolListUsageMetricsResponse>

  • Parameters

    Returns void

  • Parameters

    Returns void

listUsageMetricsNext

  • If you do not specify a $filter clause including a poolId, the response includes all pools that existed in the account in the time range of the returned aggregation intervals. If you do not specify a $filter clause including a startTime or endTime these filters default to the start and end times of the last aggregation interval currently available; that is, only the last aggregation interval is returned.

    summary

    Lists the usage metrics, aggregated by pool across individual time intervals, for the specified account.

    Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • Optional options: Models.PoolListUsageMetricsNextOptionalParams

    Returns Promise<Models.PoolListUsageMetricsResponse>

    Promise<Models.PoolListUsageMetricsResponse>

  • Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • callback: msRest.ServiceCallback<PoolListUsageMetricsResult>

      The callback

    Returns void

  • Parameters

    Returns void

patch

  • patch(poolId: string, poolPatchParameter: PoolPatchParameter, options?: Models.PoolPatchOptionalParams): Promise<Models.PoolPatchResponse>
  • patch(poolId: string, poolPatchParameter: PoolPatchParameter, callback: msRest.ServiceCallback<void>): void
  • patch(poolId: string, poolPatchParameter: PoolPatchParameter, options: PoolPatchOptionalParams, callback: msRest.ServiceCallback<void>): void
  • This only replaces the pool properties specified in the request. For example, if the pool has a start task associated with it, and a request does not specify a start task element, then the pool keeps the existing start task.

    summary

    Updates the properties of the specified pool.

    Parameters

    • poolId: string

      The ID of the pool to update.

    • poolPatchParameter: PoolPatchParameter

      The parameters for the request.

    • Optional options: Models.PoolPatchOptionalParams

    Returns Promise<Models.PoolPatchResponse>

    Promise<Models.PoolPatchResponse>

  • Parameters

    • poolId: string

      The ID of the pool to update.

    • poolPatchParameter: PoolPatchParameter

      The parameters for the request.

    • callback: msRest.ServiceCallback<void>

      The callback

    Returns void

  • Parameters

    • poolId: string

      The ID of the pool to update.

    • poolPatchParameter: PoolPatchParameter

      The parameters for the request.

    • options: PoolPatchOptionalParams

      The optional parameters

    • callback: msRest.ServiceCallback<void>

      The callback

    Returns void

removeNodes

  • removeNodes(poolId: string, nodeRemoveParameter: NodeRemoveParameter, options?: Models.PoolRemoveNodesOptionalParams): Promise<Models.PoolRemoveNodesResponse>
  • removeNodes(poolId: string, nodeRemoveParameter: NodeRemoveParameter, callback: msRest.ServiceCallback<void>): void
  • removeNodes(poolId: string, nodeRemoveParameter: NodeRemoveParameter, options: PoolRemoveNodesOptionalParams, callback: msRest.ServiceCallback<void>): void
  • This operation can only run when the allocation state of the pool is steady. When this operation runs, the allocation state changes from steady to resizing.

    summary

    Removes compute nodes from the specified pool.

    Parameters

    • poolId: string

      The ID of the pool from which you want to remove nodes.

    • nodeRemoveParameter: NodeRemoveParameter

      The parameters for the request.

    • Optional options: Models.PoolRemoveNodesOptionalParams

    Returns Promise<Models.PoolRemoveNodesResponse>

    Promise<Models.PoolRemoveNodesResponse>

  • Parameters

    • poolId: string

      The ID of the pool from which you want to remove nodes.

    • nodeRemoveParameter: NodeRemoveParameter

      The parameters for the request.

    • callback: msRest.ServiceCallback<void>

      The callback

    Returns void

  • Parameters

    • poolId: string

      The ID of the pool from which you want to remove nodes.

    • nodeRemoveParameter: NodeRemoveParameter

      The parameters for the request.

    • options: PoolRemoveNodesOptionalParams

      The optional parameters

    • callback: msRest.ServiceCallback<void>

      The callback

    Returns void

resize

  • You can only resize a pool when its allocation state is steady. If the pool is already resizing, the request fails with status code 409. When you resize a pool, the pool's allocation state changes from steady to resizing. You cannot resize pools which are configured for automatic scaling. If you try to do this, the Batch service returns an error 409. If you resize a pool downwards, the Batch service chooses which nodes to remove. To remove specific nodes, use the pool remove nodes API instead.

    summary

    Changes the number of compute nodes that are assigned to a pool.

    Parameters

    • poolId: string

      The ID of the pool to resize.

    • poolResizeParameter: PoolResizeParameter

      The parameters for the request.

    • Optional options: Models.PoolResizeOptionalParams

    Returns Promise<Models.PoolResizeResponse>

    Promise<Models.PoolResizeResponse>

  • Parameters

    • poolId: string

      The ID of the pool to resize.

    • poolResizeParameter: PoolResizeParameter

      The parameters for the request.

    • callback: msRest.ServiceCallback<void>

      The callback

    Returns void

  • Parameters

    • poolId: string

      The ID of the pool to resize.

    • poolResizeParameter: PoolResizeParameter

      The parameters for the request.

    • options: PoolResizeOptionalParams

      The optional parameters

    • callback: msRest.ServiceCallback<void>

      The callback

    Returns void

stopResize

  • stopResize(poolId: string, options?: Models.PoolStopResizeOptionalParams): Promise<Models.PoolStopResizeResponse>
  • stopResize(poolId: string, callback: msRest.ServiceCallback<void>): void
  • stopResize(poolId: string, options: PoolStopResizeOptionalParams, callback: msRest.ServiceCallback<void>): void
  • This does not restore the pool to its previous state before the resize operation: it only stops any further changes being made, and the pool maintains its current state. After stopping, the pool stabilizes at the number of nodes it was at when the stop operation was done. During the stop operation, the pool allocation state changes first to stopping and then to steady. A resize operation need not be an explicit resize pool request; this API can also be used to halt the initial sizing of the pool when it is created.

    summary

    Stops an ongoing resize operation on the pool.

    Parameters

    • poolId: string

      The ID of the pool whose resizing you want to stop.

    • Optional options: Models.PoolStopResizeOptionalParams

    Returns Promise<Models.PoolStopResizeResponse>

    Promise<Models.PoolStopResizeResponse>

  • Parameters

    • poolId: string

      The ID of the pool whose resizing you want to stop.

    • callback: msRest.ServiceCallback<void>

      The callback

    Returns void

  • Parameters

    • poolId: string

      The ID of the pool whose resizing you want to stop.

    • options: PoolStopResizeOptionalParams

      The optional parameters

    • callback: msRest.ServiceCallback<void>

      The callback

    Returns void

updateProperties

  • This fully replaces all the updatable properties of the pool. For example, if the pool has a start task associated with it and if start task is not specified with this request, then the Batch service will remove the existing start task.

    summary

    Updates the properties of the specified pool.

    Parameters

    • poolId: string

      The ID of the pool to update.

    • poolUpdatePropertiesParameter: PoolUpdatePropertiesParameter

      The parameters for the request.

    • Optional options: Models.PoolUpdatePropertiesOptionalParams

    Returns Promise<Models.PoolUpdatePropertiesResponse>

    Promise<Models.PoolUpdatePropertiesResponse>

  • Parameters

    • poolId: string

      The ID of the pool to update.

    • poolUpdatePropertiesParameter: PoolUpdatePropertiesParameter

      The parameters for the request.

    • callback: msRest.ServiceCallback<void>

      The callback

    Returns void

  • Parameters

    Returns void

Generated using TypeDoc