Share via


BatchPoolSpecification interface

Specification for creating a new Pool.

Properties

applicationPackageReferences

The list of Packages to be installed on each Compute Node in the Pool. When creating a pool, the package's application ID must be fully qualified (/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}). 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.

autoScaleEvaluationInterval

The time interval at which to automatically adjust the Pool size according to the autoscale formula. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

autoScaleFormula

The formula for the desired number of Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to false. It is required if enableAutoScale is set to true. The formula is checked for validity before the Pool is created. If the formula is not valid, the Batch service rejects the request with detailed error information.

displayName

The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.

enableAutoScale

Whether the Pool size should automatically adjust over time. If false, at least one of targetDedicatedNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula element is required. The Pool automatically resizes according to the formula. The default value is false.

enableInterNodeCommunication

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

metadata

A list of name-value pairs associated with the Pool as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code.

mountConfiguration

A list of file systems to mount on each node in the pool. This supports Azure Files, NFS, CIFS/SMB, and Blobfuse.

networkConfiguration

The network configuration for the Pool.

resizeTimeout

The timeout for allocation of Compute Nodes to the Pool. This timeout applies only to manual scaling; it has no effect when enableAutoScale is set to true. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service rejects the request with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

startTask

A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted.

targetDedicatedNodes

The desired number of dedicated Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both.

targetLowPriorityNodes

The desired number of Spot/Low-priority Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both.

taskSchedulingPolicy

How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread.

taskSlotsPerNode

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

upgradePolicy

The upgrade policy for the Pool. Describes an upgrade policy - automatic, manual, or rolling.

userAccounts

The list of user Accounts to be created on each Compute Node in the Pool.

virtualMachineConfiguration

The virtual machine configuration for the Pool. This property must be specified.

vmSize

The size of the 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).

Property Details

applicationPackageReferences

The list of Packages to be installed on each Compute Node in the Pool. When creating a pool, the package's application ID must be fully qualified (/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}). 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.

applicationPackageReferences?: BatchApplicationPackageReference[]

Property Value

autoScaleEvaluationInterval

The time interval at which to automatically adjust the Pool size according to the autoscale formula. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

autoScaleEvaluationInterval?: string

Property Value

string

autoScaleFormula

The formula for the desired number of Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to false. It is required if enableAutoScale is set to true. The formula is checked for validity before the Pool is created. If the formula is not valid, the Batch service rejects the request with detailed error information.

autoScaleFormula?: string

Property Value

string

displayName

The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.

displayName?: string

Property Value

string

enableAutoScale

Whether the Pool size should automatically adjust over time. If false, at least one of targetDedicatedNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula element is required. The Pool automatically resizes according to the formula. The default value is false.

enableAutoScale?: boolean

Property Value

boolean

enableInterNodeCommunication

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

enableInterNodeCommunication?: boolean

Property Value

boolean

metadata

A list of name-value pairs associated with the Pool as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code.

metadata?: BatchMetadataItem[]

Property Value

mountConfiguration

A list of file systems to mount on each node in the pool. This supports Azure Files, NFS, CIFS/SMB, and Blobfuse.

mountConfiguration?: MountConfiguration[]

Property Value

networkConfiguration

The network configuration for the Pool.

networkConfiguration?: NetworkConfiguration

Property Value

resizeTimeout

The timeout for allocation of Compute Nodes to the Pool. This timeout applies only to manual scaling; it has no effect when enableAutoScale is set to true. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service rejects the request with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

resizeTimeout?: string

Property Value

string

startTask

A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted.

startTask?: BatchStartTask

Property Value

targetDedicatedNodes

The desired number of dedicated Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both.

targetDedicatedNodes?: number

Property Value

number

targetLowPriorityNodes

The desired number of Spot/Low-priority Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both.

targetLowPriorityNodes?: number

Property Value

number

taskSchedulingPolicy

How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread.

taskSchedulingPolicy?: BatchTaskSchedulingPolicy

Property Value

taskSlotsPerNode

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

taskSlotsPerNode?: number

Property Value

number

upgradePolicy

The upgrade policy for the Pool. Describes an upgrade policy - automatic, manual, or rolling.

upgradePolicy?: UpgradePolicy

Property Value

userAccounts

The list of user Accounts to be created on each Compute Node in the Pool.

userAccounts?: UserAccount[]

Property Value

virtualMachineConfiguration

The virtual machine configuration for the Pool. This property must be specified.

virtualMachineConfiguration?: VirtualMachineConfiguration

Property Value

vmSize

The size of the 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).

vmSize: string

Property Value

string