pool
Creates, updates, deletes, gets or lists a pool resource.
Overview
| Name | pool |
| Type | Resource |
| Id | azure.batch.pool |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_batch_account
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
allocationState | string | Whether the pool is resizing. Known values are: "Steady", "Resizing", and "Stopping". (Steady, Resizing, Stopping) |
allocationStateTransitionTime | string (date-time) | The time at which the pool entered its current allocation state. |
applicationPackages | array | The list of application packages to be installed on each compute node in the pool. |
autoScaleRun | object | The results and errors from the last execution of the autoscale formula. |
creationTime | string (date-time) | The creation time of the pool. |
currentDedicatedNodes | integer | The number of dedicated compute nodes currently in the pool. |
currentLowPriorityNodes | integer | The number of Spot/low-priority compute nodes currently in the pool. |
deploymentConfiguration | object | This property describes the virtual machines that the pool nodes will be deployed on. |
displayName | string | The display name for the pool. |
etag | string | The ETag of the resource, used for concurrency statements. |
identity | object | The type of identity used for the Batch Pool. |
interNodeCommunication | string | Whether the pool permits direct communication between nodes. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
lastModified | string (date-time) | The last modified time of the pool. |
metadata | array | A list of name-value pairs associated with the pool as metadata. |
mountConfiguration | array | A list of file systems to mount on each node in the pool. |
networkConfiguration | object | The network configuration for the pool. |
provisioningState | string | The current state of the pool. Known values are: "Succeeded" and "Deleting". (Succeeded, Deleting) |
provisioningStateTransitionTime | string (date-time) | The time at which the pool entered its current state. |
resizeOperationStatus | object | Contains details about the current or last completed resize operation. |
scaleSettings | object | Settings which configure the number of nodes in the pool. |
startTask | object | A task specified to run on each compute node as it joins the pool. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | The tags of the resource. |
taskSchedulingPolicy | object | How tasks are distributed across compute nodes in a pool. |
taskSlotsPerNode | integer | The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
upgradePolicy | object | The upgrade policy for the pool. |
userAccounts | array | The list of user accounts to be created on each node in the pool. |
vmSize | string | The size of virtual machines in the pool. All VMs in a pool are the same size. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
allocationState | string | Whether the pool is resizing. Known values are: "Steady", "Resizing", and "Stopping". (Steady, Resizing, Stopping) |
allocationStateTransitionTime | string (date-time) | The time at which the pool entered its current allocation state. |
applicationPackages | array | The list of application packages to be installed on each compute node in the pool. |
autoScaleRun | object | The results and errors from the last execution of the autoscale formula. |
creationTime | string (date-time) | The creation time of the pool. |
currentDedicatedNodes | integer | The number of dedicated compute nodes currently in the pool. |
currentLowPriorityNodes | integer | The number of Spot/low-priority compute nodes currently in the pool. |
deploymentConfiguration | object | This property describes the virtual machines that the pool nodes will be deployed on. |
displayName | string | The display name for the pool. |
etag | string | The ETag of the resource, used for concurrency statements. |
identity | object | The type of identity used for the Batch Pool. |
interNodeCommunication | string | Whether the pool permits direct communication between nodes. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
lastModified | string (date-time) | The last modified time of the pool. |
metadata | array | A list of name-value pairs associated with the pool as metadata. |
mountConfiguration | array | A list of file systems to mount on each node in the pool. |
networkConfiguration | object | The network configuration for the pool. |
provisioningState | string | The current state of the pool. Known values are: "Succeeded" and "Deleting". (Succeeded, Deleting) |
provisioningStateTransitionTime | string (date-time) | The time at which the pool entered its current state. |
resizeOperationStatus | object | Contains details about the current or last completed resize operation. |
scaleSettings | object | Settings which configure the number of nodes in the pool. |
startTask | object | A task specified to run on each compute node as it joins the pool. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | The tags of the resource. |
taskSchedulingPolicy | object | How tasks are distributed across compute nodes in a pool. |
taskSlotsPerNode | integer | The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
upgradePolicy | object | The upgrade policy for the pool. |
userAccounts | array | The list of user accounts to be created on each node in the pool. |
vmSize | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, account_name, pool_name, subscription_id | Gets information about the specified pool. | |
list_by_batch_account | select | resource_group_name, account_name, subscription_id | maxresults, $select, $filter | Lists all of the pools in the specified account. |
create | insert | resource_group_name, account_name, pool_name, subscription_id | Creates a new pool inside the specified account. | |
update | update | resource_group_name, account_name, pool_name, subscription_id | Updates the properties of an existing pool. | |
delete | delete | resource_group_name, account_name, pool_name, subscription_id | Deletes the specified pool. | |
disable_auto_scale | exec | resource_group_name, account_name, pool_name, subscription_id | Disables automatic scaling for a pool. | |
stop_resize | exec | resource_group_name, account_name, pool_name, subscription_id | Stops 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.
| Name | Datatype | Description |
|---|---|---|
account_name | string | A 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_name | string | The pool name. This must be unique within the account. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
$filter | string | OData 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. |
$select | string | Comma 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. |
maxresults | integer | The maximum number of items to return in the response. Default value is None. |
SELECT examples
- get
- list_by_batch_account
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
;
Lists all of the pools in the specified account.
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 subscription_id = '{{ subscription_id }}' -- required
AND maxresults = '{{ maxresults }}'
AND $select = '{{ $select }}'
AND $filter = '{{ $filter }}'
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: pool
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the pool resource.
- name: account_name
value: "{{ account_name }}"
description: Required parameter for the pool resource.
- name: pool_name
value: "{{ pool_name }}"
description: Required parameter for the pool resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the pool resource.
- name: properties
description: |
The properties associated with the pool.
value:
displayName: "{{ displayName }}"
lastModified: "{{ lastModified }}"
creationTime: "{{ creationTime }}"
provisioningState: "{{ provisioningState }}"
provisioningStateTransitionTime: "{{ provisioningStateTransitionTime }}"
allocationState: "{{ allocationState }}"
allocationStateTransitionTime: "{{ allocationStateTransitionTime }}"
vmSize: "{{ vmSize }}"
deploymentConfiguration:
virtualMachineConfiguration:
imageReference:
publisher: "{{ publisher }}"
offer: "{{ offer }}"
sku: "{{ sku }}"
version: "{{ version }}"
id: "{{ id }}"
sharedGalleryImageId: "{{ sharedGalleryImageId }}"
communityGalleryImageId: "{{ communityGalleryImageId }}"
nodeAgentSkuId: "{{ nodeAgentSkuId }}"
windowsConfiguration:
enableAutomaticUpdates: {{ enableAutomaticUpdates }}
dataDisks:
- lun: {{ lun }}
caching: "{{ caching }}"
diskSizeGB: {{ diskSizeGB }}
managedDisk:
storageAccountType: "{{ storageAccountType }}"
securityProfile: "{{ securityProfile }}"
diskEncryptionSet: "{{ diskEncryptionSet }}"
licenseType: "{{ licenseType }}"
containerConfiguration:
type: "{{ type }}"
containerImageNames:
- "{{ containerImageNames }}"
containerRegistries:
- username: "{{ username }}"
password: "{{ password }}"
registryServer: "{{ registryServer }}"
identityReference:
resourceId: "{{ resourceId }}"
diskEncryptionConfiguration:
targets:
- "{{ targets }}"
customerManagedKey:
keyUrl: "{{ keyUrl }}"
rotationToLatestKeyVersionEnabled: {{ rotationToLatestKeyVersionEnabled }}
identityReference: "{{ identityReference }}"
nodePlacementConfiguration:
policy: "{{ policy }}"
extensions:
- name: "{{ name }}"
publisher: "{{ publisher }}"
type: "{{ type }}"
typeHandlerVersion: "{{ typeHandlerVersion }}"
autoUpgradeMinorVersion: {{ autoUpgradeMinorVersion }}
enableAutomaticUpgrade: {{ enableAutomaticUpgrade }}
settings: "{{ settings }}"
protectedSettings: "{{ protectedSettings }}"
provisionAfterExtensions: "{{ provisionAfterExtensions }}"
osDisk:
ephemeralOSDiskSettings:
placement: "{{ placement }}"
caching: "{{ caching }}"
managedDisk:
storageAccountType: "{{ storageAccountType }}"
securityProfile: "{{ securityProfile }}"
diskEncryptionSet: "{{ diskEncryptionSet }}"
diskSizeGB: {{ diskSizeGB }}
writeAcceleratorEnabled: {{ writeAcceleratorEnabled }}
securityProfile:
securityType: "{{ securityType }}"
encryptionAtHost: {{ encryptionAtHost }}
uefiSettings:
secureBootEnabled: {{ secureBootEnabled }}
vTpmEnabled: {{ vTpmEnabled }}
proxyAgentSettings:
enabled: {{ enabled }}
imds: "{{ imds }}"
wireServer: "{{ wireServer }}"
serviceArtifactReference:
id: "{{ id }}"
currentDedicatedNodes: {{ currentDedicatedNodes }}
currentLowPriorityNodes: {{ currentLowPriorityNodes }}
scaleSettings:
fixedScale:
resizeTimeout: "{{ resizeTimeout }}"
targetDedicatedNodes: {{ targetDedicatedNodes }}
targetLowPriorityNodes: {{ targetLowPriorityNodes }}
nodeDeallocationOption: "{{ nodeDeallocationOption }}"
autoScale:
formula: "{{ formula }}"
evaluationInterval: "{{ evaluationInterval }}"
autoScaleRun:
evaluationTime: "{{ evaluationTime }}"
results: "{{ results }}"
error:
code: "{{ code }}"
message: "{{ message }}"
details:
- code: "{{ code }}"
message: "{{ message }}"
details: "{{ details }}"
interNodeCommunication: "{{ interNodeCommunication }}"
networkConfiguration:
subnetId: "{{ subnetId }}"
dynamicVnetAssignmentScope: "{{ dynamicVnetAssignmentScope }}"
endpointConfiguration:
inboundNatPools:
- name: "{{ name }}"
protocol: "{{ protocol }}"
backendPort: {{ backendPort }}
frontendPortRangeStart: {{ frontendPortRangeStart }}
frontendPortRangeEnd: {{ frontendPortRangeEnd }}
networkSecurityGroupRules: "{{ networkSecurityGroupRules }}"
publicIPAddressConfiguration:
provision: "{{ provision }}"
ipAddressIds:
- "{{ ipAddressIds }}"
ipFamilies:
- "{{ ipFamilies }}"
ipTags:
- ipTagType: "{{ ipTagType }}"
tag: "{{ tag }}"
enableAcceleratedNetworking: {{ enableAcceleratedNetworking }}
taskSlotsPerNode: {{ taskSlotsPerNode }}
taskSchedulingPolicy:
jobDefaultOrder: "{{ jobDefaultOrder }}"
nodeFillType: "{{ nodeFillType }}"
userAccounts:
- name: "{{ name }}"
password: "{{ password }}"
elevationLevel: "{{ elevationLevel }}"
linuxUserConfiguration:
uid: {{ uid }}
gid: {{ gid }}
sshPrivateKey: "{{ sshPrivateKey }}"
windowsUserConfiguration:
loginMode: "{{ loginMode }}"
metadata:
- name: "{{ name }}"
value: "{{ value }}"
startTask:
commandLine: "{{ commandLine }}"
resourceFiles:
- autoStorageContainerName: "{{ autoStorageContainerName }}"
storageContainerUrl: "{{ storageContainerUrl }}"
httpUrl: "{{ httpUrl }}"
blobPrefix: "{{ blobPrefix }}"
filePath: "{{ filePath }}"
fileMode: "{{ fileMode }}"
identityReference:
resourceId: "{{ resourceId }}"
environmentSettings:
- name: "{{ name }}"
value: "{{ value }}"
userIdentity:
userName: "{{ userName }}"
autoUser:
scope: "{{ scope }}"
elevationLevel: "{{ elevationLevel }}"
maxTaskRetryCount: {{ maxTaskRetryCount }}
waitForSuccess: {{ waitForSuccess }}
containerSettings:
containerRunOptions: "{{ containerRunOptions }}"
imageName: "{{ imageName }}"
registry:
username: "{{ username }}"
password: "{{ password }}"
registryServer: "{{ registryServer }}"
identityReference:
resourceId: "{{ resourceId }}"
workingDirectory: "{{ workingDirectory }}"
containerHostBatchBindMounts:
- source: "{{ source }}"
isReadOnly: {{ isReadOnly }}
applicationPackages:
- id: "{{ id }}"
version: "{{ version }}"
resizeOperationStatus:
targetDedicatedNodes: {{ targetDedicatedNodes }}
targetLowPriorityNodes: {{ targetLowPriorityNodes }}
resizeTimeout: "{{ resizeTimeout }}"
nodeDeallocationOption: "{{ nodeDeallocationOption }}"
startTime: "{{ startTime }}"
errors:
- code: "{{ code }}"
message: "{{ message }}"
details: "{{ details }}"
mountConfiguration:
- azureBlobFileSystemConfiguration:
accountName: "{{ accountName }}"
containerName: "{{ containerName }}"
accountKey: "{{ accountKey }}"
sasKey: "{{ sasKey }}"
blobfuseOptions: "{{ blobfuseOptions }}"
relativeMountPath: "{{ relativeMountPath }}"
identityReference:
resourceId: "{{ resourceId }}"
nfsMountConfiguration:
source: "{{ source }}"
relativeMountPath: "{{ relativeMountPath }}"
mountOptions: "{{ mountOptions }}"
cifsMountConfiguration:
userName: "{{ userName }}"
source: "{{ source }}"
relativeMountPath: "{{ relativeMountPath }}"
mountOptions: "{{ mountOptions }}"
password: "{{ password }}"
azureFileShareConfiguration:
accountName: "{{ accountName }}"
azureFileUrl: "{{ azureFileUrl }}"
accountKey: "{{ accountKey }}"
relativeMountPath: "{{ relativeMountPath }}"
mountOptions: "{{ mountOptions }}"
upgradePolicy:
mode: "{{ mode }}"
automaticOSUpgradePolicy:
disableAutomaticRollback: {{ disableAutomaticRollback }}
enableAutomaticOSUpgrade: {{ enableAutomaticOSUpgrade }}
useRollingUpgradePolicy: {{ useRollingUpgradePolicy }}
osRollingUpgradeDeferral: {{ osRollingUpgradeDeferral }}
rollingUpgradePolicy:
enableCrossZoneUpgrade: {{ enableCrossZoneUpgrade }}
maxBatchInstancePercent: {{ maxBatchInstancePercent }}
maxUnhealthyInstancePercent: {{ maxUnhealthyInstancePercent }}
maxUnhealthyUpgradedInstancePercent: {{ maxUnhealthyUpgradedInstancePercent }}
pauseTimeBetweenBatches: "{{ pauseTimeBetweenBatches }}"
prioritizeUnhealthyInstances: {{ prioritizeUnhealthyInstances }}
rollbackFailedInstancesOnPolicyBreach: {{ rollbackFailedInstancesOnPolicyBreach }}
- name: identity
description: |
The type of identity used for the Batch Pool.
value:
type: "{{ type }}"
userAssignedIdentities: "{{ userAssignedIdentities }}"
- name: tags
value: "{{ tags }}"
description: |
The tags of the resource.
UPDATE examples
- update
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
- delete
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
- disable_auto_scale
- stop_resize
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
;
Stops 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.
EXEC azure.batch.pool.stop_resize
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@pool_name='{{ pool_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;