---
title: "Lists all of the Pools in the specified Account."
method: GET
path: "/pools"
tags: ["Pools"]
---

# Lists all of the Pools in the specified Account.

`GET /pools`

Lists all of the Pools in the specified Account.

## Query parameters

- `api-version` string, required
- `timeOut` integer
- `maxresults` integer
- `$filter` string
- `$select` string[]
- `$expand` string[]

## Headers

- `client-request-id` string
- `return-client-request-id` boolean
- `ocp-date` string, date-time-rfc7231

## Response `200`

The request has succeeded.

- BatchPoolListResult — The result of listing the Pools in an Account.
  - `value` BatchPool[] — The list of Pools.
    - `id` string, required — A string that uniquely identifies the Pool within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case).
    - `displayName` string — The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
    - `url` string, uri, required — The URL of the Pool.
    - `eTag` string, required — The ETag (or entity tag) HTTP response header is an identifier for a specific version of a resource. It lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content was not changed. It is a string of ASCII characters placed between double quotes, like "675af34563dc-tr34".
    - `lastModified` string, date-time, required — The last modified time of the Pool. This is the last time at which the Pool level data, such as the targetDedicatedNodes or enableAutoscale settings, changed. It does not factor in node-level changes such as a Compute Node changing state.
    - `creationTime` string, date-time, required — The creation time of the Pool.
    - `state` 'active' | 'deleting', required — BatchPoolState enums
    - `stateTransitionTime` string, date-time, required — The time at which the Pool entered its current state.
    - `allocationState` 'steady' | 'resizing' | 'stopping' — AllocationState enums
    - `allocationStateTransitionTime` string, date-time — The time at which the Pool entered its current allocation state.
    - `vmSize` string, required — The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes).
    - `virtualMachineConfiguration` VirtualMachineConfiguration — The configuration for Compute Nodes in a Pool based on the Azure Virtual Machines infrastructure.
      - `imageReference` BatchVmImageReference, required — A reference to an Azure Virtual Machines Marketplace Image or a Azure Compute Gallery Image. To get the list of all Azure Marketplace Image references verified by Azure Batch, see the ' List Supported Images ' operation.
        - `publisher` string — The publisher of the Azure Virtual Machines Marketplace Image. For example, Canonical or MicrosoftWindowsServer.
        - `offer` string — The offer type of the Azure Virtual Machines Marketplace Image. For example, UbuntuServer or WindowsServer.
        - `sku` string — The SKU of the Azure Virtual Machines Marketplace Image. For example, 18.04-LTS or 2019-Datacenter.
        - `version` string — The version of the Azure Virtual Machines Marketplace Image. A value of 'latest' can be specified to select the latest version of an Image. If omitted, the default is 'latest'.
        - `virtualMachineImageId` string, arm-id — The ARM resource identifier of the Azure Compute Gallery Image. Compute Nodes in the Pool will be created using this Image Id. This is of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{VersionId} or /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName} for always defaulting to the latest image version. This property is mutually exclusive with other ImageReference properties. The Azure Compute Gallery Image must have replicas in the same region and must be in the same subscription as the Azure Batch account. If the image version is not specified in the imageId, the latest version will be used. For information about the firewall settings for the Batch Compute Node agent to communicate with the Batch service see https://learn.microsoft.com/azure/batch/nodes-and-pools#virtual-network-vnet-and-firewall-configuration.
        - `exactVersion` string — The specific version of the platform image or marketplace image used to create the node. This read-only field differs from 'version' only if the value specified for 'version' when the pool was created was 'latest'.
        - `sharedGalleryImageId` string — The shared gallery image unique identifier. This property is mutually exclusive with other properties and can be fetched from shared gallery image GET call.
        - `communityGalleryImageId` string — The community gallery image unique identifier. This property is mutually exclusive with other properties and can be fetched from community gallery image GET call.
      - `nodeAgentSKUId` string, required — The SKU of the Batch Compute Node agent to be provisioned on Compute Nodes in the Pool. 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.
      - `windowsConfiguration` WindowsConfiguration — Windows operating system settings to apply to the virtual machine.
        - `enableAutomaticUpdates` boolean — Whether automatic updates are enabled on the virtual machine. If omitted, the default value is true.
      - `dataDisks` DataDisk[] — The configuration for data disks attached to the Compute Nodes in the Pool. This property must be specified if the Compute Nodes in the Pool need to have empty data disks attached to them. This cannot be updated. Each Compute Node gets its own disk (the disk is not a file share). Existing disks cannot be attached, each attached disk is empty. When the Compute Node is removed from the Pool, the disk and all data associated with it is also deleted. The disk is not formatted after being attached, it must be formatted before use - for more information see https://learn.microsoft.com/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux and https://learn.microsoft.com/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine.
        - `lun` integer, required — The logical unit number. The logicalUnitNumber is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct logicalUnitNumber. The value must be between 0 and 63, inclusive.
        - `caching` 'none' | 'readonly' | 'readwrite' — CachingType enums
        - `diskSizeGB` integer, required — The initial disk size in gigabytes.
        - `managedDisk` ManagedDisk — The managed disk parameters.
          - `diskEncryptionSet` DiskEncryptionSetParameters — The ARM resource id of the disk encryption set.
            - `id` string, arm-id — The ARM resource id of the disk encryption set. The resource must be in the same subscription as the Batch account.
          - `storageAccountType` 'standard_lrs' | 'premium_lrs' | 'standardssd_lrs' — StorageAccountType enums
          - `securityProfile` BatchVmDiskSecurityProfile — Specifies the security profile settings for the managed disk. **Note**: It can only be set for Confidential VMs and required when using Confidential VMs.
            - `securityEncryptionType` 'DiskWithVMGuestState' | 'NonPersistedTPM' | 'VMGuestStateOnly' — SecurityEncryptionTypes enums
      - `licenseType` string — This only applies to Images that contain the Windows operating system, and should only be used when you hold valid on-premises licenses for the Compute Nodes which will be deployed. If omitted, no on-premises licensing discount is applied. Values are: Windows_Server - The on-premises license is for Windows Server. Windows_Client - The on-premises license is for Windows Client.
      - `containerConfiguration` BatchContainerConfiguration — The configuration for container-enabled Pools.
        - `type` 'dockerCompatible' | 'criCompatible', required — ContainerType enums
        - `containerImageNames` string[] — The collection of container Image names. This is the full Image reference, as would be specified to "docker pull". An Image will be sourced from the default Docker registry unless the Image is fully qualified with an alternative registry.
        - `containerRegistries` ContainerRegistryReference[] — Additional private registries from which containers can be pulled. If any Images must be downloaded from a private registry which requires credentials, then those credentials must be provided here.
          - `username` string — The user name to log into the registry server.
          - `password` string, password — The password to log into the registry server.
          - `registryServer` string, uri — The registry URL. If omitted, the default is "docker.io".
          - `identityReference` BatchNodeIdentityReference — The reference to a user assigned identity associated with the Batch pool which a compute node will use.
            - `resourceId` string, arm-id — The ARM resource id of the user assigned identity.
      - `diskEncryptionConfiguration` DiskEncryptionConfiguration — The disk encryption configuration applied on compute nodes in the pool. Disk encryption configuration is not supported on Linux pool created with Azure Compute Gallery Image.
        - `customerManagedKey` DiskCustomerManagedKey — The Customer Managed Key reference to encrypt the Disk.
          - `identityReference` BatchPoolIdentityReference — The reference of one of the pool identities to encrypt Disk. This identity will be used to access the key vault.
            - `resourceId` string, arm-id — The ARM resource id of the user assigned identity. This reference must be included in the pool identities.
          - `keyUrl` string — Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required regardless of rotationToLatestKeyVersionEnabled value.
          - `rotationToLatestKeyVersionEnabled` boolean — Set this flag to true to enable auto-updating of the Disk Encryption to the latest key version. Default is false.
        - `targets` DiskEncryptionTarget[] — The list of disk targets Batch Service will encrypt on the compute node. The list of disk targets Batch Service will encrypt on the compute node.
      - `nodePlacementConfiguration` BatchNodePlacementConfiguration — For regional placement, nodes in the pool will be allocated in the same region. For zonal placement, nodes in the pool will be spread across different zones with best effort balancing.
        - `policy` 'regional' | 'zonal' — BatchNodePlacementPolicyType enums
      - `extensions` VMExtension[] — The virtual machine extension for the pool. If specified, the extensions mentioned in this configuration will be installed on each node.
        - `name` string, required — The name of the virtual machine extension.
        - `publisher` string, required — The name of the extension handler publisher.
        - `type` string, required — The type of the extension.
        - `typeHandlerVersion` string — The version of script handler.
        - `autoUpgradeMinorVersion` boolean — Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
        - `enableAutomaticUpgrade` boolean — Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
        - `settings` object — JSON formatted public settings for the extension.
        - `protectedSettings` object — The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
        - `provisionAfterExtensions` string[] — The collection of extension names. Collection of extension names after which this extension needs to be provisioned.
      - `osDisk` BatchOsDisk — Settings for the operating system disk of the compute node (VM).
        - `ephemeralOSDiskSettings` BatchDiffDiskSettings — Specifies the ephemeral Disk Settings for the operating system disk used by the compute node (VM).
          - `placement` 'cachedisk' — Specifies the ephemeral disk placement for operating system disk for all compute nodes (VMs) in the pool. This property can be used by user in the request to choose which location the operating system should be in. 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://learn.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VMs at https://learn.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements
        - `caching` 'none' | 'readonly' | 'readwrite' — CachingType enums
        - `diskSizeGB` integer — The initial disk size in GB when creating new OS disk.
        - `managedDisk` ManagedDisk — The managed disk parameters.
          - `diskEncryptionSet` DiskEncryptionSetParameters — The ARM resource id of the disk encryption set.
            - `id` string, arm-id — The ARM resource id of the disk encryption set. The resource must be in the same subscription as the Batch account.
          - `storageAccountType` 'standard_lrs' | 'premium_lrs' | 'standardssd_lrs' — StorageAccountType enums
          - `securityProfile` BatchVmDiskSecurityProfile — Specifies the security profile settings for the managed disk. **Note**: It can only be set for Confidential VMs and required when using Confidential VMs.
            - `securityEncryptionType` 'DiskWithVMGuestState' | 'NonPersistedTPM' | 'VMGuestStateOnly' — SecurityEncryptionTypes enums
        - `writeAcceleratorEnabled` boolean — Specifies whether writeAccelerator should be enabled or disabled on the disk.
      - `securityProfile` SecurityProfile — Specifies the security profile settings for the virtual machine or virtual machine scale set.
        - `encryptionAtHost` boolean — 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. For more information on encryption at host requirements, please refer to https://learn.microsoft.com/azure/virtual-machines/disk-encryption#supported-vm-sizes.
        - `proxyAgentSettings` ProxyAgentSettings — Specifies ProxyAgent settings while creating the virtual machine.
          - `enabled` boolean — Specifies whether Metadata Security Protocol feature should be enabled on the virtual machine or virtual machine scale set. Default is False.
          - `imds` HostEndpointSettings — Specifies particular host endpoint settings.
            - `inVMAccessControlProfileReferenceId` string — Specifies the reference to the InVMAccessControlProfileVersion resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}.
            - `mode` 'Audit' | 'Enforce' — HostEndpointSettingsModeTypes enums
          - `wireServer` HostEndpointSettings — Specifies particular host endpoint settings.
            - `inVMAccessControlProfileReferenceId` string — Specifies the reference to the InVMAccessControlProfileVersion resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}.
            - `mode` 'Audit' | 'Enforce' — HostEndpointSettingsModeTypes enums
        - `securityType` 'trustedLaunch' | 'confidentialvm' — Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings.
        - `uefiSettings` BatchUefiSettings — Specifies the security settings like secure boot and vTPM used while creating the virtual machine.
          - `secureBootEnabled` boolean — Specifies whether secure boot should be enabled on the virtual machine.
          - `vTpmEnabled` boolean — Specifies whether vTPM should be enabled on the virtual machine.
      - `serviceArtifactReference` ServiceArtifactReference — Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version.
        - `id` string, required — The service artifact reference id of ServiceArtifactReference. The service artifact reference id in the form of /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}
    - `resizeTimeout` string, duration — The timeout for allocation of Compute Nodes to the Pool. This is the timeout for the most recent resize operation. (The initial sizing when the Pool is created counts as a resize.) The default value is 15 minutes. The time duration is specified in ISO 8601 format.
    - `resizeErrors` ResizeError[] — A list of errors encountered while performing the last resize on the Pool. This property is set only if one or more errors occurred during the last Pool resize, and only when the Pool allocationState is Steady.
      - `code` string — An identifier for the Pool resize error. Codes are invariant and are intended to be consumed programmatically.
      - `message` string — A message describing the Pool resize error, intended to be suitable for display in a user interface.
      - `values` NameValuePair[] — A list of additional error details related to the Pool resize error.
        - `name` string — The name in the name-value pair.
        - `value` string — The value in the name-value pair.
    - `currentDedicatedNodes` integer, required — The number of dedicated Compute Nodes currently in the Pool.
    - `currentLowPriorityNodes` integer, required — The number of Spot/Low-priority Compute Nodes currently in the Pool. Spot/Low-priority Compute Nodes which have been preempted are included in this count.
    - `targetDedicatedNodes` integer — The desired number of dedicated Compute Nodes in the Pool.
    - `targetLowPriorityNodes` integer — The desired number of Spot/Low-priority Compute Nodes in the Pool.
    - `enableAutoScale` boolean — 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 property is required and the Pool automatically resizes according to the formula. The default value is false.
    - `autoScaleFormula` string — A formula for the desired number of Compute Nodes in the Pool. This property is set only if the Pool automatically scales, i.e. enableAutoScale is true.
    - `autoScaleEvaluationInterval` string, duration — The time interval at which to automatically adjust the Pool size according to the autoscale formula. This property is set only if the Pool automatically scales, i.e. enableAutoScale is true. The time duration is specified in ISO 8601 format.
    - `autoScaleRun` AutoScaleRun — The results and errors from an execution of a Pool autoscale formula.
      - `timestamp` string, date-time, required — The time at which the autoscale formula was last evaluated.
      - `results` string — The final values of all variables used in the evaluation of the autoscale formula. Each variable value is returned in the form $variable=value, and variables are separated by semicolons.
      - `error` AutoScaleRunError — An error that occurred when executing or evaluating a Pool autoscale formula.
        - `code` string — An identifier for the autoscale error. Codes are invariant and are intended to be consumed programmatically.
        - `message` string — A message describing the autoscale error, intended to be suitable for display in a user interface.
        - `values` NameValuePair[] — A list of additional error details related to the autoscale error.
          - `name` string — The name in the name-value pair.
          - `value` string — The value in the name-value pair.
    - `enableInterNodeCommunication` boolean — 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.
    - `networkConfiguration` NetworkConfiguration — The network configuration for a Pool.
      - `subnetId` string — The ARM resource identifier of the virtual network subnet which the Compute Nodes of the Pool will join. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes in the Pool. If the subnet doesn't have enough free IP addresses, the Pool will partially allocate Nodes and a resize error will occur. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet. The specified subnet must allow communication from the Azure Batch service to be able to schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. Only ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication, including ports 29876 and 29877. Also enable outbound connections to Azure Storage on port 443. For more details see: https://learn.microsoft.com/azure/batch/nodes-and-pools#virtual-network-vnet-and-firewall-configuration
      - `dynamicVNetAssignmentScope` 'none' | 'job' — DynamicVNetAssignmentScope enums
      - `endpointConfiguration` BatchPoolEndpointConfiguration — The endpoint configuration for a Pool.
        - `inboundNATPools` BatchInboundNatPool[], required — A list of inbound NAT Pools that can be used to address specific ports on an individual Compute Node externally. The maximum number of inbound NAT Pools per Batch Pool is 5. If the maximum number of inbound NAT Pools is exceeded the request fails with HTTP status code 400. This cannot be specified if the IPAddressProvisioningType is NoPublicIPAddresses.
          - `name` string, required — The name of the endpoint. The name must be unique within a Batch Pool, can contain letters, numbers, underscores, periods, and hyphens. Names must start with a letter or number, must end with a letter, number, or underscore, and cannot exceed 77 characters. If any invalid values are provided the request fails with HTTP status code 400.
          - `protocol` 'tcp' | 'udp', required — InboundEndpointProtocol enums
          - `backendPort` integer, required — The port number on the Compute Node. This must be unique within a Batch Pool. Acceptable values are between 1 and 65535 except for 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400.
          - `frontendPortRangeStart` integer, required — The first port number in the range of external ports that will be used to provide inbound access to the backendPort on individual Compute Nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a Pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400.
          - `frontendPortRangeEnd` integer, required — The last port number in the range of external ports that will be used to provide inbound access to the backendPort on individual Compute Nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a Pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400.
          - `networkSecurityGroupRules` NetworkSecurityGroupRule[] — A list of network security group rules that will be applied to the endpoint. The maximum number of rules that can be specified across all the endpoints on a Batch Pool is 25. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. If the maximum number of network security group rules is exceeded the request fails with HTTP status code 400.
            - `priority` integer, required — The priority for this rule. Priorities within a Pool must be unique and are evaluated in order of priority. The lower the number the higher the priority. For example, rules could be specified with order numbers of 150, 250, and 350. The rule with the order number of 150 takes precedence over the rule that has an order of 250. Allowed priorities are 150 to 4096. If any reserved or duplicate values are provided the request fails with HTTP status code 400.
            - `access` 'allow' | 'deny', required — NetworkSecurityGroupRuleAccess enums
            - `sourceAddressPrefix` string, required — The source address prefix or tag to match for the rule. Valid values are a single IP address (i.e. 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If any other values are provided the request fails with HTTP status code 400.
            - `sourcePortRanges` string[] — The source port ranges to match for the rule. Valid values are '*' (for all ports 0 - 65535), a specific port (i.e. 22), or a port range (i.e. 100-200). The ports must be in the range of 0 to 65535. Each entry in this collection must not overlap any other entry (either a range or an individual port). If any other values are provided the request fails with HTTP status code 400. The default value is '*'.
      - `publicIPAddressConfiguration` BatchPublicIpAddressConfiguration — The public IP Address configuration of the networking configuration of a Pool.
        - `provision` 'batchmanaged' | 'usermanaged' | 'nopublicipaddresses' — IPAddressProvisioningType enums
        - `ipFamilies` IPFamily[] — The IP families used to specify IP versions available to the pool. IP families are used to determine single-stack or dual-stack pools. For single-stack, the expected value is IPv4. For dual-stack, the expected values are IPv4 and IPv6.
        - `ipAddressIds` string[] — The list of public IPs which the Batch service will use when provisioning Compute Nodes. The number of IPs specified here limits the maximum size of the Pool - 100 dedicated nodes or 100 Spot/Low-priority nodes can be allocated for each public IP. For example, a pool needing 250 dedicated VMs would need at least 3 public IPs specified. Each element of this collection is of the form: /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}.
        - `ipTags` IPTag[] — A list of IP tags associated with the public IP addresses of the Pool. IP tags are used to categorize and filter public IP addresses for billing and management purposes.
          - `ipTagType` string — The IP Tag type. Example: FirstPartyUsage.
          - `tag` string — The value of the IP tag associated with the public IP. Example: SQL.
      - `enableAcceleratedNetworking` boolean — 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.
    - `startTask` BatchStartTask — Batch will retry Tasks when a recovery operation is triggered on a Node. Examples of recovery operations include (but are not limited to) when an unhealthy Node is rebooted or a Compute Node disappeared due to host failure. Retries due to recovery operations are independent of and are not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal retry due to a recovery operation may occur. Because of this, all Tasks should be idempotent. This means Tasks need to tolerate being interrupted and restarted without causing any corruption or duplicate data. The best practice for long running Tasks is to use some form of checkpointing. In some cases the StartTask may be re-run even though the Compute Node was not rebooted. Special care should be taken to avoid StartTasks which create breakaway process or install/launch services from the StartTask working directory, as this will block Batch from being able to re-run the StartTask.
      - `commandLine` string, required — The command line of the StartTask. 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://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables).
      - `containerSettings` BatchTaskContainerSettings — The container settings for a Task.
        - `containerRunOptions` string — Additional options to the container create command. These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the Batch Service.
        - `imageName` string, required — The Image to use to create the container in which the Task will run. This is the full Image reference, as would be specified to "docker pull". If no tag is provided as part of the Image name, the tag ":latest" is used as a default.
        - `registry` ContainerRegistryReference — A private container registry.
          - `username` string — The user name to log into the registry server.
          - `password` string, password — The password to log into the registry server.
          - `registryServer` string, uri — The registry URL. If omitted, the default is "docker.io".
          - `identityReference` BatchNodeIdentityReference — The reference to a user assigned identity associated with the Batch pool which a compute node will use.
            - `resourceId` string, arm-id — The ARM resource id of the user assigned identity.
        - `workingDirectory` 'taskWorkingDirectory' | 'containerImageDefault' — ContainerWorkingDirectory enums
        - `containerHostBatchBindMounts` ContainerHostBatchBindMountEntry[] — The paths you want to mounted to container task. If this array is null or be not present, container task will mount entire temporary disk drive in windows (or AZ_BATCH_NODE_ROOT_DIR in Linux). It won't' mount any data paths into container if this array is set as empty.
          - `source` 'Shared' | 'Startup' | 'VfsMounts' | 'Task' | 'JobPrep' | 'Applications' — The paths which will be mounted to container task's container.
          - `isReadOnly` boolean — Mount this source path as read-only mode or not. Default value is false (read/write mode). For Linux, if you mount this path as a read/write mode, this does not mean that all users in container have the read/write access for the path, it depends on the access in host VM. If this path is mounted read-only, all users within the container will not be able to modify the path.
      - `resourceFiles` ResourceFile[] — A list of files that the Batch service will download to the Compute Node before running the command line. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. Files listed under this element are located in the Task's working directory.
        - `autoStorageContainerName` string — The storage container name in the auto storage Account. The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified.
        - `storageContainerUrl` string, uri — The URL of the blob container within Azure Blob Storage. The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. This URL must be readable and listable from compute nodes. There are three ways to get such a URL for a container in Azure storage: include a Shared Access Signature (SAS) granting read and list permissions on the container, use a managed identity with read and list permissions, or set the ACL for the container to allow public access.
        - `httpUrl` string, uri — The URL of the file to download. The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. If the URL points to Azure Blob Storage, it must be readable from compute nodes. There are three ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read permissions on the blob, use a managed identity with read permission, or set the ACL for the blob or its container to allow public access.
        - `blobPrefix` string — The blob prefix to use when downloading blobs from an Azure Storage container. Only the blobs whose names begin with the specified prefix will be downloaded. The property is valid only when autoStorageContainerName or storageContainerUrl is used. This prefix can be a partial filename or a subdirectory. If a prefix is not specified, all the files in the container will be downloaded.
        - `filePath` string — The location on the Compute Node to which to download the file(s), relative to the Task's working directory. If the httpUrl property is specified, the filePath is required and describes the path which the file will be downloaded to, including the filename. Otherwise, if the autoStorageContainerName or storageContainerUrl property is specified, filePath is optional and is the directory to download the files to. In the case where filePath is used as a directory, any directory structure already associated with the input data will be retained in full and appended to the specified filePath directory. The specified relative path cannot break out of the Task's working directory (for example by using '..').
        - `fileMode` string — The file permission mode attribute in octal format. This property applies only to files being downloaded to Linux Compute Nodes. It will be ignored if it is specified for a resourceFile which will be downloaded to a Windows Compute Node. If this property is not specified for a Linux Compute Node, then a default value of 0770 is applied to the file.
        - `identityReference` BatchNodeIdentityReference — The reference to a user assigned identity associated with the Batch pool which a compute node will use.
          - `resourceId` string, arm-id — The ARM resource id of the user assigned identity.
      - `environmentSettings` EnvironmentSetting[] — A list of environment variable settings for the StartTask.
        - `name` string, required — The name of the environment variable.
        - `value` string — The value of the environment variable.
      - `userIdentity` UserIdentity — The definition of the user identity under which the Task is run. Specify either the userName or autoUser property, but not both.
        - `username` string — The name of the user identity under which the Task is run. The userName and autoUser properties are mutually exclusive; you must specify one but not both.
        - `autoUser` AutoUserSpecification — Specifies the options for the auto user that runs an Azure Batch Task.
          - `scope` 'task' | 'pool' — AutoUserScope enums
          - `elevationLevel` 'nonadmin' | 'admin' — ElevationLevel enums
      - `maxTaskRetryCount` integer — 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).
      - `waitForSuccess` boolean — 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.
    - `applicationPackageReferences` BatchApplicationPackageReference[] — The list of Packages to be installed on each Compute Node in the Pool. Changes to Package references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Package references on any given Pool.
      - `applicationId` string, required — The ID of the application to deploy. When creating a pool, the package's application ID must be fully qualified (/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}).
      - `version` string — The version of the application to deploy. If omitted, the default version is deployed. If this is omitted on a Pool, and no default version is specified for this application, the request fails with the error code InvalidApplicationPackageReferences and HTTP status code 409. If this is omitted on a Task, and no default version is specified for this application, the Task fails with a pre-processing error.
    - `taskSlotsPerNode` integer — 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.
    - `taskSchedulingPolicy` BatchTaskSchedulingPolicy — Specifies how Tasks should be distributed across Compute Nodes.
      - `jobDefaultOrder` 'none' | 'creationtime' — The order for scheduling tasks from different jobs with the same priority. If not specified, the default is none.
      - `nodeFillType` 'spread' | 'pack', required — BatchNodeFillType enums
    - `userAccounts` UserAccount[] — The list of user Accounts to be created on each Compute Node in the Pool.
      - `name` string, required — The name of the user Account. Names can contain any Unicode characters up to a maximum length of 20.
      - `password` string, password, required — The password for the user Account.
      - `elevationLevel` 'nonadmin' | 'admin' — ElevationLevel enums
      - `linuxUserConfiguration` LinuxUserConfiguration — Properties used to create a user Account on a Linux Compute Node.
        - `uid` integer — The user ID of the user Account. The uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks the uid.
        - `gid` integer — The group ID for the user Account. The uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks the gid.
        - `sshPrivateKey` string, password — The SSH private key for the user Account. The private key must not be password protected. The private key is used to automatically configure asymmetric-key based authentication for SSH between Compute Nodes in a Linux Pool when the Pool's enableInterNodeCommunication property is true (it is ignored if enableInterNodeCommunication is false). It does this by placing the key pair into the user's .ssh directory. If not specified, password-less SSH is not configured between Compute Nodes (no modification of the user's .ssh directory is done).
      - `windowsUserConfiguration` WindowsUserConfiguration — Properties used to create a user Account on a Windows Compute Node.
        - `loginMode` 'batch' | 'interactive' — LoginMode enums
    - `metadata` BatchMetadataItem[] — A list of name-value pairs associated with the Pool as metadata.
      - `name` string, required — The name of the metadata item.
      - `value` string, required — The value of the metadata item.
    - `stats` BatchPoolStatistics — Contains utilization and resource usage statistics for the lifetime of a Pool.
      - `url` string, uri, required — The URL for the statistics.
      - `startTime` string, date-time, required — The start time of the time range covered by the statistics.
      - `lastUpdateTime` string, date-time, required — The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime.
      - `usageStats` BatchPoolUsageStatistics — Statistics related to Pool usage information.
        - `startTime` string, date-time, required — The start time of the time range covered by the statistics.
        - `lastUpdateTime` string, date-time, required — The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime.
        - `dedicatedCoreTime` string, duration, required — The aggregated wall-clock time of the dedicated Compute Node cores being part of the Pool. The time duration is specified in ISO 8601 format.
      - `resourceStats` BatchPoolResourceStatistics — Statistics related to resource consumption by Compute Nodes in a Pool.
        - `startTime` string, date-time, required — The start time of the time range covered by the statistics.
        - `lastUpdateTime` string, date-time, required — The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime.
        - `avgCPUPercentage` number, float, required — The average CPU usage across all Compute Nodes in the Pool (percentage per node).
        - `avgMemoryGiB` number, float, required — The average memory usage in GiB across all Compute Nodes in the Pool.
        - `peakMemoryGiB` number, float, required — The peak memory usage in GiB across all Compute Nodes in the Pool.
        - `avgDiskGiB` number, float, required — The average used disk space in GiB across all Compute Nodes in the Pool.
        - `peakDiskGiB` number, float, required — The peak used disk space in GiB across all Compute Nodes in the Pool.
        - `diskReadIOps` string, int64, required — The total number of disk read operations across all Compute Nodes in the Pool.
        - `diskWriteIOps` string, int64, required — The total number of disk write operations across all Compute Nodes in the Pool.
        - `diskReadGiB` number, float, required — The total amount of data in GiB of disk reads across all Compute Nodes in the Pool.
        - `diskWriteGiB` number, float, required — The total amount of data in GiB of disk writes across all Compute Nodes in the Pool.
        - `networkReadGiB` number, float, required — The total amount of data in GiB of network reads across all Compute Nodes in the Pool.
        - `networkWriteGiB` number, float, required — The total amount of data in GiB of network writes across all Compute Nodes in the Pool.
    - `mountConfiguration` MountConfiguration[] — Mount storage using specified file system for the entire lifetime of the pool. Mount the storage using Azure fileshare, NFS, CIFS or Blobfuse based file system.
      - `azureBlobFileSystemConfiguration` AzureBlobFileSystemConfiguration — Information used to connect to an Azure Storage Container using Blobfuse.
        - `accountName` string, required — The Azure Storage Account name.
        - `containerName` string, required — The Azure Blob Storage Container name.
        - `accountKey` string, password — The Azure Storage Account key. This property is mutually exclusive with both sasKey and identity; exactly one must be specified.
        - `sasKey` string, password — The Azure Storage SAS token. This property is mutually exclusive with both accountKey and identity; exactly one must be specified.
        - `blobfuseOptions` string — Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux.
        - `relativeMountPath` string, required — The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable.
        - `identityReference` BatchNodeIdentityReference — The reference to a user assigned identity associated with the Batch pool which a compute node will use.
          - `resourceId` string, arm-id — The ARM resource id of the user assigned identity.
      - `nfsMountConfiguration` NfsMountConfiguration — Information used to connect to an NFS file system.
        - `source` string, required — The URI of the file system to mount.
        - `relativeMountPath` string, required — The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable.
        - `mountOptions` string — Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux.
      - `cifsMountConfiguration` CifsMountConfiguration — Information used to connect to a CIFS file system.
        - `username` string, required — The user to use for authentication against the CIFS file system.
        - `source` string, required — The URI of the file system to mount.
        - `relativeMountPath` string, required — The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable.
        - `mountOptions` string — Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux.
        - `password` string, password, required — The password to use for authentication against the CIFS file system.
      - `azureFileShareConfiguration` AzureFileShareConfiguration — Information used to connect to an Azure Fileshare.
        - `accountName` string, required — The Azure Storage account name.
        - `accountKey` string, password, required — The Azure Storage account key.
        - `azureFileUrl` string, uri, required — The Azure Files URL. This is of the form 'https://{account}.file.core.windows.net/'.
        - `relativeMountPath` string, required — The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable.
        - `mountOptions` string — Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux.
    - `identity` BatchPoolIdentity — The identity of the Batch pool, if configured.
      - `type` 'UserAssigned' | 'None', required — BatchPoolIdentityType enums
      - `userAssignedIdentities` BatchUserAssignedIdentity[] — The list of user identities associated with the Batch account. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
        - `resourceId` string, arm-id, required — The ARM resource id of the user assigned identity.
        - `clientId` string — The client id of the user assigned identity.
        - `principalId` string — The principal id of the user assigned identity.
    - `upgradePolicy` UpgradePolicy — Describes an upgrade policy - automatic, manual, or rolling.
      - `mode` 'automatic' | 'manual' | 'rolling', required — UpgradeMode enums
      - `automaticOSUpgradePolicy` AutomaticOsUpgradePolicy — The configuration parameters used for performing automatic OS upgrade.
        - `disableAutomaticRollback` boolean — Whether OS image rollback feature should be disabled.
        - `enableAutomaticOSUpgrade` boolean — 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. <br /><br /> If this is set to true for Windows based pools, [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/rest/api/batchservice/pools/create-pool#windowsconfiguration) cannot be set to true.
        - `useRollingUpgradePolicy` boolean — 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.
        - `osRollingUpgradeDeferral` boolean — Defer OS upgrades on the TVMs if they are running tasks.
      - `rollingUpgradePolicy` RollingUpgradePolicy — The configuration parameters used while performing a rolling upgrade.
        - `enableCrossZoneUpgrade` boolean — 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.
        - `maxBatchInstancePercent` integer — 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.
        - `maxUnhealthyInstancePercent` integer — 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.
        - `maxUnhealthyUpgradedInstancePercent` integer — 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.
        - `pauseTimeBetweenBatches` string, duration — The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration is specified in ISO 8601 format.
        - `prioritizeUnhealthyInstances` boolean — Upgrade all unhealthy instances in a scale set before any healthy instances.
        - `rollbackFailedInstancesOnPolicyBreach` boolean — Rollback failed instances to previous model if the Rolling Upgrade policy is violated.
  - `odata.nextLink` string, uri — The URL to get the next set of results.

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/azure/apis/batch-batch.md) · [All operations](https://skmtc.net/azure/apis/batch-batch/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/batch-batch/versions/8427acd8fd77/schema)
