---
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. It is common to use a GUID for the id.
    - `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 targetDedicated 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' — 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' — 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. 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' — 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.
    - `resizeError` ResizeError
      - `code` string
      - `message` string
      - `values` NameValuePair[]
        - `name` string
        - `value` string
    - `currentDedicated` integer
    - `targetDedicated` integer — This property is not set if enableAutoScale is true. It is required if enableAutoScale is false.
    - `enableAutoScale` boolean — If true, the autoScaleFormula property must be set. If false, the targetDedicated property must be set.
    - `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. This property can only be specified for pools created with a cloudServiceConfiguration.
    - `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[]
        - `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' — 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' — 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 scheduling error detail. If false, the Batch service will not wait for the start task to complete. In this case, other tasks can start executing on the compute node while the start task is still running; and even if the start task fails, new tasks will continue to be scheduled on the node. The default is false.
    - `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' | 'unmapped' — 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 — The default value is My. This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference).
      - `visibility` string[] — The default is all accounts.
    - `applicationPackageReferences` ApplicationPackageReference[]
      - `applicationId` string, required
      - `version` string — If this is omitted, and no default version is specified for this application, the request fails with the error code InvalidApplicationPackageReferences. If you are calling the REST API directly, the HTTP status code is 409.
    - `maxTasksPerNode` integer
    - `taskSchedulingPolicy` TaskSchedulingPolicy
      - `nodeFillType` 'spread' | 'pack' | 'unmapped', required
    - `userAccounts` UserAccount[]
      - `name` string, required
      - `password` string, required
      - `elevationLevel` 'nonAdmin' | 'admin' — 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.
      - `sshPrivateKey` string — The SSH private key establishes password-less SSH between nodes in a Linux pool when the pool's enableInterNodeCommunication property is true. This property will be ignored in a Windows pool.
    - `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/6029498afb63/schema)
