Skip to main content

pool

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

Overview

Namepool
TypeResource
Idazure.batch.pool

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
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.
applicationPackagesarrayThe list of application packages to be installed on each compute node in the pool.
autoScaleRunobjectThe results and errors from the last execution of the autoscale formula.
creationTimestring (date-time)The creation time of the pool.
currentDedicatedNodesintegerThe number of dedicated compute nodes currently in the pool.
currentLowPriorityNodesintegerThe number of Spot/low-priority compute nodes currently in the pool.
deploymentConfigurationobjectThis property describes the virtual machines that the pool nodes will be deployed on.
displayNamestringThe display name for the pool.
etagstringThe ETag of the resource, used for concurrency statements.
identityobjectThe type of identity used for the Batch Pool.
interNodeCommunicationstringWhether the pool permits direct communication between nodes. Known values are: "Enabled" and "Disabled". (Enabled, Disabled)
lastModifiedstring (date-time)The last modified time of the pool.
metadataarrayA list of name-value pairs associated with the pool as metadata.
mountConfigurationarrayA list of file systems to mount on each node in the pool.
networkConfigurationobjectThe network configuration for the pool.
provisioningStatestringThe current state of the pool. Known values are: "Succeeded" and "Deleting". (Succeeded, Deleting)
provisioningStateTransitionTimestring (date-time)The time at which the pool entered its current state.
resizeOperationStatusobjectContains details about the current or last completed resize operation.
scaleSettingsobjectSettings which configure the number of nodes in the pool.
startTaskobjectA task specified to run on each compute node as it joins the pool.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectThe tags of the resource.
taskSchedulingPolicyobjectHow tasks are distributed across compute nodes in a pool.
taskSlotsPerNodeintegerThe number of task slots that can be used to run concurrent tasks on a single compute node in the pool.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
upgradePolicyobjectThe upgrade policy for the pool.
userAccountsarrayThe list of user accounts to be created on each node in the pool.
vmSizestringThe size of virtual machines in the pool. All VMs in a pool are the same size.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, account_name, pool_name, subscription_idGets information about the specified pool.
list_by_batch_accountselectresource_group_name, account_name, subscription_idmaxresults, $select, $filterLists all of the pools in the specified account.
createinsertresource_group_name, account_name, pool_name, subscription_idCreates a new pool inside the specified account.
updateupdateresource_group_name, account_name, pool_name, subscription_idUpdates the properties of an existing pool.
deletedeleteresource_group_name, account_name, pool_name, subscription_idDeletes the specified pool.
disable_auto_scaleexecresource_group_name, account_name, pool_name, subscription_idDisables automatic scaling for a pool.
stop_resizeexecresource_group_name, account_name, pool_name, subscription_idStops an ongoing resize operation on the pool. 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.

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
account_namestringA name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/ _. Required.
pool_namestringThe pool name. This must be unique within the account. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
$filterstringOData filter expression. Valid properties for filtering are: name properties/allocationState properties/allocationStateTransitionTime properties/creationTime properties/provisioningState properties/provisioningStateTransitionTime properties/lastModified properties/vmSize properties/interNodeCommunication properties/scaleSettings/autoScale properties/scaleSettings/fixedScale. Default value is None.
$selectstringComma separated list of properties that should be returned. e.g. "properties/provisioningState". Only top level properties under properties/ are valid for selection. Default value is None.
maxresultsintegerThe maximum number of items to return in the response. Default value is None.

SELECT examples

Gets information about the specified pool.

SELECT
id,
name,
allocationState,
allocationStateTransitionTime,
applicationPackages,
autoScaleRun,
creationTime,
currentDedicatedNodes,
currentLowPriorityNodes,
deploymentConfiguration,
displayName,
etag,
identity,
interNodeCommunication,
lastModified,
metadata,
mountConfiguration,
networkConfiguration,
provisioningState,
provisioningStateTransitionTime,
resizeOperationStatus,
scaleSettings,
startTask,
systemData,
tags,
taskSchedulingPolicy,
taskSlotsPerNode,
type,
upgradePolicy,
userAccounts,
vmSize
FROM azure.batch.pool
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND pool_name = '{{ pool_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates a new pool inside the specified account.

INSERT INTO azure.batch.pool (
properties,
identity,
tags,
resource_group_name,
account_name,
pool_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ identity }}',
'{{ tags }}',
'{{ resource_group_name }}',
'{{ account_name }}',
'{{ pool_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
identity,
properties,
systemData,
tags,
type
;

UPDATE examples

Updates the properties of an existing pool.

UPDATE azure.batch.pool
SET
properties = '{{ properties }}',
identity = '{{ identity }}',
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND pool_name = '{{ pool_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
identity,
properties,
systemData,
tags,
type;

DELETE examples

Deletes the specified pool.

DELETE FROM azure.batch.pool
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND pool_name = '{{ pool_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Disables automatic scaling for a pool.

EXEC azure.batch.pool.disable_auto_scale 
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@pool_name='{{ pool_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;