Skip to main content

pools

Creates, updates, deletes, gets or lists a pools resource.

Overview

Namepools
TypeResource
Idazure.batch_dataplane.pools

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringA string that uniquely identifies the Pool within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). Required.
allocationStatestringWhether the Pool is resizing. Known values are: "steady", "resizing", and "stopping". (steady, resizing, stopping)
allocationStateTransitionTimestring (date-time)The time at which the Pool entered its current allocation state.
applicationPackageReferencesarrayThe list of Packages to be installed on each Compute Node in the Pool. Changes to Package references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Package references on any given Pool.
autoScaleEvaluationIntervalstringThe time interval at which to automatically adjust the Pool size according to the autoscale formula. This property is set only if the Pool automatically scales, i.e. enableAutoScale is true. The time duration is specified in ISO 8601 format.
autoScaleFormulastringA formula for the desired number of Compute Nodes in the Pool. This property is set only if the Pool automatically scales, i.e. enableAutoScale is true.
autoScaleRunobjectThe results and errors from the last execution of the autoscale formula. This property is set only if the Pool automatically scales, i.e. enableAutoScale is true.
creationTimestring (date-time)The creation time of the Pool. Required.
currentDedicatedNodesintegerThe number of dedicated Compute Nodes currently in the Pool. Required.
currentLowPriorityNodesintegerThe number of Spot/Low-priority Compute Nodes currently in the Pool. Spot/Low-priority Compute Nodes which have been preempted are included in this count. Required.
displayNamestringThe display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
eTagstringThe ETag of the Pool. This is an opaque string. You can use it to detect whether the Pool has changed between requests. In particular, you can be pass the ETag when updating a Pool to specify that your changes should take effect only if nobody else has modified the Pool in the meantime. Required.
enableAutoScalebooleanWhether the Pool size should automatically adjust over time. If false, at least one of targetDedicatedNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula property is required and the Pool automatically resizes according to the formula. The default value is false.
enableInterNodeCommunicationbooleanWhether the Pool permits direct communication between Compute Nodes. Enabling inter-node communication limits the maximum size of the Pool due to deployment restrictions on the Compute Nodes of the Pool. This may result in the Pool not reaching its desired size. The default value is false.
identityobjectThe identity of the Batch pool, if configured. The list of user identities associated with the Batch pool. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
lastModifiedstring (date-time)The last modified time of the Pool. This is the last time at which the Pool level data, such as the targetDedicatedNodes or enableAutoscale settings, changed. It does not factor in node-level changes such as a Compute Node changing state. Required.
metadataarrayA list of name-value pairs associated with the Pool as metadata.
mountConfigurationarrayMount storage using specified file system for the entire lifetime of the pool. Mount the storage using Azure fileshare, NFS, CIFS or Blobfuse based file system.
networkConfigurationobjectThe network configuration for the Pool.
resizeErrorsarrayA list of errors encountered while performing the last resize on the Pool. This property is set only if one or more errors occurred during the last Pool resize, and only when the Pool allocationState is Steady.
resizeTimeoutstringThe timeout for allocation of Compute Nodes to the Pool. This is the timeout for the most recent resize operation. (The initial sizing when the Pool is created counts as a resize.) The default value is 15 minutes. The time duration is specified in ISO 8601 format.
startTaskobjectA Task specified to run on each Compute Node as it joins the Pool.
statestringThe current state of the Pool. Required. Known values are: "active" and "deleting". (active, deleting)
stateTransitionTimestring (date-time)The time at which the Pool entered its current state. Required.
statsobjectUtilization and resource usage statistics for the entire lifetime of the Pool. This property is populated only if the BatchPool was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes.
targetDedicatedNodesintegerThe desired number of dedicated Compute Nodes in the Pool.
targetLowPriorityNodesintegerThe desired number of Spot/Low-priority Compute Nodes in the Pool.
taskSchedulingPolicyobjectHow Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread.
taskSlotsPerNodeintegerThe number of task slots that can be used to run concurrent tasks on a single compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256.
upgradePolicyobjectThe upgrade policy for the Pool. Describes an upgrade policy - automatic, manual, or rolling.
urlstringThe URL of the Pool. Required.
userAccountsarrayThe list of user Accounts to be created on each Compute Node in the Pool.
virtualMachineConfigurationobjectThe virtual machine configuration for the Pool. This property must be specified.
vmSizestringThe size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes _). Required.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_poolselectpool_id, endpointtimeOut, ocp-date, If-Modified-Since, If-Unmodified-Since, $select, $expandGets information about the specified Pool.
list_poolsselectendpointtimeOut, ocp-date, maxresults, $filter, $select, $expandLists all of the Pools in the specified Account. Lists all of the Pools in the specified Account.
create_poolinsertendpoint, id, vmSizetimeOut, ocp-dateCreates a Pool to the specified Account. 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.
update_poolupdatepool_id, endpointtimeOut, ocp-date, If-Modified-Since, If-Unmodified-SinceUpdates the properties of the specified Pool. This only replaces the Pool properties specified in the request. For example, if the Pool has a StartTask associated with it, and a request does not specify a StartTask element, then the Pool keeps the existing StartTask.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
endpointstringThe service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: )
pool_idstringThe ID of the Pool to get. Required.
$expandarrayAn OData $expand clause. Default value is None.
$filterstringAn OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-pools _. Default value is None.
$selectarrayAn OData $select clause. Default value is None.
If-Modified-SincestringA timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None.
If-Unmodified-SincestringA timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None.
maxresultsintegerThe maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None.
ocp-datestringThe 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. Default value is None.
timeOutintegerThe 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.". Default value is None.

SELECT examples

Gets information about the specified Pool.

SELECT
id,
allocationState,
allocationStateTransitionTime,
applicationPackageReferences,
autoScaleEvaluationInterval,
autoScaleFormula,
autoScaleRun,
creationTime,
currentDedicatedNodes,
currentLowPriorityNodes,
displayName,
eTag,
enableAutoScale,
enableInterNodeCommunication,
identity,
lastModified,
metadata,
mountConfiguration,
networkConfiguration,
resizeErrors,
resizeTimeout,
startTask,
state,
stateTransitionTime,
stats,
targetDedicatedNodes,
targetLowPriorityNodes,
taskSchedulingPolicy,
taskSlotsPerNode,
upgradePolicy,
url,
userAccounts,
virtualMachineConfiguration,
vmSize
FROM azure.batch_dataplane.pools
WHERE pool_id = '{{ pool_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND timeOut = '{{ timeOut }}'
AND ocp-date = '{{ ocp-date }}'
AND If-Modified-Since = '{{ If-Modified-Since }}'
AND If-Unmodified-Since = '{{ If-Unmodified-Since }}'
AND $select = '{{ $select }}'
AND $expand = '{{ $expand }}'
;

INSERT examples

Creates a Pool to the specified Account. 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.

INSERT INTO azure.batch_dataplane.pools (
id,
displayName,
vmSize,
virtualMachineConfiguration,
resizeTimeout,
targetDedicatedNodes,
targetLowPriorityNodes,
enableAutoScale,
autoScaleFormula,
autoScaleEvaluationInterval,
enableInterNodeCommunication,
networkConfiguration,
startTask,
applicationPackageReferences,
taskSlotsPerNode,
taskSchedulingPolicy,
userAccounts,
metadata,
mountConfiguration,
upgradePolicy,
endpoint,
timeOut,
ocp-date
)
SELECT
'{{ id }}' /* required */,
'{{ displayName }}',
'{{ vmSize }}' /* required */,
'{{ virtualMachineConfiguration }}',
'{{ resizeTimeout }}',
{{ targetDedicatedNodes }},
{{ targetLowPriorityNodes }},
{{ enableAutoScale }},
'{{ autoScaleFormula }}',
'{{ autoScaleEvaluationInterval }}',
{{ enableInterNodeCommunication }},
'{{ networkConfiguration }}',
'{{ startTask }}',
'{{ applicationPackageReferences }}',
{{ taskSlotsPerNode }},
'{{ taskSchedulingPolicy }}',
'{{ userAccounts }}',
'{{ metadata }}',
'{{ mountConfiguration }}',
'{{ upgradePolicy }}',
'{{ endpoint }}',
'{{ timeOut }}',
'{{ ocp-date }}'
;

UPDATE examples

Updates the properties of the specified Pool. This only replaces the Pool properties specified in the request. For example, if the Pool has a StartTask associated with it, and a request does not specify a StartTask element, then the Pool keeps the existing StartTask.

UPDATE azure.batch_dataplane.pools
SET
displayName = '{{ displayName }}',
vmSize = '{{ vmSize }}',
enableInterNodeCommunication = {{ enableInterNodeCommunication }},
startTask = '{{ startTask }}',
applicationPackageReferences = '{{ applicationPackageReferences }}',
metadata = '{{ metadata }}',
virtualMachineConfiguration = '{{ virtualMachineConfiguration }}',
taskSlotsPerNode = {{ taskSlotsPerNode }},
taskSchedulingPolicy = '{{ taskSchedulingPolicy }}',
networkConfiguration = '{{ networkConfiguration }}',
userAccounts = '{{ userAccounts }}',
mountConfiguration = '{{ mountConfiguration }}',
upgradePolicy = '{{ upgradePolicy }}'
WHERE
pool_id = '{{ pool_id }}' --required
AND endpoint = '{{ endpoint }}' --required
AND timeOut = '{{ timeOut}}'
AND ocp-date = '{{ ocp-date}}'
AND If-Modified-Since = '{{ If-Modified-Since}}'
AND If-Unmodified-Since = '{{ If-Unmodified-Since}}';