---
title: "GET /pools/{poolId}"
method: GET
path: "/pools/{poolId}"
tags: ["Pools"]
---

# GET /pools/{poolId}

`GET /pools/{poolId}`

Gets information about the specified pool.

## Path parameters

- `poolId` string, required

## Query parameters

- `$select` string
- `$expand` string
- `timeout` integer
- `api-version` string, required

## Headers

- `client-request-id` string, uuid
- `return-client-request-id` boolean
- `ocp-date` string, date-time-rfc1123
- `If-Match` string
- `If-None-Match` string
- `If-Modified-Since` string, date-time-rfc1123
- `If-Unmodified-Since` string, date-time-rfc1123

## Response `200`

A response containing the pool.

- CloudPool
  - `id` string — 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
  - `eTag` string — This is an opaque string. You can use it to detect whether the pool has changed between requests. In particular, you can be pass the ETag when updating a pool to specify that your changes should take effect only if nobody else has modified the pool in the meantime.
  - `lastModified` string, date-time — 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
  - `state` 'active' | 'deleting' | 'upgrading'
  - `stateTransitionTime` string, date-time
  - `allocationState` 'steady' | 'resizing' | 'stopping'
  - `allocationStateTransitionTime` string, date-time
  - `vmSize` string — For information about available sizes of virtual machines in pools, see Choose a VM size for compute nodes in an Azure Batch pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes).
  - `cloudServiceConfiguration` CloudServiceConfiguration
    - `osFamily` string, 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. For more information, see Azure Guest OS Releases (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases).
    - `targetOSVersion` string — The default value is * which specifies the latest operating system version for the specified OS family.
    - `currentOSVersion` string — This may differ from targetOSVersion if the pool state is Upgrading. In this case some virtual machines may be on the targetOSVersion and some may be on the currentOSVersion during the upgrade process. Once all virtual machines have upgraded, currentOSVersion is updated to be the same as targetOSVersion.
  - `virtualMachineConfiguration` VirtualMachineConfiguration
    - `imageReference` ImageReference, required
      - `publisher` string — For example, Canonical or MicrosoftWindowsServer.
      - `offer` string — For example, UbuntuServer or WindowsServer.
      - `sku` string — For example, 14.04.0-LTS or 2012-R2-Datacenter.
      - `version` string — A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'.
      - `virtualMachineImageId` string — This property is mutually exclusive with other ImageReference properties. The virtual machine image must be in the same region and subscription as the Azure Batch account. For information about the firewall settings for the Batch node agent to communicate with the Batch service see https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration.
    - `osDisk` OSDisk
      - `caching` 'none' | 'readonly' | 'readwrite' — The default value for caching is none. For information about the caching options see: https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/.
    - `nodeAgentSKUId` string, required — 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.
    - `windowsConfiguration` WindowsConfiguration
      - `enableAutomaticUpdates` boolean — If omitted, the default value is true.
    - `dataDisks` DataDisk[] — 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 node gets its own disk (the disk is not a file share). Existing disks cannot be attached, each attached disk is empty. When the 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://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux and https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine.
      - `lun` integer, required — The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun.
      - `caching` 'none' | 'readonly' | 'readwrite' — The default value for caching is none. For information about the caching options see: https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/.
      - `diskSizeGB` integer, required
      - `storageAccountType` 'standard_lrs' | 'premium_lrs'
    - `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 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` ContainerConfiguration
      - `type` 'dockerCompatible', required
      - `containerImageNames` string[] — 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` ContainerRegistry[] — If any images must be downloaded from a private registry which requires credentials, then those credentials must be provided here.
        - `registryServer` string — If omitted, the default is "docker.io".
        - `username` string, required
        - `password` string, required
  - `resizeTimeout` string, duration — 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.
  - `resizeErrors` ResizeError[] — 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
    - `message` string
    - `values` NameValuePair[]
      - `name` string
      - `value` string
  - `currentDedicatedNodes` integer
  - `currentLowPriorityNodes` integer — Low-priority compute nodes which have been preempted are included in this count.
  - `targetDedicatedNodes` integer
  - `targetLowPriorityNodes` integer
  - `enableAutoScale` boolean — If false, at least one of targetDedicateNodes 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 — This property is set only if the pool automatically scales, i.e. enableAutoScale is true.
  - `autoScaleEvaluationInterval` string, duration — This property is set only if the pool automatically scales, i.e. enableAutoScale is true.
  - `autoScaleRun` AutoScaleRun
    - `timestamp` string, date-time, required
    - `results` string — Each variable value is returned in the form $variable=value, and variables are separated by semicolons.
    - `error` AutoScaleRunError
      - `code` string
      - `message` string
      - `values` NameValuePair[]
        - `name` string
        - `value` string
  - `enableInterNodeCommunication` boolean — This imposes restrictions on which nodes can be assigned to the pool. Specifying this value can reduce the chance of the requested number of nodes to be allocated in the pool.
  - `networkConfiguration` NetworkConfiguration — The network configuration for a pool.
    - `subnetId` string — 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 nodes in the pool. If the subnet doesn't have enough free IP addresses, the pool will partially allocate compute 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 compute nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the compute nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the compute nodes to unusable. For pools created with virtualMachineConfiguration only ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported, but for pools created with cloudServiceConfiguration both ARM and classic virtual networks 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. For pools created with a virtual machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. For pools created with a cloud service configuration, enable ports 10100, 20100, and 30100. Also enable outbound connections to Azure Storage on port 443. For more details see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration
    - `endpointConfiguration` PoolEndpointConfiguration
      - `inboundNATPools` InboundNATPool[], required — 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.
        - `name` string, required — 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
        - `backendPort` integer, required — This must be unique within a Batch pool. Acceptable values are between 1 and 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400.
        - `frontendPortRangeStart` integer, required — 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 — 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[] — 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 — 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 3500. If any reserved or duplicate values are provided the request fails with HTTP status code 400.
          - `access` 'allow' | 'deny', required
          - `sourceAddressPrefix` string, required — 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.
  - `startTask` StartTask — Batch will retry tasks when a recovery operation is triggered on a compute node. Examples of recovery operations include (but are not limited to) when an unhealthy compute 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.
    - `commandLine` string, 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).
    - `containerSettings` TaskContainerSettings
      - `containerRunOptions` string — These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the Batch Service.
      - `imageName` string, required — 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` ContainerRegistry
        - `registryServer` string — If omitted, the default is "docker.io".
        - `username` string, required
        - `password` string, required
    - `resourceFiles` ResourceFile[] — Files listed under this element are located in the task's working directory.
      - `blobSource` string, required — This URL must be readable using anonymous access; that is, the Batch service does not present any credentials when downloading the blob. There are two ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read permissions on the blob, or set the ACL for the blob or its container to allow public access.
      - `filePath` string, required
      - `fileMode` string — 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 node. If this property is not specified for a Linux node, then a default value of 0770 is applied to the file.
    - `environmentSettings` EnvironmentSetting[]
      - `name` string, required
      - `value` string
    - `userIdentity` UserIdentity — Specify either the userName or autoUser property, but not both. On CloudServiceConfiguration pools, this user is logged in with the INTERACTIVE flag. On Windows VirtualMachineConfiguration pools, this user is logged in with the BATCH flag.
      - `username` string — The userName and autoUser properties are mutually exclusive; you must specify one but not both.
      - `autoUser` AutoUserSpecification
        - `scope` 'task' | 'pool' — The default value is task.
        - `elevationLevel` 'nonadmin' | 'admin'
    - `maxTaskRetryCount` integer — 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.
    - `waitForSuccess` boolean — 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 failure info details. 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.
  - `certificateReferences` CertificateReference[] — For Windows compute 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.
    - `thumbprint` string, required
    - `thumbprintAlgorithm` string, required
    - `storeLocation` 'currentuser' | 'localmachine' — The default value is currentuser. This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). 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.
    - `storeName` string — This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). Common store names include: My, Root, CA, Trust, Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, AddressBook, but any custom store name can also be used. The default value is My.
    - `visibility` string[] — You can specify more than one visibility in this collection. The default is all accounts.
  - `applicationPackageReferences` ApplicationPackageReference[]
    - `applicationId` string, required
    - `version` string — 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.
  - `applicationLicenses` string[] — 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.
  - `maxTasksPerNode` integer
  - `taskSchedulingPolicy` TaskSchedulingPolicy
    - `nodeFillType` 'spread' | 'pack', required
  - `userAccounts` UserAccount[]
    - `name` string, required
    - `password` string, required
    - `elevationLevel` 'nonadmin' | 'admin'
    - `linuxUserConfiguration` LinuxUserConfiguration
      - `uid` integer — 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 uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks the gid.
      - `sshPrivateKey` string — The private key must not be password protected. The private key is used to automatically configure asymmetric-key based authentication for SSH between 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 nodes (no modification of the user's .ssh directory is done).
  - `metadata` MetadataItem[]
    - `name` string, required
    - `value` string, required
  - `stats` PoolStatistics
    - `url` string, required
    - `startTime` string, date-time, required
    - `lastUpdateTime` string, date-time, required
    - `usageStats` UsageStatistics
      - `startTime` string, date-time, required
      - `lastUpdateTime` string, date-time, required
      - `dedicatedCoreTime` string, duration, required
    - `resourceStats` ResourceStatistics
      - `startTime` string, date-time, required
      - `lastUpdateTime` string, date-time, required
      - `avgCPUPercentage` number, double, required
      - `avgMemoryGiB` number, double, required
      - `peakMemoryGiB` number, double, required
      - `avgDiskGiB` number, double, required
      - `peakDiskGiB` number, double, required
      - `diskReadIOps` integer, required
      - `diskWriteIOps` integer, required
      - `diskReadGiB` number, double, required
      - `diskWriteGiB` number, double, required
      - `networkReadGiB` number, double, required
      - `networkWriteGiB` number, double, required

## Other responses

- `default` — The error from the Batch service.

---

[API](https://skmtc.net/azure/apis/batchservice-2.md) · [All operations](https://skmtc.net/azure/apis/batchservice-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/batchservice-2/revisions/dff38446805d/schema)
