az batch pool

Note

This command group has commands that are defined in both Azure CLI and at least one extension. Install each extension to benefit from its extended capabilities. Learn more about extensions.

Manage Batch pools.

Commands

Name Description Type Status
az batch pool autoscale

Manage automatic scaling of Batch pools.

Core GA
az batch pool autoscale disable

Disables automatic scaling for a Pool.

Core GA
az batch pool autoscale enable

Enables automatic scaling for a Pool.

Core GA
az batch pool autoscale evaluate

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

Core GA
az batch pool create

Create a Batch pool in an account. When creating a pool, choose arguments from either Cloud Services Configuration or Virtual Machine Configuration.

Core GA
az batch pool create (azure-batch-cli-extensions extension)

Create a Batch pool in an account. When creating a pool, choose arguments from either Cloud Services Configuration or Virtual Machine Configuration.

Extension GA
az batch pool delete

Deletes a Pool from the specified Account.

Core GA
az batch pool list

Lists all of the Pools in the specified Account.

Core GA
az batch pool node-counts

Get node counts for Batch pools.

Core GA
az batch pool node-counts list

Gets the number of Compute Nodes in each state, grouped by Pool.

Core GA
az batch pool reset

Update the properties of a Batch pool. Unspecified properties which can be updated are reset to their defaults.

Core GA
az batch pool resize

Resize or stop resizing a Batch pool.

Core GA
az batch pool set

Update the properties of a Batch pool. Updating a property in a subgroup will reset the unspecified properties of that group.

Core GA
az batch pool show

Gets information about the specified Pool.

Core GA
az batch pool supported-images

Query information on VM images supported by Azure Batch service.

Core GA
az batch pool supported-images list

Lists all Virtual Machine Images supported by the Azure Batch service.

Core GA
az batch pool usage-metrics

View usage metrics of Batch pools.

Core GA
az batch pool usage-metrics list

Lists the usage metrics, aggregated by Pool across individual time intervals, for the specified Account.

Core GA

az batch pool create

Create a Batch pool in an account. When creating a pool, choose arguments from either Cloud Services Configuration or Virtual Machine Configuration.

az batch pool create [--accelerated-networking {false, true}]
                     [--account-endpoint]
                     [--account-key]
                     [--account-name]
                     [--application-licenses]
                     [--application-package-references]
                     [--auto-scale-formula]
                     [--certificate-references]
                     [--defer-os-rolling-upgrade {false, true}]
                     [--disable-auto-rollback {false, true}]
                     [--disk-encryption-targets]
                     [--enable-auto-os-upgrade {false, true}]
                     [--enable-cross-zone-upgrade {false, true}]
                     [--enable-inter-node-communication]
                     [--enable-secure-boot {false, true}]
                     [--enable-vtpm {false, true}]
                     [--enable-write-accel {false, true}]
                     [--encryption-at-host {false, true}]
                     [--id]
                     [--image]
                     [--json-file]
                     [--max-batch-instance-percent]
                     [--max-unhealthy-instance-percent]
                     [--max-unhealthy-upgraded-instance-percent]
                     [--metadata]
                     [--node-agent-sku-id]
                     [--os-disk-caching {none, readonly, readwrite}]
                     [--os-disk-size]
                     [--os-family {2, 3, 4, 5, 6}]
                     [--os-version]
                     [--pause-time-between-batches]
                     [--placement {cachedisk}]
                     [--policy {regional, zonal}]
                     [--prioritize-unhealthy-instances {false, true}]
                     [--resize-timeout]
                     [--resource-tags]
                     [--rollback-failed-instances-on-policy-breach {false, true}]
                     [--security-type]
                     [--start-task-command-line]
                     [--start-task-resource-files]
                     [--start-task-wait-for-success]
                     [--storage-account-type {premium_lrs, standard_lrs, standardssd_lrs}]
                     [--target-communication {classic, default, simplified}]
                     [--target-dedicated-nodes]
                     [--target-low-priority-nodes]
                     [--targets]
                     [--task-slots-per-node]
                     [--upgrade-policy-mode {automatic, manual, rolling}]
                     [--use-rolling-upgrade-policy {false, true}]
                     [--vm-size]

Optional Parameters

--accelerated-networking

Whether this pool should enable accelerated networking. Accelerated networking enables single root I/O virtualization (SR-IOV) to a VM, which may lead to improved networking performance. For more details, see: https://learn.microsoft.com/azure/virtual- network/accelerated-networking-overview. Set true to enable.

Accepted values: false, true
--account-endpoint

Batch service endpoint. Alternatively, set by environment variable: AZURE_BATCH_ENDPOINT.

--account-key

Batch account key. Alternatively, set by environment variable: AZURE_BATCH_ACCESS_KEY.

--account-name

Batch account name. Alternatively, set by environment variable: AZURE_BATCH_ACCOUNT.

--application-licenses

The list of application licenses must be a subset of available Batch service application licenses. If a license is requested which is not supported, Pool creation will fail. Space-separated values.

--application-package-references

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. Space-separated application IDs with optional version in 'id[#version]' format.

--auto-scale-formula

A formula for the desired number of compute nodes in the pool. 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. For more information about specifying this formula, see https://azure.microsoft.com/documentation/articles/batch-automatic-scaling/.

--certificate-references

For Windows Nodes, the Batch service installs the Certificates to the specified Certificate store and location. For Linux Compute Nodes, the Certificates are stored in a directory inside the Task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this location. For Certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and Certificates are placed in that directory. Warning: This property is deprecated and will be removed after February, 2024. Please use the Azure KeyVault Extension instead. Space-separated certificate thumbprints.

--defer-os-rolling-upgrade

Defer OS upgrades on the TVMs if they are running tasks. True if flag present.

Accepted values: false, true
--disable-auto-rollback

Whether OS image rollback feature should be disabled. True if flag present.

Accepted values: false, true
--disk-encryption-targets

A space separated list of DiskEncryptionTargets. current possible values include OsDisk and TemporaryDisk.

--enable-auto-os-upgrade

Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available.

If this is set to true for Windows based pools, WindowsConfiguration.enableAutomaticUpdates cannot be set to true. True if flag present.

Accepted values: false, true
--enable-cross-zone-upgrade

Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size. This field is able to be set to true or false only when using NodePlacementConfiguration as Zonal. True if flag present.

Accepted values: false, true
--enable-inter-node-communication

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. True if flag present.

--enable-secure-boot

Enable secure boot.

Accepted values: false, true
--enable-vtpm

Enable vTPM.

Accepted values: false, true
--enable-write-accel

Specify whether writeAccelerator should be enabled or disabled on the disk.

Accepted values: false, true
--encryption-at-host

This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. The default behavior is: The Encryption at host will be disabled unless this property is set to true for the resource.

Accepted values: false, true
--id

Required. 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 Pool IDs within an Account that differ only by case).

--image

OS image reference. This can be either 'publisher:offer:sku[:version]' format, or a fully qualified ARM image id of the form '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}'. If 'publisher:offer:sku[:version]' format, version is optional and if omitted latest will be used. Valid values can be retrieved via 'az batch pool supported-images list'. For example: 'MicrosoftWindowsServer:WindowsServer:2012-R2-Datacenter:latest'.

--json-file

The file containing pool create properties parameter specification in JSON(formatted to match REST API request body). If this parameter is specified, all 'Pool Create Properties Parameter Arguments' are ignored. See https://docs.microsoft.com/en-us/rest/api/batchservice/pool/add?tabs=HTTP#request-body.

--max-batch-instance-percent

The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The value of this field should be between 5 and 100, inclusive. If both maxBatchInstancePercent and maxUnhealthyInstancePercent are assigned with value, the value of maxBatchInstancePercent should not be more than maxUnhealthyInstancePercent.

--max-unhealthy-instance-percent

The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The value of this field should be between 5 and 100, inclusive. If both maxBatchInstancePercent and maxUnhealthyInstancePercent are assigned with value, the value of maxBatchInstancePercent should not be more than maxUnhealthyInstancePercent.

--max-unhealthy-upgraded-instance-percent

The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The value of this field should be between 0 and 100, inclusive.

--metadata

The Batch service does not assign any meaning to metadata; it is solely for the use of user code. Space-separated values in 'key=value' format.

--node-agent-sku-id

Required. The Batch Compute Node agent is a program that runs on each Compute Node in the Pool, and provides the command-and-control interface between the Compute Node and the Batch service. There are different implementations of the Compute Node agent, known as SKUs, for different operating systems. You must specify a Compute Node agent SKU which matches the selected Image reference. To get the list of supported Compute Node agent SKUs along with their list of verified Image references, see the 'List supported Compute Node agent SKUs' operation.

--os-disk-caching

Specify the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.

Accepted values: none, readonly, readwrite
--os-disk-size

The initial disk size in GB when creating new OS disk.

--os-family

Required. Possible values are: 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to Windows Server 2012. 4 - OS Family 4, equivalent to Windows Server 2012 R2. 5 - OS Family 5, equivalent to Windows Server 2016. 6 - OS Family 6, equivalent to Windows Server 2019. For more information, see Azure Guest OS Releases (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases).

Accepted values: 2, 3, 4, 5, 6
--os-version

The default value is * which specifies the latest operating system version for the specified OS family.

--pause-time-between-batches

The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format. Expected format is an ISO-8601 duration.

--placement

Specifies the ephemeral disk placement for operating system disk for all VMs in the pool. This property can be used by user in the request to choose the location e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VMs at https://docs.microsoft.com/en-us/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements.

Accepted values: cachedisk
--policy

Node placement Policy type on Batch Pools. Allocation policy used by Batch Service to provision the nodes. If not specified, Batch will use the regional policy.

Accepted values: regional, zonal
--prioritize-unhealthy-instances

Upgrade all unhealthy instances in a scale set before any healthy instances. True if flag present.

Accepted values: false, true
--resize-timeout

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 returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). Expected format is an ISO-8601 duration.

--resource-tags

User is able to specify resource tags for the pool. Any resource created for the pool will then also be tagged by the same resource tags.

--rollback-failed-instances-on-policy-breach

Rollback failed instances to previous model if the Rolling Upgrade policy is violated. True if flag present.

Accepted values: false, true
--security-type

Specify the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. The default behavior is: UefiSettings will not be enabled unless this property is set.

--start-task-command-line

Required. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables).

--start-task-resource-files

Files listed under this element are located in the Task's working directory. Space-separated resource references in filename=httpurl format.

--start-task-wait-for-success

Whether the Batch service should wait for the StartTask to complete successfully (that is, to exit with exit code 0) before scheduling any Tasks on the Compute Node. If true and the StartTask fails on a Node, the Batch service retries the StartTask up to its maximum retry count (maxTaskRetryCount). If the Task has still not completed successfully after all retries, then the Batch service marks the Node unusable, and will not schedule Tasks to it. This condition can be detected via the Compute Node state and failure info details. If false, the Batch service will not wait for the StartTask to complete. In this case, other Tasks can start executing on the Compute Node while the StartTask is still running; and even if the StartTask fails, new Tasks will continue to be scheduled on the Compute Node. The default is true. True if flag present.

--storage-account-type

The storage account type for managed disk.

Accepted values: premium_lrs, standard_lrs, standardssd_lrs
--target-communication

The desired node communication mode for the pool. If this element is present, it replaces the existing targetNodeCommunicationMode configured on the Pool. If omitted, any existing metadata is left unchanged.

Accepted values: classic, default, simplified
--target-dedicated-nodes

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.

--target-low-priority-nodes

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.

--targets

If omitted, no disks on the compute nodes in the pool will be encrypted. On Linux pool, only "TemporaryDisk" is supported; on Windows pool, "OsDisk" and "TemporaryDisk" must be specified. Space seperated target disks to be encrypted. Values can either be OsDisk or TemporaryDisk.

--task-slots-per-node

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.

--upgrade-policy-mode

The mode of the pool OS upgrade.

Accepted values: automatic, manual, rolling
--use-rolling-upgrade-policy

Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS. True if flag present.

Accepted values: false, true
--vm-size

Required. For information about available sizes of virtual machines for Cloud Services Pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall, A1V2 and A2V2. For information about available VM sizes for Pools using Images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series).

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az batch pool create (azure-batch-cli-extensions extension)

Create a Batch pool in an account. When creating a pool, choose arguments from either Cloud Services Configuration or Virtual Machine Configuration.

az batch pool create [--account-endpoint]
                     [--account-key]
                     [--account-name]
                     [--application-licenses]
                     [--application-package-references]
                     [--auto-scale-formula]
                     [--certificate-references]
                     [--disk-encryption-targets]
                     [--enable-inter-node-communication]
                     [--id]
                     [--image]
                     [--json-file]
                     [--metadata]
                     [--node-agent-sku-id]
                     [--os-family]
                     [--os-version]
                     [--parameters]
                     [--policy]
                     [--resize-timeout]
                     [--resource-group]
                     [--start-task-command-line]
                     [--start-task-resource-files]
                     [--start-task-wait-for-success]
                     [--target-dedicated-nodes]
                     [--target-low-priority-nodes]
                     [--targets]
                     [--task-slots-per-node]
                     [--template]
                     [--vm-size]

Optional Parameters

--account-endpoint

Batch service endpoint. Alternatively, set by environment variable: AZURE_BATCH_ENDPOINT.

--account-key

The Batch account key. Alternatively, set by environment variable: AZURE_BATCH_ACCESS_KEY.

--account-name

The Batch account name. Alternatively, set by environment variable: AZURE_BATCH_ACCOUNT.

--application-licenses

The list of application licenses must be a subset of available Batch service application licenses. If a license is requested which is not supported, Pool creation will fail.

--application-package-references

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.

--auto-scale-formula

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. For more information about specifying this formula, see 'Automatically scale Compute Nodes in an Azure Batch Pool' (https://azure.microsoft.com/documentation/articles/batch-automatic-scaling/).

--certificate-references

For Windows Nodes, the Batch service installs the Certificates to the specified Certificate store and location. For Linux Compute Nodes, the Certificates are stored in a directory inside the Task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this location. For Certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and Certificates are placed in that directory. Warning: This property is deprecated and will be removed after February, 2024. Please use the Azure KeyVault Extension instead.

--disk-encryption-targets

A space seperated list of DiskEncryptionTargets. current possible values include OsDisk and TemporaryDisk.

--enable-inter-node-communication

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.

Default value: False
--id

Required. 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 Pool IDs within an Account that differ only by case).

--image

OS image reference. This can be either 'publisher:offer:sku[:version]' format, or a fully qualified ARM image id of the form '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}'. If 'publisher:offer:sku[:version]' format, version is optional and if omitted latest will be used. Valid values can be retrieved via 'az batch pool node-agent-skus list'. For example: 'MicrosoftWindowsServer:WindowsServer:2012-R2-Datacenter:latest'.

--json-file

The file containing the pool to create in JSON format, if this parameter is specified, all other parameters are ignored.

--metadata

The Batch service does not assign any meaning to metadata; it is solely for the use of user code.

--node-agent-sku-id

The SKU of the Batch node agent to be provisioned on compute nodes in the pool. The Batch node agent is a program that runs on each node in the pool, and provides the command-and-control interface between the node and the Batch service. There are different implementations of the node agent, known as SKUs, for different operating systems. You must specify a node agent SKU which matches the selected image reference. To get the list of supported node agent SKUs along with their list of verified image references, see the 'List supported node agent SKUs' operation.

--os-family

The Azure Guest OS family to be installed on the virtual machines in the pool. Possible values are: 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to Windows Server 2012. 4 - OS Family 4, equivalent to Windows Server 2012 R2. 5 - OS Family 5, equivalent to Windows Server 2016. For more information, see Azure Guest OS Releases (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). Allowed values: 2, 3, 4, 5.

--os-version

The default value is * which specifies the latest operating system version for the specified OS family.

--parameters

Parameter values for a Batch pool JSON template file. Can only be used with --template.

--policy

Node placement Policy type on Batch Pools. Allocation policy used by Batch Service to provision the nodes. If not specified, Batch will use the regional policy. Allowed values: regional, zonal.

--resize-timeout

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 returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

--resource-group

The resource group of the Batch account.

--start-task-command-line

The command line of the start task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux.

--start-task-resource-files

A list of files that the Batch service will download to the compute node before running the command line. Space separated resource references in filename=httpurl format.

--start-task-wait-for-success

Whether the Batch service should wait for the start task to complete successfully (that is, to exit with exit code 0) before scheduling any tasks on the compute node. If true and the start task fails on a compute node, the Batch service retries the start task up to its maximum retry count (maxTaskRetryCount). If the task has still not completed successfully after all retries, then the Batch service marks the compute node unusable, and will not schedule tasks to it. This condition can be detected via the node state and scheduling error detail. If false, the Batch service will not wait for the start task to complete. In this case, other tasks can start executing on the compute node while the start task is still running; and even if the start task fails, new tasks will continue to be scheduled on the node. The default is false. True if flag present.

Default value: False
--target-dedicated-nodes

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.

--target-low-priority-nodes

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.

--targets

If omitted, no disks on the compute nodes in the pool will be encrypted. On Linux pool, only "TemporaryDisk" is supported; on Windows pool, "OsDisk" and "TemporaryDisk" must be specified. Space seperated target disks to be encrypted. Values can either be OsDisk or TemporaryDisk.

--task-slots-per-node

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.

--template

A Batch pool JSON template file. If this parameter is specified, all other parameters are ignored.

--vm-size

Required. For information about available sizes of virtual machines for Cloud Services Pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall, A1V2 and A2V2. For information about available VM sizes for Pools using Images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series).

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az batch pool delete

Deletes a Pool from the specified Account.

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 Compute Nodes; any Tasks running on existing Compute 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.

az batch pool delete --pool-id
                     [--account-endpoint]
                     [--account-key]
                     [--account-name]
                     [--if-match]
                     [--if-modified-since]
                     [--if-none-match]
                     [--if-unmodified-since]
                     [--yes]

Required Parameters

--pool-id

The ID of the Pool to delete.

Optional Parameters

--account-endpoint

Batch service endpoint. Alternatively, set by environment variable: AZURE_BATCH_ENDPOINT.

--account-key

Batch account key. Alternatively, set by environment variable: AZURE_BATCH_ACCESS_KEY.

--account-name

Batch account name. Alternatively, set by environment variable: AZURE_BATCH_ACCOUNT.

--if-match

An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client.

--if-modified-since

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

--if-none-match

An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client.

--if-unmodified-since

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

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az batch pool list

Lists all of the Pools in the specified Account.

az batch pool list [--account-endpoint]
                   [--account-key]
                   [--account-name]
                   [--expand]
                   [--filter]
                   [--select]

Optional Parameters

--account-endpoint

Batch service endpoint. Alternatively, set by environment variable: AZURE_BATCH_ENDPOINT.

--account-key

Batch account key. Alternatively, set by environment variable: AZURE_BATCH_ACCESS_KEY.

--account-name

Batch account name. Alternatively, set by environment variable: AZURE_BATCH_ACCOUNT.

--expand

An OData $expand clause.

--filter

An OData $filter clause. For more information on constructing this filter, see https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-pools.

--select

An OData $select clause.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az batch pool reset

Update the properties of a Batch pool. Unspecified properties which can be updated are reset to their defaults.

az batch pool reset --pool-id
                    [--account-endpoint]
                    [--account-key]
                    [--account-name]
                    [--application-package-references]
                    [--certificate-references]
                    [--json-file]
                    [--metadata]
                    [--start-task-command-line]
                    [--start-task-environment-settings]
                    [--start-task-max-task-retry-count]
                    [--start-task-wait-for-success]

Required Parameters

--pool-id

The ID of the pool to update.

Optional Parameters

--account-endpoint

Batch service endpoint. Alternatively, set by environment variable: AZURE_BATCH_ENDPOINT.

--account-key

The Batch account key. Alternatively, set by environment variable: AZURE_BATCH_ACCESS_KEY.

--account-name

The Batch account name. Alternatively, set by environment variable: AZURE_BATCH_ACCOUNT.

--application-package-references

Required. The list replaces any existing Application Package references on the Pool. Changes to Application Package references affect all new Compute 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 Application Package references on any given Pool. If omitted, or if you specify an empty collection, any existing Application Packages references are removed from the Pool. A maximum of 10 references may be specified on a given Pool.

--certificate-references

Required. This list replaces any existing Certificate references configured on the Pool. If you specify an empty collection, any existing Certificate references are removed from the Pool. For Windows Nodes, the Batch service installs the Certificates to the specified Certificate store and location. For Linux Compute Nodes, the Certificates are stored in a directory inside the Task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this location. For Certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and Certificates are placed in that directory. Warning: This property is deprecated and will be removed after February, 2024. Please use the Azure KeyVault Extension instead.

--json-file

The file containing pool update properties parameter specification in JSON(formatted to match REST API request body). If this parameter is specified, all 'Pool Update Properties Parameter Arguments' are ignored.

--metadata

Required. This list replaces any existing metadata configured on the Pool. If omitted, or if you specify an empty collection, any existing metadata is removed from the Pool.

--start-task-command-line

The command line of the start task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux.

--start-task-environment-settings

A list of environment variable settings for the start task. Space-separated values in 'key=value' format.

--start-task-max-task-retry-count

The maximum number of times the task may be retried.

--start-task-wait-for-success

Whether the Batch service should wait for the start task to complete successfully (that is, to exit with exit code 0) before scheduling any tasks on the compute node. True if flag present, otherwise defaults to False.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az batch pool resize

Resize or stop resizing a Batch pool.

az batch pool resize --pool-id
                     [--abort]
                     [--account-endpoint]
                     [--account-key]
                     [--account-name]
                     [--if-match]
                     [--if-modified-since]
                     [--if-none-match]
                     [--if-unmodified-since]
                     [--node-deallocation-option {requeue, retaineddata, taskcompletion, terminate}]
                     [--resize-timeout]
                     [--target-dedicated-nodes]
                     [--target-low-priority-nodes]

Required Parameters

--pool-id

The ID of the pool.

Optional Parameters

--abort

Stop the pool resize operation.

Default value: False
--account-endpoint

Batch service endpoint. Alternatively, set by environment variable: AZURE_BATCH_ENDPOINT.

--account-key

The Batch account key. Alternatively, set by environment variable: AZURE_BATCH_ACCESS_KEY.

--account-name

The Batch account name. Alternatively, set by environment variable: AZURE_BATCH_ACCOUNT.

--if-match

The operation will be performed only if the resource's current ETag exactly matches the specified value.

--if-modified-since

The operation will be performed only if the resource has been modified since the specified timestamp.

--if-none-match

The operation will not be performed only if the resource's current ETag exactly matches the specified value.

--if-unmodified-since

The operation will not be performed only if the resource has been modified since the specified timestamp.

--node-deallocation-option

When nodes may be removed from the pool, if the pool size is decreasing.

Accepted values: requeue, retaineddata, taskcompletion, terminate
--resize-timeout

The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

--target-dedicated-nodes

The desired number of dedicated Compute Nodes in the Pool.

--target-low-priority-nodes

The desired number of Spot/Low-priority Compute Nodes in the Pool.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az batch pool set

Update the properties of a Batch pool. Updating a property in a subgroup will reset the unspecified properties of that group.

az batch pool set --pool-id
                  [--account-endpoint]
                  [--account-key]
                  [--account-name]
                  [--application-package-references]
                  [--certificate-references]
                  [--if-match]
                  [--if-modified-since]
                  [--if-none-match]
                  [--if-unmodified-since]
                  [--json-file]
                  [--metadata]
                  [--start-task-command-line]
                  [--start-task-environment-settings]
                  [--start-task-max-task-retry-count]
                  [--start-task-resource-files]
                  [--start-task-wait-for-success]
                  [--target-communication {classic, default, simplified}]

Required Parameters

--pool-id

The ID of the Pool to update.

Optional Parameters

--account-endpoint

Batch service endpoint. Alternatively, set by environment variable: AZURE_BATCH_ENDPOINT.

--account-key

Batch account key. Alternatively, set by environment variable: AZURE_BATCH_ACCESS_KEY.

--account-name

Batch account name. Alternatively, set by environment variable: AZURE_BATCH_ACCOUNT.

--application-package-references

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. If this element is present, it replaces any existing Package references. If you specify an empty collection, then all Package references are removed from the Pool. If omitted, any existing Package references are left unchanged. Space-separated application IDs with optional version in 'id[#version]' format.

--certificate-references

If this element is present, it replaces any existing Certificate references configured on the Pool. If omitted, any existing Certificate references are left unchanged. For Windows Nodes, the Batch service installs the Certificates to the specified Certificate store and location. For Linux Compute Nodes, the Certificates are stored in a directory inside the Task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this location. For Certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and Certificates are placed in that directory. Warning: This property is deprecated and will be removed after February, 2024. Please use the Azure KeyVault Extension instead. Space-separated certificate thumbprints.

--if-match

An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client.

--if-modified-since

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

--if-none-match

An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client.

--if-unmodified-since

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

--json-file

A file containing the pool patch parameter specification in JSON (formatted to match the respective REST API body). If this parameter is specified, all 'Pool Arguments' are ignored.

--metadata

If this element is present, it replaces any existing metadata configured on the Pool. If you specify an empty collection, any metadata is removed from the Pool. If omitted, any existing metadata is left unchanged. Space-separated values in 'key=value' format.

--start-task-command-line

Required. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables).

--start-task-environment-settings

Space-separated values in 'key=value' format.

--start-task-max-task-retry-count

The maximum number of times the Task may be retried. The Batch service retries a Task if its exit code is nonzero. Note that this value specifically controls the number of retries. The Batch service will try the Task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the Task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the Task. If the maximum retry count is -1, the Batch service retries the Task without limit, however this is not recommended for a start task or any task. The default value is 0 (no retries).

--start-task-resource-files

Files listed under this element are located in the Task's working directory. Space-separated resource references in filename=httpurl format.

--start-task-wait-for-success

Whether the Batch service should wait for the StartTask to complete successfully (that is, to exit with exit code 0) before scheduling any Tasks on the Compute Node. If true and the StartTask fails on a Node, the Batch service retries the StartTask up to its maximum retry count (maxTaskRetryCount). If the Task has still not completed successfully after all retries, then the Batch service marks the Node unusable, and will not schedule Tasks to it. This condition can be detected via the Compute Node state and failure info details. If false, the Batch service will not wait for the StartTask to complete. In this case, other Tasks can start executing on the Compute Node while the StartTask is still running; and even if the StartTask fails, new Tasks will continue to be scheduled on the Compute Node. The default is true. Specify either 'true' or 'false' to update the property.

--target-communication

The desired node communication mode for the pool. If this element is present, it replaces the existing targetNodeCommunicationMode configured on the Pool. If omitted, any existing metadata is left unchanged.

Accepted values: classic, default, simplified
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az batch pool show

Gets information about the specified Pool.

az batch pool show --pool-id
                   [--account-endpoint]
                   [--account-key]
                   [--account-name]
                   [--expand]
                   [--if-match]
                   [--if-modified-since]
                   [--if-none-match]
                   [--if-unmodified-since]
                   [--select]

Required Parameters

--pool-id

The ID of the Pool to get.

Optional Parameters

--account-endpoint

Batch service endpoint. Alternatively, set by environment variable: AZURE_BATCH_ENDPOINT.

--account-key

Batch account key. Alternatively, set by environment variable: AZURE_BATCH_ACCESS_KEY.

--account-name

Batch account name. Alternatively, set by environment variable: AZURE_BATCH_ACCOUNT.

--expand

An OData $expand clause.

--if-match

An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client.

--if-modified-since

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

--if-none-match

An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client.

--if-unmodified-since

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

--select

An OData $select clause.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.