Pool - Add

Adds a pool to the specified account.
When naming pools, avoid including sensitive information such as user names or secret project names. This information may appear in telemetry logs accessible to Microsoft Support engineers.

POST {batchUrl}/pools?api-version=2018-12-01.8.0
POST {batchUrl}/pools?timeout={timeout}&api-version=2018-12-01.8.0

URI Parameters

Name In Required Type Description
batchUrl
path True
  • string

The base URL for all Azure Batch service requests.

timeout
query
  • integer
int32

The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds.

api-version
query True
  • string

Client API Version.

Request Header

Media Types: "application/json; odata=minimalmetadata"

Name Required Type Description
client-request-id
  • string
uuid

The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0.

return-client-request-id
  • boolean

Whether the server should return the client-request-id in the response.

ocp-date
  • string
date-time-rfc1123

The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly.

Request Body

Media Types: "application/json; odata=minimalmetadata"

Name Required Type Description
applicationLicenses
  • string[]

The list of application licenses the Batch service will make available on each compute node in the pool.
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.

applicationPackageReferences

The list of application packages to be installed on each compute node in the pool.
Changes to application package references affect all new compute nodes joining the pool, but do not affect compute nodes that are already in the pool until they are rebooted or reimaged. There is a maximum of 10 application package references on any given pool.

autoScaleEvaluationInterval
  • string

The time interval at which to automatically adjust the pool size according to the autoscale formula.
The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

autoScaleFormula
  • string

A formula for the desired number of compute nodes in the pool.
This property must not be specified if enableAutoScale is set to false. It is required if enableAutoScale is set to true. The formula is checked for validity before the pool is created. If the formula is not valid, the Batch service rejects the request with detailed error information. For more information about specifying this formula, see 'Automatically scale compute nodes in an Azure Batch pool' (https://azure.microsoft.com/documentation/articles/batch-automatic-scaling/).

certificateReferences

The list of certificates to be installed on each compute node in the pool.
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.

cloudServiceConfiguration

The cloud service configuration for the pool.
This property and virtualMachineConfiguration are mutually exclusive and one of the properties must be specified. This property cannot be specified if the Batch account was created with its poolAllocationMode property set to 'UserSubscription'.

displayName
  • string

The display name for the pool.
The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.

enableAutoScale
  • boolean

Whether the pool size should automatically adjust over time.
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.

enableInterNodeCommunication
  • boolean

Whether the pool permits direct communication between nodes.
Enabling inter-node communication limits the maximum size of the pool due to deployment restrictions on the nodes of the pool. This may result in the pool not reaching its desired size. The default value is false.

id True
  • string

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 pool IDs within an account that differ only by case).

maxTasksPerNode
  • integer

The maximum number of tasks that can run concurrently 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.

metadata

A list of name-value pairs associated with the pool as metadata.
The Batch service does not assign any meaning to metadata; it is solely for the use of user code.

networkConfiguration

The network configuration for the pool.
The network configuration for a pool.

resizeTimeout
  • string

The timeout for allocation of compute nodes to the pool.
This timeout applies only to manual scaling; it has no effect when enableAutoScale is set to true. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

startTask

A task specified to run on each compute node as it joins the pool.
The task runs when the node is added to the pool or when the node is restarted.

targetDedicatedNodes
  • integer

The desired number of dedicated compute nodes in the pool.
This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both.

targetLowPriorityNodes
  • integer

The desired number of low-priority compute nodes in the pool.
This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both.

taskSchedulingPolicy

How tasks are distributed across compute nodes in a pool.
If not specified, the default is spread.

userAccounts

The list of user accounts to be created on each node in the pool.

virtualMachineConfiguration

The virtual machine configuration for the pool.
This property and cloudServiceConfiguration are mutually exclusive and one of the properties must be specified.

vmSize True
  • string

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

Responses

Name Type Description
201 Created

The request to the Batch service was successful.

Headers

  • client-request-id: string
  • request-id: string
  • ETag: string
  • Last-Modified: string
  • DataServiceId: string
Other Status Codes

The error from the Batch service.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation Impersonate your user account

Authorization

Type: apiKey
In: header

Examples

Add a CloudServiceConfiguration pool
Add a VirtualMachineConfiguration pool
Add a VirtualMachineConfiguration pool with containers

Add a CloudServiceConfiguration pool

Sample Request

POST account.region.batch.azure.com/pools?api-version=2018-12-01.8.0
client-request-id: 00000000-0000-0000-0000-000000000000
ocp-date: Fri, 17 Feb 2017 00:00:00 GMT
{
  "id": "poolId",
  "vmSize": "small",
  "cloudServiceConfiguration": {
    "osFamily": "4"
  },
  "resizeTimeout": "PT15M",
  "targetDedicatedNodes": 5,
  "targetLowPriorityNodes": 0,
  "maxTasksPerNode": 3,
  "taskSchedulingPolicy": {
    "nodeFillType": "spread"
  },
  "enableAutoScale": false,
  "enableInterNodeCommunication": true,
  "metadata": [
    {
      "name": "myproperty",
      "value": "myvalue"
    }
  ]
}

Sample Response

Add a VirtualMachineConfiguration pool

Sample Request

POST account.region.batch.azure.com/pools?api-version=2018-12-01.8.0
client-request-id: 00000000-0000-0000-0000-000000000000
ocp-date: Fri, 17 Feb 2017 00:00:00 GMT
{
  "id": "pool2",
  "vmSize": "standard_a1",
  "virtualMachineConfiguration": {
    "imageReference": {
      "publisher": "Canonical",
      "offer": "UbuntuServer",
      "sku": "16.04.0-LTS"
    },
    "nodeAgentSKUId": "batch.node.ubuntu 16.04"
  },
  "resizeTimeout": "PT15M",
  "targetDedicatedNodes": 5,
  "targetLowPriorityNodes": 0,
  "maxTasksPerNode": 3,
  "taskSchedulingPolicy": {
    "nodeFillType": "spread"
  },
  "enableAutoScale": false,
  "enableInterNodeCommunication": true,
  "metadata": [
    {
      "name": "myproperty",
      "value": "myvalue"
    }
  ]
}

Sample Response

Add a VirtualMachineConfiguration pool with containers

Sample Request

POST account.region.batch.azure.com/pools?api-version=2018-12-01.8.0
client-request-id: 00000000-0000-0000-0000-000000000000
ocp-date: Fri, 17 Feb 2017 00:00:00 GMT
{
  "id": "pool2",
  "vmSize": "standard_a1",
  "virtualMachineConfiguration": {
    "imageReference": {
      "publisher": "Canonical",
      "offer": "UbuntuServer",
      "sku": "16.04.0-LTS"
    },
    "nodeAgentSKUId": "batch.node.ubuntu 16.04",
    "containerConfiguration": {
      "type": "dockerCompatible",
      "containerImageNames": [
        "busybox"
      ]
    }
  },
  "resizeTimeout": "PT15M",
  "targetDedicatedNodes": 5,
  "targetLowPriorityNodes": 0,
  "maxTasksPerNode": 3,
  "taskSchedulingPolicy": {
    "nodeFillType": "spread"
  },
  "enableAutoScale": false
}

Sample Response

Definitions

ApplicationPackageReference

A reference to an application package to be deployed to compute nodes.

AutoUserScope

The scope for the auto user

AutoUserSpecification

Specifies the parameters for the auto user that runs a task on the Batch service.

BatchError

An error response received from the Azure Batch service.

BatchErrorDetail

An item of additional information included in an Azure Batch error response.

CachingType

The type of caching to enable for the disk.

CertificateReference

A reference to a certificate to be installed on compute nodes in a pool.

CertificateStoreLocation

The location of the certificate store on the compute node into which to install the certificate.

CloudServiceConfiguration

The configuration for nodes in a pool based on the Azure Cloud Services platform.

ComputeNodeFillType

How tasks are distributed across compute nodes in a pool.

ContainerConfiguration

The configuration for container-enabled pools.

ContainerRegistry

A private container registry.

ContainerType

The container technology to be used.

DataDisk

Settings which will be used by the data disks associated to compute nodes in the pool.

DynamicVNetAssignmentScope

The scope of dynamic vnet assignment.

ElevationLevel

The elevation level of the user.

EnvironmentSetting

An environment variable to be set on a task process.

ErrorMessage

An error message received in an Azure Batch error response.

ImageReference

A reference to an Azure Virtual Machines Marketplace image or a custom Azure Virtual Machine image. To get the list of all Azure Marketplace image references verified by Azure Batch, see the 'List node agent SKUs' operation.

InboundEndpointProtocol

The protocol of the endpoint.

InboundNATPool

A inbound NAT pool that can be used to address specific ports on compute nodes in a Batch pool externally.

LinuxUserConfiguration

Properties used to create a user account on a Linux node.

LoginMode

The login mode for the user.

MetadataItem

A name-value pair associated with a Batch service resource.

NetworkConfiguration

The network configuration for a pool.

NetworkSecurityGroupRule

A network security group rule to apply to an inbound endpoint.

NetworkSecurityGroupRuleAccess

The action that should be taken for a specified IP address, subnet range or tag.

PoolAddParameter

A pool in the Azure Batch service to add.

PoolEndpointConfiguration

The endpoint configuration for a pool.

ResourceFile

A single file or multiple files to be downloaded to a compute node.

StartTask

A task which is run when a compute node joins a pool in the Azure Batch service, or when the compute node is rebooted or reimaged.

StorageAccountType

The storage account type for use in creating data disks.

TaskContainerSettings

The container settings for a task.

TaskSchedulingPolicy

Specifies how tasks should be distributed across compute nodes.

UserAccount

Properties used to create a user used to execute tasks on an Azure Batch node.

UserIdentity

The definition of the user identity under which the task is run.

VirtualMachineConfiguration

The configuration for compute nodes in a pool based on the Azure Virtual Machines infrastructure.

WindowsConfiguration

Windows operating system settings to apply to the virtual machine.

WindowsUserConfiguration

Properties used to create a user account on a Windows node.

ApplicationPackageReference

A reference to an application package to be deployed to compute nodes.

Name Type Description
applicationId
  • string

The ID of the application to deploy.

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.

AutoUserScope

The scope for the auto user

Name Type Description
pool
  • string

Specifies that the task runs as the common auto user account which is created on every node in a pool.

task
  • string

Specifies that the service should create a new user for the task.

AutoUserSpecification

Specifies the parameters for the auto user that runs a task on the Batch service.

Name Type Description
elevationLevel

The elevation level of the auto user.
The default value is nonAdmin.

scope

The scope for the auto user
The default value is task.

BatchError

An error response received from the Azure Batch service.

Name Type Description
code
  • string

An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

message

A message describing the error, intended to be suitable for display in a user interface.

values

A collection of key-value pairs containing additional details about the error.

BatchErrorDetail

An item of additional information included in an Azure Batch error response.

Name Type Description
key
  • string

An identifier specifying the meaning of the Value property.

value
  • string

The additional information included with the error response.

CachingType

The type of caching to enable for the disk.

Name Type Description
none
  • string

The caching mode for the disk is not enabled.

readonly
  • string

The caching mode for the disk is read only.

readwrite
  • string

The caching mode for the disk is read and write.

CertificateReference

A reference to a certificate to be installed on compute nodes in a pool.

Name Type Description
storeLocation

The location of the certificate store on the compute node into which to install the certificate.
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 name of the certificate store on the compute node into which to install the certificate.
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.

thumbprint
  • string

The thumbprint of the certificate.

thumbprintAlgorithm
  • string

The algorithm with which the thumbprint is associated. This must be sha1.

visibility
  • string[]

Which user accounts on the compute node should have access to the private data of the certificate.
You can specify more than one visibility in this collection. The default is all accounts.

CertificateStoreLocation

The location of the certificate store on the compute node into which to install the certificate.

Name Type Description
currentuser
  • string

Certificates should be installed to the CurrentUser certificate store.

localmachine
  • string

Certificates should be installed to the LocalMachine certificate store.

CloudServiceConfiguration

The configuration for nodes in a pool based on the Azure Cloud Services platform.

Name Type Description
osFamily
  • string

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

osVersion
  • string

The Azure Guest OS version to be installed on the virtual machines in the pool.
The default value is * which specifies the latest operating system version for the specified OS family.

ComputeNodeFillType

How tasks are distributed across compute nodes in a pool.

Name Type Description
pack
  • string

As many tasks as possible (maxTasksPerNode) should be assigned to each node in the pool before any tasks are assigned to the next node in the pool.

spread
  • string

Tasks should be assigned evenly across all nodes in the pool.

ContainerConfiguration

The configuration for container-enabled pools.

Name Type Description
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

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.

type

The container technology to be used.

ContainerRegistry

A private container registry.

Name Type Description
password
  • string

The password to log into the registry server.

registryServer
  • string

The registry URL.
If omitted, the default is "docker.io".

username
  • string

The user name to log into the registry server.

ContainerType

The container technology to be used.

Name Type Description
dockerCompatible
  • string

A Docker compatible container technology will be used to launch the containers.

DataDisk

Settings which will be used by the data disks associated to compute nodes in the pool.

Name Type Description
caching

The type of caching to be enabled for the data disks.
The default value for caching is readwrite. 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

The initial disk size in gigabytes.

lun
  • integer

The logical unit number.
The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun.

storageAccountType

The storage account type to be used for the data disk.
If omitted, the default is "standard_lrs".

DynamicVNetAssignmentScope

The scope of dynamic vnet assignment.

Name Type Description
job
  • string

Dynamic VNet assignment is done per-job.

none
  • string

No dynamic VNet assignment is enabled.

ElevationLevel

The elevation level of the user.

Name Type Description
admin
  • string

The user is a user with elevated access and operates with full Administrator permissions.

nonadmin
  • string

The user is a standard user without elevated access.

EnvironmentSetting

An environment variable to be set on a task process.

Name Type Description
name
  • string

The name of the environment variable.

value
  • string

The value of the environment variable.

ErrorMessage

An error message received in an Azure Batch error response.

Name Type Description
lang
  • string

The language code of the error message

value
  • string

The text of the message.

ImageReference

A reference to an Azure Virtual Machines Marketplace image or a custom Azure Virtual Machine image. To get the list of all Azure Marketplace image references verified by Azure Batch, see the 'List node agent SKUs' operation.

Name Type Description
offer
  • string

The offer type of the Azure Virtual Machines Marketplace image.
For example, UbuntuServer or WindowsServer.

publisher
  • string

The publisher of the Azure Virtual Machines Marketplace image.
For example, Canonical or MicrosoftWindowsServer.

sku
  • string

The SKU of the Azure Virtual Machines Marketplace image.
For example, 14.04.0-LTS or 2012-R2-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

The ARM resource identifier of the virtual machine image. Computes nodes of the pool will be created using this custom image. This is of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}
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 more details, see https://docs.microsoft.com/azure/batch/batch-custom-images.

InboundEndpointProtocol

The protocol of the endpoint.

Name Type Description
tcp
  • string

Use TCP for the endpoint.

udp
  • string

Use UDP for the endpoint.

InboundNATPool

A inbound NAT pool that can be used to address specific ports on compute nodes in a Batch pool externally.

Name Type Description
backendPort
  • integer

The port number on the compute node.
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.

frontendPortRangeEnd
  • integer

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.

frontendPortRangeStart
  • integer

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.

name
  • string

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.

networkSecurityGroupRules

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.

protocol

The protocol of the endpoint.

LinuxUserConfiguration

Properties used to create a user account on a Linux node.

Name Type Description
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

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

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.

LoginMode

The login mode for the user.

Name Type Description
batch
  • string

The LOGON32_LOGON_BATCH Win32 login mode. The batch login mode is recommended for long running parallel processes.

interactive
  • string

The LOGON32_LOGON_INTERACTIVE Win32 login mode. UAC is enabled on Windows VirtualMachineConfiguration pools. If this option is used with an elevated user identity in a Windows VirtualMachineConfiguration pool, the user session will not be elevated unless the application executed by the task command line is configured to always require administrative privilege or to always require maximum privilege.

MetadataItem

A name-value pair associated with a Batch service resource.

Name Type Description
name
  • string

The name of the metadata item.

value
  • string

The value of the metadata item.

NetworkConfiguration

The network configuration for a pool.

Name Type Description
dynamicVNetAssignmentScope

The scope of dynamic vnet assignment.

endpointConfiguration

The configuration for endpoints on compute nodes in the Batch pool.
Pool endpoint configuration is only supported on pools with the virtualMachineConfiguration property.

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 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. 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. For more details, see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration

NetworkSecurityGroupRule

A network security group rule to apply to an inbound endpoint.

Name Type Description
access

The action that should be taken for a specified IP address, subnet range or tag.

priority
  • integer

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 3500. If any reserved or duplicate values are provided the request fails with HTTP status code 400.

sourceAddressPrefix
  • string

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.

NetworkSecurityGroupRuleAccess

The action that should be taken for a specified IP address, subnet range or tag.

Name Type Description
allow
  • string

Allow access.

deny
  • string

Deny access.

PoolAddParameter

A pool in the Azure Batch service to add.

Name Type Description
applicationLicenses
  • string[]

The list of application licenses the Batch service will make available on each compute node in the pool.
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.

applicationPackageReferences

The list of application packages to be installed on each compute node in the pool.
Changes to application package references affect all new compute nodes joining the pool, but do not affect compute nodes that are already in the pool until they are rebooted or reimaged. There is a maximum of 10 application package references on any given pool.

autoScaleEvaluationInterval
  • string

The time interval at which to automatically adjust the pool size according to the autoscale formula.
The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

autoScaleFormula
  • string

A formula for the desired number of compute nodes in the pool.
This property must not be specified if enableAutoScale is set to false. It is required if enableAutoScale is set to true. The formula is checked for validity before the pool is created. If the formula is not valid, the Batch service rejects the request with detailed error information. For more information about specifying this formula, see 'Automatically scale compute nodes in an Azure Batch pool' (https://azure.microsoft.com/documentation/articles/batch-automatic-scaling/).

certificateReferences

The list of certificates to be installed on each compute node in the pool.
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.

cloudServiceConfiguration

The cloud service configuration for the pool.
This property and virtualMachineConfiguration are mutually exclusive and one of the properties must be specified. This property cannot be specified if the Batch account was created with its poolAllocationMode property set to 'UserSubscription'.

displayName
  • string

The display name for the pool.
The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.

enableAutoScale
  • boolean

Whether the pool size should automatically adjust over time.
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.

enableInterNodeCommunication
  • boolean

Whether the pool permits direct communication between nodes.
Enabling inter-node communication limits the maximum size of the pool due to deployment restrictions on the nodes of the pool. This may result in the pool not reaching its desired size. The default value is false.

id
  • string

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 pool IDs within an account that differ only by case).

maxTasksPerNode
  • integer

The maximum number of tasks that can run concurrently 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.

metadata

A list of name-value pairs associated with the pool as metadata.
The Batch service does not assign any meaning to metadata; it is solely for the use of user code.

networkConfiguration

The network configuration for the pool.
The network configuration for a pool.

resizeTimeout
  • string

The timeout for allocation of compute nodes to the pool.
This timeout applies only to manual scaling; it has no effect when enableAutoScale is set to true. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

startTask

A task specified to run on each compute node as it joins the pool.
The task runs when the node is added to the pool or when the node is restarted.

targetDedicatedNodes
  • integer

The desired number of dedicated compute nodes in the pool.
This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both.

targetLowPriorityNodes
  • integer

The desired number of low-priority compute nodes in the pool.
This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both.

taskSchedulingPolicy

How tasks are distributed across compute nodes in a pool.
If not specified, the default is spread.

userAccounts

The list of user accounts to be created on each node in the pool.

virtualMachineConfiguration

The virtual machine configuration for the pool.
This property and cloudServiceConfiguration are mutually exclusive and one of the properties must be specified.

vmSize
  • string

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

PoolEndpointConfiguration

The endpoint configuration for a pool.

Name Type Description
inboundNATPools

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.

ResourceFile

A single file or multiple files to be downloaded to a compute node.

Name Type Description
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.

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.

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 node. If this property is not specified for a Linux node, then a default value of 0770 is applied to the file.

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 '..').

httpUrl
  • string

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

storageContainerUrl
  • string

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 using anonymous access; that is, the Batch service does not present any credentials when downloading blobs from the container. There are two 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, or set the ACL for the container to allow public access.

StartTask

A task which is run when a compute node joins a pool in the Azure Batch service, or when the compute node is rebooted or reimaged.

Name Type Description
commandLine
  • string

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

The settings for the container under which the start task runs.
When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all task environment variables are mapped into the container, and the task command line is executed in the container.

environmentSettings

A list of environment variable settings for the start task.

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.

resourceFiles

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.

userIdentity

The user identity under which the start task runs.
If omitted, the task runs as a non-administrative user unique to the task.

waitForSuccess
  • boolean

Whether the Batch service should wait for the start task to complete successfully (that is, to exit with exit code 0) before scheduling any tasks on the compute node.
If true and the start task fails on a compute node, the Batch service retries the start task up to its maximum retry count (maxTaskRetryCount). If the task has still not completed successfully after all retries, then the Batch service marks the compute node unusable, and will not schedule tasks to it. This condition can be detected via the node state and 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.

StorageAccountType

The storage account type for use in creating data disks.

Name Type Description
premium_lrs
  • string

The data disk should use premium locally redundant storage.

standard_lrs
  • string

The data disk should use standard locally redundant storage.

TaskContainerSettings

The container settings for a task.

Name Type Description
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

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

The private registry which contains the container image.
This setting can be omitted if was already provided at pool creation.

TaskSchedulingPolicy

Specifies how tasks should be distributed across compute nodes.

Name Type Description
nodeFillType

How tasks are distributed across compute nodes in a pool.

UserAccount

Properties used to create a user used to execute tasks on an Azure Batch node.

Name Type Description
elevationLevel

The elevation level of the user account.
The default value is nonAdmin.

linuxUserConfiguration

The Linux-specific user configuration for the user account.
This property is ignored if specified on a Windows pool. If not specified, the user is created with the default options.

name
  • string

The name of the user account.

password
  • string

The password for the user account.

windowsUserConfiguration

The Windows-specific user configuration for the user account.
This property can only be specified if the user is on a Windows pool. If not specified and on a Windows pool, the user is created with the default options.

UserIdentity

The definition of the user identity under which the task is run.

Name Type Description
autoUser

The auto user under which the task is run.
The userName and autoUser properties are mutually exclusive; you must specify one 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.

VirtualMachineConfiguration

The configuration for compute nodes in a pool based on the Azure Virtual Machines infrastructure.

Name Type Description
containerConfiguration

The container configuration for the pool.
If specified, setup is performed on each node in the pool to allow tasks to run in containers. All regular tasks and job manager tasks run on this pool must specify the containerSettings property, and all other tasks may specify it.

dataDisks

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

imageReference

A reference to the Azure Virtual Machines Marketplace image or the custom Virtual Machine image to use.

licenseType
  • string

The type of on-premises license to be used when deploying the operating system.
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.

nodeAgentSKUId
  • string

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

windowsConfiguration

Windows operating system settings on the virtual machine.
This property must not be specified if the imageReference property specifies a Linux OS image.

WindowsConfiguration

Windows operating system settings to apply to the virtual machine.

Name Type Description
enableAutomaticUpdates
  • boolean

Whether automatic updates are enabled on the virtual machine.
If omitted, the default value is true.

WindowsUserConfiguration

Properties used to create a user account on a Windows node.

Name Type Description
loginMode

The login mode for the user.
The default value for VirtualMachineConfiguration pools is batch and for CloudServiceConfiguration pools is interactive.