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 https://batch.core.windows.net/pools?api-version=2017-09-01.6.0
POST https://batch.core.windows.net/pools?timeout={timeout}&api-version=2017-09-01.6.0

URI Parameters

Name In Required Type Description
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 Headers

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[]
applicationPackageReferences

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

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

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

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 of this setting depends on the size of the compute nodes in the pool (the vmSize setting).

metadata

A name-value pair associated with a Batch service resource.
The Batch service does not assign any meaning to this 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.

userAccounts

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

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

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.

Examples

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

Add a CloudServiceConfiguration pool

Sample Request

POST https://batch.core.windows.net/pools?api-version=2017-09-01.6.0
client-request-id: 00000000-0000-0000-0000-000000000000
{
  "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 https://batch.core.windows.net/pools?api-version=2017-09-01.6.0
client-request-id: 00000000-0000-0000-0000-000000000000
{
  "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 https://batch.core.windows.net/pools?api-version=2017-09-01.6.0
client-request-id: 00000000-0000-0000-0000-000000000000
{
  "id": "pool2",
  "vmSize": "standard_a1",
  "virtualMachineConfiguration": {
    "imageReference": {
      "publisher": "Canonical",
      "offer": "UbuntuServer",
      "sku": "16.04.0-LTS"
    },
    "nodeAgentSKUId": "batch.node.ubuntu 16.04",
    "containerConfiguration": {
      "type": "docker",
      "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

The error encountered while attempting to add the task.

BatchErrorDetail

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

CachingType

The type of caching to enable for the OS 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 cloud service configuration for the pool.

ComputeNodeFillType

How tasks are distributed across compute nodes in a pool.

ContainerConfiguration

The container configuration for the pool.

ContainerRegistry

The private registry which contains the container image.

ContainerType

The container technology to be used.

DataDisk

The configuration for data disks attached to the comptue nodes in the pool.

ElevationLevel

The elevation level of the auto user.

EnvironmentSetting

An environment variable to be set on a task process.

ErrorMessage

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

ImageReference

The list of Azure Marketplace images verified to be compatible with this node agent SKU.

InboundEndpointProtocol

The protocol of the endpoint.

InboundNATPool

A list of inbound NAT pools that can be used to address specific ports on an individual compute node externally.

LinuxUserConfiguration

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

MetadataItem

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

NetworkConfiguration

The network configuration for the pool.

NetworkSecurityGroupRule

A list of network security group rules that will be applied to the endpoint.

NetworkSecurityGroupRuleAccess

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

OSDisk

Settings for the operating system disk of the Virtual Machine.

PoolAddParameter

A pool in the Azure Batch service to add.

PoolEndpointConfiguration

The configuration for endpoints on compute nodes in the Batch pool.

ResourceFile

A file to be downloaded from Azure blob storage 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 to be used for the data disk.

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 virtual machine configuration for the pool.

WindowsConfiguration

Windows operating system settings on the virtual machine.

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.
nonAdmin - The auto user is a standard user without elevated access. admin - The auto user is a user with elevated access and operates with full Administrator permissions. The default value is nonAdmin.

scope

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

BatchError

The error encountered while attempting to add the task.

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

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

BatchErrorDetail

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

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 OS 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[]

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 cloud service configuration for the pool.

Name Type Description
currentOSVersion
  • string

The Azure Guest OS Version currently installed on the virtual machines in the pool.
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.

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. For more information, see Azure Guest OS Releases (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases).

targetOSVersion
  • 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 container configuration for the pool.

Name Type Description
containerImageNames
  • string[]
containerRegistries

A private container registry.

type

The container technology to be used.

ContainerRegistry

The private registry which contains the container image.

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
docker
  • string

Docker will be used to launch the containers.

DataDisk

The configuration for data disks attached to the comptue 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 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

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

ElevationLevel

The elevation level of the auto 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

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

Name Type Description
lang
  • string

The language code of the error message

value
  • string

The text of the message.

ImageReference

The list of Azure Marketplace images verified to be compatible with this node agent SKU.

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

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 list of inbound NAT pools that can be used to address specific ports on an individual compute node 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 network security group rule to apply to an inbound endpoint.

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.

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

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

NetworkSecurityGroupRule

A list of network security group rules that will be applied to the 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.

OSDisk

Settings for the operating system disk of the Virtual Machine.

Name Type Description
caching

The type of caching to enable for the OS disk.
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/.

PoolAddParameter

A pool in the Azure Batch service to add.

Name Type Description
applicationLicenses
  • string[]
applicationPackageReferences

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

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

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

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 of this setting depends on the size of the compute nodes in the pool (the vmSize setting).

metadata

A name-value pair associated with a Batch service resource.
The Batch service does not assign any meaning to this 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.

userAccounts

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

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

PoolEndpointConfiguration

The configuration for endpoints on compute nodes in the Batch pool.

Name Type Description
inboundNATPools

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

ResourceFile

A file to be downloaded from Azure blob storage to a compute node.

Name Type Description
blobSource
  • string

The URL of the file within Azure Blob Storage.
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.

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, relative to the task's working directory.

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.

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

An environment variable to be set on a task process.

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 file to be downloaded from Azure blob storage to a compute node.

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 to be used for the data disk.

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.
nonAdmin - The auto user is a standard user without elevated access. admin - The auto user is a user with elevated access and operates with full Administrator permissions. 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.

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 virtual machine configuration for the pool.

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

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

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.

osDisk

Settings for the operating system disk of the Virtual Machine.

windowsConfiguration

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

WindowsConfiguration

Windows operating system settings on the virtual machine.

Name Type Description
enableAutomaticUpdates
  • boolean

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