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

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

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.
autoScaleEvaluationInterval
  • string
    duration
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
    int32
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 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
    duration
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
    int32
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
    int32
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 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 (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.

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
AutoUserSpecification

The userName and autoUser properties are mutually exclusive; you must specify one but not both.

BatchError
BatchErrorDetail
CertificateReference
CloudServiceConfiguration

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

ContainerConfiguration

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.

ContainerRegistry
DataDisk
EnvironmentSetting
ErrorMessage
ImageReference
InboundNATPool
LinuxUserConfiguration

This property is ignored if specified on a Windows pool. If not specified, the user is created with the default options.

MetadataItem

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

NetworkSecurityGroupRule
OSDisk
PoolEndpointConfiguration

Pool endpoint configuration is only supported on pools with the virtualMachineConfiguration property.

ResourceFile
StartTask

The task runs when the node is added to the pool or when the node is restarted.

TaskContainerSettings

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.

TaskSchedulingPolicy
UserAccount
UserIdentity

If omitted, the task runs as a non-administrative user unique to the task.

VirtualMachineConfiguration

This property and cloudServiceConfiguration are mutually exclusive and one of the properties must be specified.

WindowsConfiguration

This property must not be specified if the imageReference or osDisk property specifies a Linux OS image.

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.

The userName and autoUser properties are mutually exclusive; you must specify one but not both.

Name Type Description
elevationLevel
  • enum:
    • nonAdmin
    • admin
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
  • enum:
    • task
    • pool
The scope for the auto user

Values are:

pool - specifies that the task runs as the common auto user account which is created on every node in a pool. task - specifies that the service should create a new user for the task. The default value is task.

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.
Name Type Description
key
  • string
An identifier specifying the meaning of the Value property.
value
  • string
The additional information included with the error response.
Name Type Description
storeLocation
  • enum:
    • currentUser
    • localMachine
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.

Values are:

starttask - The user account under which the start task is run. task - The accounts under which job tasks are run. remoteuser - The accounts under which users remotely access the node.

You can specify more than one visibility in this collection. The default is all accounts.

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

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.

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.

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
  • enum:
    • docker
The container technology to be used.

Values are:

docker - Docker will be used to launch the containers.

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.
Name Type Description
caching
  • enum:
    • none
    • readOnly
    • readWrite
The type of caching to be enabled for the data disks.

Values are:

none - The caching mode for the disk is not enabled. readOnly - The caching mode for the disk is read only. readWrite - The caching mode for the disk is read and write.

The default value for caching is none. For information about the caching options see: https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/.

diskSizeGB
  • integer
    int32
The initial disk size in gigabytes.
lun
  • integer
    int32
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
  • enum:
    • Standard_LRS
    • Premium_LRS
The storage account type to be used for the data disk.

If omitted, the default is "Standard_LRS". Values are:

Standard_LRS - The data disk should use standard locally redundant storage. Premium_LRS - The data disk should use premium locally redundant storage.

Name Type Description
name
  • string
The name of the environment variable.
value
  • string
The value of the environment variable.
Name Type Description
lang
  • string
The language code of the error message
value
  • string
The text of the message.
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.

Name Type Description
backendPort
  • integer
    int32
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
    int32
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. If any reserved or overlapping values are provided the request fails with HTTP status code 400.

frontendPortRangeStart
  • integer
    int32
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. 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
  • enum:
    • tcp
    • udp
The protocol of the endpoint.

This property is ignored if specified on a Windows pool. If not specified, the user is created with the default options.

Name Type Description
gid
  • integer
    int32
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
    int32
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.

The Batch service does not assign any meaning to this metadata; it is solely for the use of user code.

Name Type Description
name
  • string
The name of the metadata item.
value
  • string
The value of the metadata item.

The network configuration for a 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

Name Type Description
access
  • enum:
    • allow
    • deny
The action that should be taken for a specified IP address, subnet range or tag.
priority
  • integer
    int32
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.

Name Type Description
caching
  • enum:
    • none
    • readOnly
    • readWrite
The type of caching to enable for the OS disk.

Values are:

none - The caching mode for the disk is not enabled. readOnly - The caching mode for the disk is read only. readWrite - The caching mode for the disk is read and write.

The default value for caching is none. For information about the caching options see: https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/.

Pool endpoint configuration is only supported on pools with the virtualMachineConfiguration property.

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.

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.

The task runs when the node is added to the pool or when the node is restarted.

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 A list of environment variable settings for the start task.
maxTaskRetryCount
  • integer
    int32
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.

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.

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.

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.

Name Type Description
nodeFillType
  • enum:
    • spread
    • pack
How tasks are distributed across compute nodes in a pool. Values are: pack - 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 - Tasks should be assigned evenly across all nodes in the pool.
Name Type Description
elevationLevel
  • enum:
    • nonAdmin
    • admin
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.

If omitted, the task runs as a non-administrative user unique to the task.

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.

This property and cloudServiceConfiguration are mutually exclusive and one of the properties must be specified.

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

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.

This property must not be specified if the imageReference or osDisk property specifies a Linux OS image.

Name Type Description
enableAutomaticUpdates
  • boolean
Whether automatic updates are enabled on the virtual machine.

If omitted, the default value is true.