Job Schedule - List

Lists all of the Job Schedules in the specified Account.

GET {batchUrl}/jobschedules?api-version=2019-06-01.9.0
GET {batchUrl}/jobschedules?$filter={$filter}&$select={$select}&$expand={$expand}&maxresults={maxresults}&timeout={timeout}&api-version=2019-06-01.9.0

URI Parameters

Name In Required Type Description
batchUrl
path True
  • string

The base URL for all Azure Batch service requests.

$filter
query
  • string

An OData $filter clause. For more information on constructing this filter, see https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-schedules.

$select
query
  • string

An OData $select clause.

$expand
query
  • string

An OData $expand clause.

maxresults
query
  • integer
int32

The maximum number of items to return in the response. A maximum of 1000 Job Schedules can be returned.

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.

Responses

Name Type Description
200 OK

A response containing the list of Job Schedules.

Headers

  • client-request-id: string
  • request-id: string
  • ETag: string
  • Last-Modified: 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

JobSchedule list

Sample Request

GET account.region.batch.azure.com/jobschedules?api-version=2019-06-01.9.0
client-request-id: 00000000-0000-0000-0000-000000000000
ocp-date: Fri, 17 Feb 2017 00:00:00 GMT

Sample Response

{
  "value": [
    {
      "id": "jobSchedule1",
      "url": "https://account.region.batch.azure.com/jobschedules/jobSchedule1",
      "eTag": "0x8D40FFD2E10996A",
      "lastModified": "2016-11-18T21:52:24.0064874Z",
      "creationTime": "2016-11-18T21:52:22.5431125Z",
      "state": "active",
      "stateTransitionTime": "2016-11-18T21:52:24.0064874Z",
      "previousState": "disabled",
      "previousStateTransitionTime": "2016-11-18T21:52:23.6471782Z",
      "jobSpecification": {
        "priority": 0,
        "usesTaskDependencies": false,
        "onAllTasksComplete": "noaction",
        "onTaskFailure": "noaction",
        "constraints": {
          "maxWallClockTime": "P10675199DT2H48M5.4775807S",
          "maxTaskRetryCount": 0
        },
        "poolInfo": {
          "poolId": "poolId"
        }
      },
      "executionInfo": {
        "recentJob": {
          "url": "https://account.region.batch.azure.com/jobs/jobSchedule1:job-1",
          "id": "jobSchedule1:job-1"
        }
      }
    },
    {
      "id": "jobSchedule2",
      "url": "https://account.region.batch.azure.com/jobschedules/jobSchedule2",
      "eTag": "0x8D40FFCFF760B51",
      "lastModified": "2016-11-18T21:51:05.8184017Z",
      "creationTime": "2016-11-18T21:51:05.8184017Z",
      "state": "active",
      "stateTransitionTime": "2016-11-18T21:51:05.8184017Z",
      "schedule": {
        "doNotRunUntil": "2020-01-01T12:30:00Z"
      },
      "jobSpecification": {
        "priority": 0,
        "usesTaskDependencies": false,
        "onAllTasksComplete": "noaction",
        "onTaskFailure": "noaction",
        "constraints": {
          "maxWallClockTime": "P10675199DT2H48M5.4775807S",
          "maxTaskRetryCount": 0
        },
        "poolInfo": {
          "poolId": "testPool2"
        }
      },
      "executionInfo": {
        "nextRunTime": "2020-01-01T12:30:00Z"
      }
    }
  ]
}

Definitions

ApplicationPackageReference

A reference to an Package to be deployed to Compute Nodes.

AuthenticationTokenSettings

The settings for an authentication token that the Task can use to perform Batch service operations.

AutoPoolSpecification

Specifies characteristics for a temporary 'auto pool'. The Batch service will create this auto Pool when the Job is submitted.

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.

CloudJobSchedule

A Job Schedule that allows recurring Jobs by specifying when to run Jobs and a specification used to create each Job.

CloudJobScheduleListResult

The result of listing the Job Schedules in an Account.

CloudServiceConfiguration

The configuration for Compute 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.

ContainerWorkingDirectory

The location of the container Task working directory.

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

JobConstraints

The execution constraints for a Job.

JobManagerTask

Specifies details of a Job Manager Task.

JobNetworkConfiguration

The network configuration for the Job.

JobPreparationTask

A Job Preparation Task to run before any Tasks of the Job on any given Compute Node.

JobReleaseTask

A Job Release Task to run on Job completion on any Compute Node where the Job has run.

JobScheduleExecutionInformation

Contains information about Jobs that have been and will be run under a Job Schedule.

JobScheduleState

The state of the Job Schedule.

JobScheduleStatistics

Resource usage statistics for a Job Schedule.

JobSpecification

Specifies details of the Jobs to be created on a schedule.

LinuxUserConfiguration

Properties used to create a user Account on a Linux Compute 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.

OnAllTasksComplete

The action the Batch service should take when all Tasks in the Job are in the completed state.

OnTaskFailure

The action the Batch service should take when any Task in the Job fails.

OutputFile

A specification for uploading files from an Azure Batch Compute Node to another location after the Batch service has finished executing the Task process.

OutputFileBlobContainerDestination

Specifies a file upload destination within an Azure blob storage container.

OutputFileDestination

The destination to which a file should be uploaded.

OutputFileUploadCondition

The conditions under which a Task output file or set of files should be uploaded.

OutputFileUploadOptions

Details about an output file upload operation, including under what conditions to perform the upload.

PoolEndpointConfiguration

The endpoint configuration for a Pool.

PoolInformation

Specifies how a Job should be assigned to a Pool.

PoolLifetimeOption

The minimum lifetime of created auto Pools, and how multiple Jobs on a schedule are assigned to Pools.

PoolSpecification

Specification for creating a new Pool.

RecentJob

Information about the most recent Job to run under the Job Schedule.

ResourceFile

A single file or multiple files to be downloaded to a Compute Node.

Schedule

The schedule according to which Jobs will be created

StartTask

A Task which is run when a 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.

TaskConstraints

Execution constraints to apply to a Task.

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

ApplicationPackageReference

A reference to an 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.

AuthenticationTokenSettings

The settings for an authentication token that the Task can use to perform Batch service operations.

Name Type Description
access
  • string[]

The Batch resources to which the token grants access.
The authentication token grants access to a limited set of Batch service operations. Currently the only supported value for the access property is 'job', which grants access to all operations related to the Job which contains the Task.

AutoPoolSpecification

Specifies characteristics for a temporary 'auto pool'. The Batch service will create this auto Pool when the Job is submitted.

Name Type Description
autoPoolIdPrefix
  • string

A prefix to be added to the unique identifier when a Pool is automatically created.
The Batch service assigns each auto Pool a unique identifier on creation. To distinguish between Pools created for different purposes, you can specify this element to add a prefix to the ID that is assigned. The prefix can be up to 20 characters long.

keepAlive
  • boolean

Whether to keep an auto Pool alive after its lifetime expires.
If false, the Batch service deletes the Pool once its lifetime (as determined by the poolLifetimeOption setting) expires; that is, when the Job or Job Schedule completes. If true, the Batch service does not delete the Pool automatically. It is up to the user to delete auto Pools created with this option.

pool

The Pool specification for the auto Pool.

poolLifetimeOption

The minimum lifetime of created auto Pools, and how multiple Jobs on a schedule are assigned to Pools.

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

CloudJobSchedule

A Job Schedule that allows recurring Jobs by specifying when to run Jobs and a specification used to create each Job.

Name Type Description
creationTime
  • string

The creation time of the Job Schedule.

displayName
  • string

The display name for the schedule.

eTag
  • string

The ETag of the Job Schedule.
This is an opaque string. You can use it to detect whether the Job Schedule has changed between requests. In particular, you can be pass the ETag with an Update Job Schedule request to specify that your changes should take effect only if nobody else has modified the schedule in the meantime.

executionInfo

Information about Jobs that have been and will be run under this schedule.

id
  • string

A string that uniquely identifies the schedule within the Account.

jobSpecification

The details of the Jobs to be created on this schedule.

lastModified
  • string

The last modified time of the Job Schedule.
This is the last time at which the schedule level data, such as the Job specification or recurrence information, changed. It does not factor in job-level changes such as new Jobs being created or Jobs changing state.

metadata

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

previousState

The previous state of the Job Schedule.
This property is not present if the Job Schedule is in its initial active state.

previousStateTransitionTime
  • string

The time at which the Job Schedule entered its previous state.
This property is not present if the Job Schedule is in its initial active state.

schedule

The schedule according to which Jobs will be created.

state

The current state of the Job Schedule.

stateTransitionTime
  • string

The time at which the Job Schedule entered the current state.

stats

The lifetime resource usage statistics for the Job Schedule. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes.

url
  • string

The URL of the Job Schedule.

CloudJobScheduleListResult

The result of listing the Job Schedules in an Account.

Name Type Description
odata.nextLink
  • string

The URL to get the next set of results.

value

The list of Job Schedules.

CloudServiceConfiguration

The configuration for Compute 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 Compute Node in the Pool before any Tasks are assigned to the next Compute Node in the Pool.

spread
  • string

Tasks should be assigned evenly across all Compute 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.

ContainerWorkingDirectory

The location of the container Task working directory.

Name Type Description
containerImageDefault
  • string

Use the working directory defined in the container Image. Beware that this directory will not contain the Resource Files downloaded by Batch.

taskWorkingDirectory
  • string

Use the standard Batch service Task working directory, which will contain the Task Resource Files populated by Batch.

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 supported Images' 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 Compute 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 Compute 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 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.

JobConstraints

The execution constraints for a Job.

Name Type Description
maxTaskRetryCount
  • integer

The maximum number of times each 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 each Task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries a Task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry Tasks. If the maximum retry count is -1, the Batch service retries Tasks without limit. The default value is 0 (no retries).

maxWallClockTime
  • string

The maximum elapsed time that the Job may run, measured from the time the Job is created.
If the Job does not complete within the time limit, the Batch service terminates it and any Tasks that are still running. In this case, the termination reason will be MaxWallClockTimeExpiry. If this property is not specified, there is no time limit on how long the Job may run.

JobManagerTask

Specifies details of a Job Manager Task.

Name Type Description
allowLowPriorityNode
  • boolean

Whether the Job Manager Task may run on a low-priority Compute Node.
The default value is true.

applicationPackageReferences

A list of Application Packages that the Batch service will deploy to the Compute Node before running the command line.
Application Packages are downloaded and deployed to a shared directory, not the Task working directory. Therefore, if a referenced Application Package is already on the Compute Node, and is up to date, then it is not re-downloaded; the existing copy on the Compute Node is used. If a referenced Application Package cannot be installed, for example because the package has been deleted or because download failed, the Task fails.

authenticationTokenSettings

The settings for an authentication token that the Task can use to perform Batch service operations.
If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job.

commandLine
  • string

The command line of the Job Manager 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).

constraints

Constraints that apply to the Job Manager Task.

containerSettings

The settings for the container under which the Job Manager Task runs.
If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. 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. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files.

displayName
  • string

The display name of the Job Manager Task.
It need not be unique and can contain any Unicode characters up to a maximum length of 1024.

environmentSettings

A list of environment variable settings for the Job Manager Task.

id
  • string

A string that uniquely identifies the Job Manager Task within the Job.
The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters.

killJobOnCompletion
  • boolean

Whether completion of the Job Manager Task signifies completion of the entire Job.
If true, when the Job Manager Task completes, the Batch service marks the Job as complete. If any Tasks are still running at this time (other than Job Release), those Tasks are terminated. If false, the completion of the Job Manager Task does not affect the Job status. In this case, you should either use the onAllTasksComplete attribute to terminate the Job, or have a client or user terminate the Job explicitly. An example of this is if the Job Manager creates a set of Tasks but then takes no further role in their execution. The default value is true. If you are using the onAllTasksComplete and onTaskFailure attributes to control Job lifetime, and using the Job Manager Task only to create the Tasks for the Job (not to monitor progress), then it is important to set killJobOnCompletion to false.

outputFiles

A list of files that the Batch service will upload from the Compute Node after running the command line.
For multi-instance Tasks, the files will only be uploaded from the Compute Node on which the primary Task is executed.

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

runExclusive
  • boolean

Whether the Job Manager Task requires exclusive use of the Compute Node where it runs.
If true, no other Tasks will run on the same Node for as long as the Job Manager is running. If false, other Tasks can run simultaneously with the Job Manager on a Compute Node. The Job Manager Task counts normally against the Compute Node's concurrent Task limit, so this is only relevant if the Compute Node allows multiple concurrent Tasks. The default value is true.

userIdentity

The user identity under which the Job Manager Task runs.
If omitted, the Task runs as a non-administrative user unique to the Task.

JobNetworkConfiguration

The network configuration for the Job.

Name Type Description
subnetId
  • string

The ARM resource identifier of the virtual network subnet which Compute Nodes running Tasks from the Job will join for the duration of the Task. This will only work with a VirtualMachineConfiguration Pool.
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 Compute Nodes which will run Tasks from the Job. This can be up to the number of Compute Nodes in the Pool. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet so that Azure Batch service can schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication from the Azure Batch service. 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. Port 443 is also required to be open for outbound connections for communications to Azure Storage. For more details see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration

JobPreparationTask

A Job Preparation Task to run before any Tasks of the Job on any given Compute Node.

Name Type Description
commandLine
  • string

The command line of the Job Preparation 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).

constraints

Constraints that apply to the Job Preparation Task.

containerSettings

The settings for the container under which the Job Preparation 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. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files.

environmentSettings

A list of environment variable settings for the Job Preparation Task.

id
  • string

A string that uniquely identifies the Job Preparation Task within the Job.
The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. If you do not specify this property, the Batch service assigns a default value of 'jobpreparation'. No other Task in the Job can have the same ID as the Job Preparation Task. If you try to submit a Task with the same id, the Batch service rejects the request with error code TaskIdSameAsJobPreparationTask; if you are calling the REST API directly, the HTTP status code is 409 (Conflict).

rerunOnNodeRebootAfterSuccess
  • boolean

Whether the Batch service should rerun the Job Preparation Task after a Compute Node reboots.
The Job Preparation Task is always rerun if a Compute Node is reimaged, or if the Job Preparation Task did not complete (e.g. because the reboot occurred while the Task was running). Therefore, you should always write a Job Preparation Task to be idempotent and to behave correctly if run multiple times. The default value is true.

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

userIdentity

The user identity under which the Job Preparation Task runs.
If omitted, the Task runs as a non-administrative user unique to the Task on Windows Compute Nodes, or a non-administrative user unique to the Pool on Linux Compute Nodes.

waitForSuccess
  • boolean

Whether the Batch service should wait for the Job Preparation Task to complete successfully before scheduling any other Tasks of the Job on the Compute Node. A Job Preparation Task has completed successfully if it exits with exit code 0.
If true and the Job Preparation Task fails on a Node, the Batch service retries the Job Preparation Task up to its maximum retry count (as specified in the constraints element). If the Task has still not completed successfully after all retries, then the Batch service will not schedule Tasks of the Job to the Node. The Node remains active and eligible to run Tasks of other Jobs. If false, the Batch service will not wait for the Job Preparation Task to complete. In this case, other Tasks of the Job can start executing on the Compute Node while the Job Preparation Task is still running; and even if the Job Preparation Task fails, new Tasks will continue to be scheduled on the Compute Node. The default value is true.

JobReleaseTask

A Job Release Task to run on Job completion on any Compute Node where the Job has run.

Name Type Description
commandLine
  • string

The command line of the Job Release 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 Job Release 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. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files.

environmentSettings

A list of environment variable settings for the Job Release Task.

id
  • string

A string that uniquely identifies the Job Release Task within the Job.
The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. If you do not specify this property, the Batch service assigns a default value of 'jobrelease'. No other Task in the Job can have the same ID as the Job Release Task. If you try to submit a Task with the same id, the Batch service rejects the request with error code TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, the HTTP status code is 409 (Conflict).

maxWallClockTime
  • string

The maximum elapsed time that the Job Release Task may run on a given Compute Node, measured from the time the Task starts. If the Task does not complete within the time limit, the Batch service terminates it. The default value is 15 minutes. You may not specify a timeout longer than 15 minutes. If you do, the Batch service rejects it with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

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.

retentionTime
  • string

The minimum time to retain the Task directory for the Job Release Task on the Compute Node. After this time, the Batch service may delete the Task directory and all its contents.
The default is 7 days, i.e. the Task directory will be retained for 7 days unless the Compute Node is removed or the Job is deleted.

userIdentity

The user identity under which the Job Release Task runs.
If omitted, the Task runs as a non-administrative user unique to the Task.

JobScheduleExecutionInformation

Contains information about Jobs that have been and will be run under a Job Schedule.

Name Type Description
endTime
  • string

The time at which the schedule ended.
This property is set only if the Job Schedule is in the completed state.

nextRunTime
  • string

The next time at which a Job will be created under this schedule.
This property is meaningful only if the schedule is in the active state when the time comes around. For example, if the schedule is disabled, no Job will be created at nextRunTime unless the Job is enabled before then.

recentJob

Information about the most recent Job under the Job Schedule.
This property is present only if the at least one Job has run under the schedule.

JobScheduleState

The state of the Job Schedule.

Name Type Description
active
  • string

The Job Schedule is active and will create Jobs as per its schedule.

completed
  • string

The Job Schedule has terminated, either by reaching its end time or by the user terminating it explicitly.

deleting
  • string

The user has requested that the Job Schedule be deleted, but the delete operation is still in progress. The scheduler will not initiate any new Jobs for this Job Schedule, and will delete any existing Jobs and Tasks under the Job Schedule, including any active Job. The Job Schedule will be deleted when all Jobs and Tasks under the Job Schedule have been deleted.

disabled
  • string

The user has disabled the Job Schedule. The scheduler will not initiate any new Jobs will on this schedule, but any existing active Job will continue to run.

terminating
  • string

The Job Schedule has no more work to do, or has been explicitly terminated by the user, but the termination operation is still in progress. The scheduler will not initiate any new Jobs for this Job Schedule, nor is any existing Job active.

JobScheduleStatistics

Resource usage statistics for a Job Schedule.

Name Type Description
kernelCPUTime
  • string

The total kernel mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in all Jobs created under the schedule.

lastUpdateTime
  • string

The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime.

numFailedTasks
  • integer

The total number of Tasks that failed during the given time range in Jobs created under the schedule. A Task fails if it exhausts its maximum retry count without returning exit code 0.

numSucceededTasks
  • integer

The total number of Tasks successfully completed during the given time range in Jobs created under the schedule. A Task completes successfully if it returns exit code 0.

numTaskRetries
  • integer

The total number of retries during the given time range on all Tasks in all Jobs created under the schedule.

readIOGiB
  • number

The total gibibytes read from disk by all Tasks in all Jobs created under the schedule.

readIOps
  • integer

The total number of disk read operations made by all Tasks in all Jobs created under the schedule.

startTime
  • string

The start time of the time range covered by the statistics.

url
  • string

The URL of the statistics.

userCPUTime
  • string

The total user mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in all Jobs created under the schedule.

waitTime
  • string

The total wait time of all Tasks in all Jobs created under the schedule. The wait time for a Task is defined as the elapsed time between the creation of the Task and the start of Task execution. (If the Task is retried due to failures, the wait time is the time to the most recent Task execution.)
This value is only reported in the Account lifetime statistics; it is not included in the Job statistics.

wallClockTime
  • string

The total wall clock time of all the Tasks in all the Jobs created under the schedule.
The wall clock time is the elapsed time from when the Task started running on a Compute Node to when it finished (or to the last time the statistics were updated, if the Task had not finished by then). If a Task was retried, this includes the wall clock time of all the Task retries.

writeIOGiB
  • number

The total gibibytes written to disk by all Tasks in all Jobs created under the schedule.

writeIOps
  • integer

The total number of disk write operations made by all Tasks in all Jobs created under the schedule.

JobSpecification

Specifies details of the Jobs to be created on a schedule.

Name Type Description
commonEnvironmentSettings

A list of common environment variable settings. These environment variables are set for all Tasks in Jobs created under this schedule (including the Job Manager, Job Preparation and Job Release Tasks).
Individual Tasks can override an environment setting specified here by specifying the same setting name with a different value.

constraints

The execution constraints for Jobs created under this schedule.

displayName
  • string

The display name for Jobs created under this schedule.
The name need not be unique and can contain any Unicode characters up to a maximum length of 1024.

jobManagerTask

The details of a Job Manager Task to be launched when a Job is started under this schedule.
If the Job does not specify a Job Manager Task, the user must explicitly add Tasks to the Job using the Task API. If the Job does specify a Job Manager Task, the Batch service creates the Job Manager Task when the Job is created, and will try to schedule the Job Manager Task before scheduling other Tasks in the Job.

jobPreparationTask

The Job Preparation Task for Jobs created under this schedule.
If a Job has a Job Preparation Task, the Batch service will run the Job Preparation Task on a Node before starting any Tasks of that Job on that Compute Node.

jobReleaseTask

The Job Release Task for Jobs created under this schedule.
The primary purpose of the Job Release Task is to undo changes to Nodes made by the Job Preparation Task. Example activities include deleting local files, or shutting down services that were started as part of Job preparation. A Job Release Task cannot be specified without also specifying a Job Preparation Task for the Job. The Batch service runs the Job Release Task on the Compute Nodes that have run the Job Preparation Task.

metadata

A list of name-value pairs associated with each Job created under this schedule 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 Job.

onAllTasksComplete

The action the Batch service should take when all Tasks in a Job created under this schedule are in the completed state.
Note that if a Job contains no Tasks, then all Tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic Job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the Job properties to set onAllTasksComplete to terminatejob once you have finished adding Tasks. The default is noaction.

onTaskFailure

The action the Batch service should take when any Task fails in a Job created under this schedule. A Task is considered to have failed if it have failed if has a failureInfo. A failureInfo is set if the Task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the Task, for example due to a resource file download error.
The default is noaction.

poolInfo

The Pool on which the Batch service runs the Tasks of Jobs created under this schedule.

priority
  • integer

The priority of Jobs created under this schedule.
Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0. This priority is used as the default for all Jobs under the Job Schedule. You can update a Job's priority after it has been created using by using the update Job API.

usesTaskDependencies
  • boolean

Whether Tasks in the Job can define dependencies on each other. The default is false.

LinuxUserConfiguration

Properties used to create a user Account on a Linux Compute 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 Compute 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 Compute 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 Compute Nodes in the Pool. If the subnet doesn't have enough free IP addresses, the Pool will partially allocate 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 Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the 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 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.

sourcePortRanges
  • string[]

The source port ranges to match for the rule.
Valid values are '' (for all ports 0 - 65535), a specific port (i.e. 22), or a port range (i.e. 100-200). The ports must be in the range of 0 to 65535. Each entry in this collection must not overlap any other entry (either a range or an individual port). If any other values are provided the request fails with HTTP status code 400. The default value is ''.

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.

OnAllTasksComplete

The action the Batch service should take when all Tasks in the Job are in the completed state.

Name Type Description
noaction
  • string

Do nothing. The Job remains active unless terminated or disabled by some other means.

terminatejob
  • string

Terminate the Job. The Job's terminateReason is set to 'AllTasksComplete'.

OnTaskFailure

The action the Batch service should take when any Task in the Job fails.

Name Type Description
noaction
  • string

Do nothing. The Job remains active unless terminated or disabled by some other means.

performexitoptionsjobaction
  • string

Take the action associated with the Task exit condition in the Task's exitConditions collection. (This may still result in no action being taken, if that is what the Task specifies.)

OutputFile

A specification for uploading files from an Azure Batch Compute Node to another location after the Batch service has finished executing the Task process.

Name Type Description
destination

The destination for the output file(s).

filePattern
  • string

A pattern indicating which file(s) to upload.
Both relative and absolute paths are supported. Relative paths are relative to the Task working directory. The following wildcards are supported: * matches 0 or more characters (for example pattern abc* would match abc or abcdef), ** matches any directory, ? matches any single character, [abc] matches one character in the brackets, and [a-c] matches one character in the range. Brackets can include a negation to match any character not specified (for example [!abc] matches any character but a, b, or c). If a file name starts with "." it is ignored by default but may be matched by specifying it explicitly (for example .gif will not match .a.gif, but ..gif will). A simple example: ***.txt matches any file that does not start in '.' and ends with .txt in the Task working directory or any subdirectory. If the filename contains a wildcard character it can be escaped using brackets (for example abc[] would match a file named abc). Note that both \ and / are treated as directory separators on Windows, but only / is on Linux. Environment variables (%var% on Windows or $var on Linux) are expanded prior to the pattern being applied.

uploadOptions

Additional options for the upload operation, including under what conditions to perform the upload.

OutputFileBlobContainerDestination

Specifies a file upload destination within an Azure blob storage container.

Name Type Description
containerUrl
  • string

The URL of the container within Azure Blob Storage to which to upload the file(s).
The URL must include a Shared Access Signature (SAS) granting write permissions to the container.

path
  • string

The destination blob or virtual directory within the Azure Storage container.
If filePattern refers to a specific file (i.e. contains no wildcards), then path is the name of the blob to which to upload that file. If filePattern contains one or more wildcards (and therefore may match multiple files), then path is the name of the blob virtual directory (which is prepended to each blob name) to which to upload the file(s). If omitted, file(s) are uploaded to the root of the container with a blob name matching their file name.

OutputFileDestination

The destination to which a file should be uploaded.

Name Type Description
container

A location in Azure blob storage to which files are uploaded.

OutputFileUploadCondition

The conditions under which a Task output file or set of files should be uploaded.

Name Type Description
taskcompletion
  • string

Upload the file(s) after the Task process exits, no matter what the exit code was.

taskfailure
  • string

Upload the file(s) only after the Task process exits with a nonzero exit code.

tasksuccess
  • string

Upload the file(s) only after the Task process exits with an exit code of 0.

OutputFileUploadOptions

Details about an output file upload operation, including under what conditions to perform the upload.

Name Type Description
uploadCondition

The conditions under which the Task output file or set of files should be uploaded.
The default is taskcompletion.

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.

PoolInformation

Specifies how a Job should be assigned to a Pool.

Name Type Description
autoPoolSpecification

Characteristics for a temporary 'auto pool'. The Batch service will create this auto Pool when the Job is submitted.
If auto Pool creation fails, the Batch service moves the Job to a completed state, and the Pool creation error is set in the Job's scheduling error property. The Batch service manages the lifetime (both creation and, unless keepAlive is specified, deletion) of the auto Pool. Any user actions that affect the lifetime of the auto Pool while the Job is active will result in unexpected behavior. You must specify either the Pool ID or the auto Pool specification, but not both.

poolId
  • string

The ID of an existing Pool. All the Tasks of the Job will run on the specified Pool.
You must ensure that the Pool referenced by this property exists. If the Pool does not exist at the time the Batch service tries to schedule a Job, no Tasks for the Job will run until you create a Pool with that id. Note that the Batch service will not reject the Job request; it will simply not run Tasks until the Pool exists. You must specify either the Pool ID or the auto Pool specification, but not both.

PoolLifetimeOption

The minimum lifetime of created auto Pools, and how multiple Jobs on a schedule are assigned to Pools.

Name Type Description
job
  • string

The Pool exists for the lifetime of the Job to which it is dedicated. The Batch service creates the Pool when it creates the Job. If the 'job' option is applied to a Job Schedule, the Batch service creates a new auto Pool for every Job created on the schedule.

jobschedule
  • string

The Pool exists for the lifetime of the Job Schedule. The Batch Service creates the Pool when it creates the first Job on the schedule. You may apply this option only to Job Schedules, not to Jobs.

PoolSpecification

Specification for creating a new Pool.

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. The permitted licenses available on the Pool are 'maya', 'vray', '3dsmax', 'arnold'. An additional charge applies for each application license added to the Pool.

applicationPackageReferences

The list of Packages to be installed on each Compute Node in the Pool.
Changes to Package references affect all new 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 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 rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

autoScaleFormula
  • string

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

certificateReferences

A list of Certificates to be installed on each Compute Node in the Pool.
For Windows 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 must be specified if the Pool needs to be created with Azure PaaS VMs. This property and virtualMachineConfiguration are mutually exclusive and one of the properties must be specified. If neither is specified then the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). 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 element is required. The Pool automatically resizes according to the formula. The default value is false.

enableInterNodeCommunication
  • boolean

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

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 rejects the request with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

startTask

A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted.
Batch will retry Tasks when a recovery operation is triggered on a Node. Examples of recovery operations include (but are not limited to) when an unhealthy Node is rebooted or a Compute Node disappeared due to host failure. Retries due to recovery operations are independent of and are not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal retry due to a recovery operation may occur. Because of this, all Tasks should be idempotent. This means Tasks need to tolerate being interrupted and restarted without causing any corruption or duplicate data. The best practice for long running Tasks is to use some form of checkpointing. In some cases the start Task may be re-run even though the Compute Node was not rebooted. Special care should be taken to avoid start Tasks which create breakaway process or install/launch services from the start Task working directory, as this will block Batch from being able to re-run the start Task.

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 Compute Node in the Pool.

virtualMachineConfiguration

The virtual machine configuration for the Pool.
This property must be specified if the Pool needs to be created with Azure IaaS VMs. This property and cloudServiceConfiguration are mutually exclusive and one of the properties must be specified. If neither is specified then the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

vmSize
  • string

The size of the virtual machines in the Pool. All virtual machines in a Pool are the same size.
For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes).

RecentJob

Information about the most recent Job to run under the Job Schedule.

Name Type Description
id
  • string

The ID of the Job.

url
  • string

The URL of the Job.

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 Compute Node. If this property is not specified for a Linux Compute 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.

Schedule

The schedule according to which Jobs will be created

Name Type Description
doNotRunAfter
  • string

A time after which no Job will be created under this Job Schedule. The schedule will move to the completed state as soon as this deadline is past and there is no active Job under this Job Schedule.
If you do not specify a doNotRunAfter time, and you are creating a recurring Job Schedule, the Job Schedule will remain active until you explicitly terminate it.

doNotRunUntil
  • string

The earliest time at which any Job may be created under this Job Schedule.
If you do not specify a doNotRunUntil time, the schedule becomes ready to create Jobs immediately.

recurrenceInterval
  • string

The time interval between the start times of two successive Jobs under the Job Schedule. A Job Schedule can have at most one active Job under it at any given time.
Because a Job Schedule can have at most one active Job under it at any given time, if it is time to create a new Job under a Job Schedule, but the previous Job is still running, the Batch service will not create the new Job until the previous Job finishes. If the previous Job does not finish within the startWindow period of the new recurrenceInterval, then no new Job will be scheduled for that interval. For recurring Jobs, you should normally specify a jobManagerTask in the jobSpecification. If you do not use jobManagerTask, you will need an external process to monitor when Jobs are created, add Tasks to the Jobs and terminate the Jobs ready for the next recurrence. The default is that the schedule does not recur: one Job is created, within the startWindow after the doNotRunUntil time, and the schedule is complete as soon as that Job finishes. The minimum value is 1 minute. If you specify a lower value, the Batch service rejects the schedule with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

startWindow
  • string

The time interval, starting from the time at which the schedule indicates a Job should be created, within which a Job must be created.
If a Job is not created within the startWindow interval, then the 'opportunity' is lost; no Job will be created until the next recurrence of the schedule. If the schedule is recurring, and the startWindow is longer than the recurrence interval, then this is equivalent to an infinite startWindow, because the Job that is 'due' in one recurrenceInterval is not carried forward into the next recurrence interval. The default is infinite. The minimum value is 1 minute. If you specify a lower value, the Batch service rejects the schedule with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

StartTask

A Task which is run when a 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. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files.

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 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 Node unusable, and will not schedule Tasks to it. This condition can be detected via the Compute 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 Compute 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.

TaskConstraints

Execution constraints to apply to a Task.

Name Type Description
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 for the Task executable due to a nonzero exit code. 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 after the first attempt. If the maximum retry count is -1, the Batch service retries the Task without limit.

maxWallClockTime
  • string

The maximum elapsed time that the Task may run, measured from the time the Task starts. If the Task does not complete within the time limit, the Batch service terminates it.
If this is not specified, there is no time limit on how long the Task may run.

retentionTime
  • string

The minimum time to retain the Task directory on the Compute Node where it ran, from the time it completes execution. After this time, the Batch service may delete the Task directory and all its contents.
The default is 7 days, i.e. the Task directory will be retained for 7 days unless the Compute Node is removed or the Job is deleted.

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.

workingDirectory

The location of the container Task working directory.
The default is 'taskWorkingDirectory'.

TaskSchedulingPolicy

Specifies how Tasks should be distributed across Compute Nodes.

Name Type Description
nodeFillType

How Tasks are distributed across Compute Nodes in a Pool.
If not specified, the default is spread.

UserAccount

Properties used to create a user used to execute Tasks on an Azure Batch Compute 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 Compute 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 Compute Node gets its own disk (the disk is not a file share). Existing disks cannot be attached, each attached disk is empty. When the Compute 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 Compute 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 Compute Node agent to be provisioned on Compute Nodes in the Pool.
The Batch Compute Node agent is a program that runs on each Compute Node in the Pool, and provides the command-and-control interface between the Compute Node and the Batch service. There are different implementations of the Compute Node agent, known as SKUs, for different operating systems. You must specify a Compute Node agent SKU which matches the selected Image reference. To get the list of supported Compute Node agent SKUs along with their list of verified Image references, see the 'List supported Compute 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 Compute 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'.