---
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`

## Query parameters

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

## Headers

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

## Response `200`

A response containing the list of pools.

- CloudPoolListResult
  - `value` 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' — Values are: active - The pool is available to run tasks subject to the availability of compute nodes. deleting - The user has requested that the pool be deleted, but the delete operation has not yet completed. upgrading - The user has requested that the operating system of the pool's nodes be upgraded, but the upgrade operation has not yet completed (that is, some nodes in the pool have not yet been upgraded). While upgrading, the pool may be able to run tasks (with reduced capacity) but this is not guaranteed.
    - `stateTransitionTime` string, date-time
    - `allocationState` 'steady' | 'resizing' | 'stopping' — Values are: steady - The pool is not resizing. There are no changes to the number of nodes in the pool in progress. A pool enters this state when it is created and when no operations are being performed on the pool to change the number of dedicated nodes. resizing - The pool is resizing; that is, compute nodes are being added to or removed from the pool. stopping - The pool was resizing, but the user has requested that the resize be stopped, but the stop request has not yet been completed.
    - `allocationStateTransitionTime` string, date-time
    - `vmSize` string — For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (http://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).
    - `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
        - `publisher` string, required — For example, Canonical or MicrosoftWindowsServer.
        - `offer` string, required — For example, UbuntuServer or WindowsServer.
        - `sku` string, required — 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'.
      - `osDisk` OSDisk
        - `imageUris` string[], required — All the VHDs must be identical and must reside in an Azure Storage account within the same subscription and same region as the Batch account. For best performance, it is recommended that each VHD resides in a separate Azure Storage account. Each VHD can serve up to 20 Windows compute nodes or 40 Linux compute nodes. You must supply enough VHD URIs to satisfy the 'targetDedicated' property of the pool. If you do not supply enough VHD URIs, the pool will partially allocate compute nodes, and a resize error will occur.
        - `caching` 'none' | 'readOnly' | 'readWrite' — Values are: none - The caching mode for the disk is not enabled. readOnly - The caching mode for the disk is read only. readWrite - The caching mode for the disk is read and write. 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.
    - `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 via virtualMachineConfiguration the Batch account must have poolAllocationMode userSubscription in order to use a VNet. 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. 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. 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
      - `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.
      - `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.
        - `username` string — The userName and autoUser properties are mutually exclusive; you must specify one but not both.
        - `autoUser` AutoUserSpecification
          - `scope` 'task' | 'pool' — Values are: pool - specifies that the task runs as the common auto user account which is created on every node in a pool. task - specifies that the service should create a new user for the task. The default value is task.
          - `elevationLevel` 'nonAdmin' | 'admin' — Values are: nonAdmin - The user is a standard user without elevated access. admin - The user is a user with elevated access and operates with full Administrator permissions.
      - `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[] — Values are: starttask - The user account under which the start task is run. task - The accounts under which job tasks are run. remoteuser - The accounts under which users remotely access the node. 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' — Values are: nonAdmin - The user is a standard user without elevated access. admin - The user is a user with elevated access and operates with full Administrator permissions.
      - `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
  - `odata.nextLink` string

## Other responses

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

---

[API](https://skmtc.dev/azure/apis/batch-batch.md) · [All operations](https://skmtc.dev/azure/apis/batch-batch/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/batch-batch/revisions/c132dc281e07/schema)
