Nodes - List Nodes
Lists the Compute Nodes in the specified Pool.
GET {endpoint}/pools/{poolId}/nodes?api-version=2025-06-01
GET {endpoint}/pools/{poolId}/nodes?api-version=2025-06-01&timeOut={timeOut}&maxresults={maxresults}&$filter={$filter}&$select={$select}
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
string (uri) |
Batch account endpoint (for example: https://batchaccount.eastus2.batch.azure.com). |
|
pool
|
path | True |
string |
The ID of the Pool from which you want to list Compute Nodes. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
|
$filter
|
query |
string |
An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-nodes-in-a-pool. |
|
|
$select
|
query |
string[] |
An OData $select clause. |
|
|
maxresults
|
query |
integer (int32) minimum: 1maximum: 1000 |
The maximum number of items to return in the response. A maximum of 1000 applications can be returned. |
|
|
time
|
query |
integer (int32) |
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
Request Header
| Name | Required | Type | Description |
|---|---|---|---|
| client-request-id |
string |
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-rfc7231) |
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 |
The request has succeeded. Headers
|
|
| Other Status Codes |
An unexpected error response. |
Security
OAuth2Auth
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
Scopes
| Name | Description |
|---|---|
| https://batch.core.windows.net//.default |
Examples
Node list
Sample request
GET {endpoint}/pools/poolId/nodes?api-version=2025-06-01
Sample response
{
"value": [
{
"id": "tvm-1695681911_1-20161122t193202z",
"url": "https://account.region.batch.azure.com/pools/poolId/nodes/tvm-1695681911_1-20161122t193202z",
"state": "idle",
"schedulingState": "enabled",
"stateTransitionTime": "2025-11-22T22:22:27.2236818Z",
"lastBootTime": "2025-11-22T22:22:24.4634125Z",
"allocationTime": "2025-11-22T19:32:02.8155319Z",
"ipAddress": "1.1.1.1",
"ipv6Address": "1.1.1.1",
"affinityId": "TVM:tvm-1695681911_1-20161122t193202z",
"vmSize": "Standard_D2_v5",
"totalTasksRun": 0,
"totalTasksSucceeded": 0,
"runningTasksCount": 0,
"runningTaskSlotsCount": 0,
"isDedicated": true,
"startTask": {
"commandLine": "cmd /c echo hello",
"userIdentity": {
"autoUser": {
"scope": "task",
"elevationLevel": "nonadmin"
}
},
"maxTaskRetryCount": 0,
"waitForSuccess": false
},
"virtualMachineInfo": {
"imageReference": {
"publisher": "Canonical",
"offer": "ubuntu-24_04-lts",
"sku": "server",
"version": "latest",
"exactVersion": "latest"
}
},
"startTaskInfo": {
"state": "completed",
"startTime": "2025-11-22T22:22:27.2236818Z",
"endTime": "2025-11-22T22:22:27.567189Z",
"exitCode": 0,
"retryCount": 0
},
"nodeAgentInfo": {
"version": "1.2.0.0",
"lastUpdateTime": "2025-11-22T22:22:24.4634125Z"
}
},
{
"id": "tvm-1695681911_2-20161122t193202z",
"url": "https://account.region.batch.azure.com/pools/poolId/nodes/tvm-1695681911_2-20161122t193202z",
"state": "idle",
"schedulingState": "enabled",
"stateTransitionTime": "2025-11-22T19:37:31.4285526Z",
"lastBootTime": "2025-11-22T19:37:28.623369Z",
"allocationTime": "2025-11-22T19:32:02.8155319Z",
"ipAddress": "1.1.1.1",
"ipv6Address": "1.1.1.1",
"affinityId": "TVM:tvm-1695681911_2-20161122t193202z",
"vmSize": "Standard_D2_v5",
"totalTasksRun": 0,
"totalTasksSucceeded": 0,
"runningTasksCount": 0,
"runningTaskSlotsCount": 0,
"isDedicated": true,
"startTask": {
"commandLine": "cmd /c echo hello",
"userIdentity": {
"autoUser": {
"scope": "task",
"elevationLevel": "nonadmin"
}
},
"maxTaskRetryCount": 0,
"waitForSuccess": false
},
"virtualMachineInfo": {
"imageReference": {
"publisher": "Canonical",
"offer": "ubuntu-24_04-lts",
"sku": "server",
"version": "latest",
"exactVersion": "latest"
}
},
"startTaskInfo": {
"state": "completed",
"startTime": "2025-11-22T19:37:31.4285526Z",
"endTime": "2025-11-22T19:37:31.838028Z",
"exitCode": 0,
"retryCount": 0
},
"nodeAgentInfo": {
"version": "1.2.0.0",
"lastUpdateTime": "2025-11-22T22:22:24.4634125Z"
}
},
{
"id": "tvm-1695681911_3-20161122t193202z",
"url": "https://account.region.batch.azure.com/pools/poolId/nodes/tvm-1695681911_3-20161122t193202z",
"state": "idle",
"schedulingState": "enabled",
"stateTransitionTime": "2025-11-22T19:36:51.0013378Z",
"lastBootTime": "2025-11-22T19:36:48.21721Z",
"allocationTime": "2025-11-22T19:32:02.8155319Z",
"ipAddress": "1.1.1.1",
"ipv6Address": "1.1.1.1",
"affinityId": "TVM:tvm-1695681911_3-20161122t193202z",
"vmSize": "Standard_D2_v5",
"totalTasksRun": 0,
"totalTasksSucceeded": 0,
"runningTasksCount": 0,
"runningTaskSlotsCount": 0,
"isDedicated": true,
"startTask": {
"commandLine": "cmd /c echo hello",
"userIdentity": {
"autoUser": {
"scope": "task",
"elevationLevel": "nonadmin"
}
},
"maxTaskRetryCount": 0,
"waitForSuccess": false
},
"virtualMachineInfo": {
"imageReference": {
"publisher": "Canonical",
"offer": "ubuntu-24_04-lts",
"sku": "server",
"version": "latest",
"exactVersion": "latest"
}
},
"startTaskInfo": {
"state": "completed",
"startTime": "2025-11-22T19:36:51.0013378Z",
"endTime": "2025-11-22T19:36:51.2363447Z",
"exitCode": 0,
"retryCount": 0
},
"nodeAgentInfo": {
"version": "1.2.0.0",
"lastUpdateTime": "2025-11-22T22:22:24.4634125Z"
}
}
]
}
Definitions
| Name | Description |
|---|---|
|
Auto |
AutoUserScope enums |
|
Auto |
Specifies the options for the auto user that runs an Azure Batch Task. |
|
Batch |
An error response received from the Azure Batch service. |
|
Batch |
An item of additional information included in an Azure Batch error response. |
|
Batch |
An error message received in an Azure Batch error response. |
|
Batch |
BatchErrorSourceCategory enums |
|
Batch |
A Compute Node in the Batch service. |
|
Batch |
The Batch Compute Node agent is a program that runs on each Compute Node in the Pool and provides Batch capability on the Compute Node. |
|
Batch |
The endpoint configuration for the Compute Node. |
|
Batch |
An error encountered by a Compute Node. |
|
Batch |
The reference to a user assigned identity associated with the Batch pool which a compute node will use. |
|
Batch |
The result of listing the Compute Nodes in a Pool. |
|
Batch |
BatchNodeState enums |
|
Batch |
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 StartTask may be re-run even though the Compute Node was not rebooted. Special care should be taken to avoid StartTasks which create breakaway process or install/launch services from the StartTask working directory, as this will block Batch from being able to re-run the StartTask. |
|
Batch |
Information about a StartTask running on a Compute Node. |
|
Batch |
BatchStartTaskState enums |
|
Batch |
Contains information about the container which a Task is executing. |
|
Batch |
The container settings for a Task. |
|
Batch |
Information about the execution of a Task. |
|
Batch |
BatchTaskExecutionResult enums |
|
Batch |
Information about a Task failure. |
|
Batch |
Information about a Task running on a Compute Node. |
|
Batch |
BatchTaskState enums |
|
Batch |
A reference to an Azure Virtual Machines Marketplace Image or a Azure Compute Gallery Image. To get the list of all Azure Marketplace Image references verified by Azure Batch, see the ' List Supported Images ' operation. |
|
Container |
The entry of path and mount mode you want to mount into task container. |
|
Container |
The paths which will be mounted to container task's container. |
|
Container |
A private container registry. |
|
Container |
ContainerWorkingDirectory enums |
|
Elevation |
ElevationLevel enums |
|
Environment |
An environment variable to be set on a Task process. |
|
Inbound |
An inbound endpoint on a Compute Node. |
|
Inbound |
InboundEndpointProtocol enums |
|
Name |
Represents a name-value pair. |
|
Resource |
A single file or multiple files to be downloaded to a Compute Node. |
|
Scheduling |
SchedulingState enums |
|
User |
The definition of the user identity under which the Task is run. Specify either the userName or autoUser property, but not both. |
|
Virtual |
Info about the current state of the virtual machine. |
AutoUserScope
AutoUserScope enums
| Value | Description |
|---|---|
| task |
Specifies that the service should create a new user for the Task. |
| pool |
Specifies that the Task runs as the common auto user Account which is created on every Compute Node in a Pool. |
AutoUserSpecification
Specifies the options for the auto user that runs an Azure Batch Task.
| 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 pool. If the pool is running Windows a value of Task should be specified if stricter isolation between tasks is required. For example, if the task mutates the registry in a way which could impact other tasks. |
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. |
BatchErrorMessage
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. |
BatchErrorSourceCategory
BatchErrorSourceCategory enums
| Value | Description |
|---|---|
| usererror |
The error is due to a user issue, such as misconfiguration. |
| servererror |
The error is due to an internal server issue. |
BatchNode
A Compute Node in the Batch service.
| Name | Type | Description |
|---|---|---|
| affinityId |
string |
An identifier which can be passed when adding a Task to request that the Task be scheduled on this Compute Node. Note that this is just a soft affinity. If the target Compute Node is busy or unavailable at the time the Task is scheduled, then the Task will be scheduled elsewhere. |
| allocationTime |
string (date-time) |
The time at which this Compute Node was allocated to the Pool. This is the time when the Compute Node was initially allocated and doesn't change once set. It is not updated when the Compute Node is service healed or preempted. |
| endpointConfiguration |
The endpoint configuration for the Compute Node. |
|
| errors |
The list of errors that are currently being encountered by the Compute Node. |
|
| id |
string |
The ID of the Compute Node. Every Compute Node that is added to a Pool is assigned a unique ID. Whenever a Compute Node is removed from a Pool, all of its local files are deleted, and the ID is reclaimed and could be reused for new Compute Nodes. |
| ipAddress |
string |
The IP address that other Nodes can use to communicate with this Compute Node. Every Compute Node that is added to a Pool is assigned a unique IP address. Whenever a Compute Node is removed from a Pool, all of its local files are deleted, and the IP address is reclaimed and could be reused for new Compute Nodes. |
| ipv6Address |
string |
The IPv6 address that other Nodes can use to communicate with this Compute Node. Every Compute Node that is added to a Pool is assigned a unique IP address. Whenever a Compute Node is removed from a Pool, all of its local files are deleted, and the IP address is reclaimed and could be reused for new Compute Nodes. This property will not be present if the Pool is not configured for IPv6. |
| isDedicated |
boolean |
Whether this Compute Node is a dedicated Compute Node. If false, the Compute Node is a Spot/Low-priority Compute Node. |
| lastBootTime |
string (date-time) |
The last time at which the Compute Node was started. This property may not be present if the Compute Node state is unusable. |
| nodeAgentInfo |
Information about the Compute Node agent version and the time the Compute Node upgraded to a new version. |
|
| recentTasks |
A list of Tasks whose state has recently changed. This property is present only if at least one Task has run on this Compute Node since it was assigned to the Pool. |
|
| runningTaskSlotsCount |
integer (int32) |
The total number of scheduling slots used by currently running Job Tasks on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. |
| runningTasksCount |
integer (int32) |
The total number of currently running Job Tasks on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. |
| schedulingState |
Whether the Compute Node is available for Task scheduling. |
|
| startTask |
The Task specified to run on the Compute Node as it joins the Pool. |
|
| startTaskInfo |
Runtime information about the execution of the StartTask on the Compute Node. |
|
| state |
The current state of the Compute Node. |
|
| stateTransitionTime |
string (date-time) |
The time at which the Compute Node entered its current state. |
| totalTasksRun |
integer (int32) |
The total number of Job Tasks completed on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. |
| totalTasksSucceeded |
integer (int32) |
The total number of Job Tasks which completed successfully (with exitCode 0) on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. |
| url |
string (uri) |
The URL of the Compute Node. |
| virtualMachineInfo |
Info about the current state of the virtual machine. |
|
| vmSize |
string |
The size of the virtual machine hosting the Compute Node. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes). |
BatchNodeAgentInfo
The Batch Compute Node agent is a program that runs on each Compute Node in the Pool and provides Batch capability on the Compute Node.
| Name | Type | Description |
|---|---|---|
| lastUpdateTime |
string (date-time) |
The time when the Compute Node agent was updated on the Compute Node. This is the most recent time that the Compute Node agent was updated to a new version. |
| version |
string |
The version of the Batch Compute Node agent running on the Compute Node. This version number can be checked against the Compute Node agent release notes located at https://github.com/Azure/Batch/blob/master/changelogs/nodeagent/CHANGELOG.md. |
BatchNodeEndpointConfiguration
The endpoint configuration for the Compute Node.
| Name | Type | Description |
|---|---|---|
| inboundEndpoints |
The list of inbound endpoints that are accessible on the Compute Node. |
BatchNodeError
An error encountered by a Compute Node.
| Name | Type | Description |
|---|---|---|
| code |
string |
An identifier for the Compute Node error. Codes are invariant and are intended to be consumed programmatically. |
| errorDetails |
The list of additional error details related to the Compute Node error. |
|
| message |
string |
A message describing the Compute Node error, intended to be suitable for display in a user interface. |
BatchNodeIdentityReference
The reference to a user assigned identity associated with the Batch pool which a compute node will use.
| Name | Type | Description |
|---|---|---|
| resourceId |
string (arm-id) |
The ARM resource id of the user assigned identity. |
BatchNodeListResult
The result of listing the Compute Nodes in a Pool.
| Name | Type | Description |
|---|---|---|
| odata.nextLink |
string (uri) |
The URL to get the next set of results. |
| value |
The list of Compute Nodes. |
BatchNodeState
BatchNodeState enums
| Value | Description |
|---|---|
| idle |
The Compute Node is not currently running a Task. |
| rebooting |
The Compute Node is rebooting. |
| reimaging |
The Compute Node is reimaging. |
| running |
The Compute Node is running one or more Tasks (other than a StartTask). |
| unusable |
The Compute Node cannot be used for Task execution due to errors. |
| creating |
The Batch service has obtained the underlying virtual machine from Azure Compute, but it has not yet started to join the Pool. |
| starting |
The Batch service is starting on the underlying virtual machine. |
| waitingforstarttask |
The StartTask has started running on the Compute Node, but waitForSuccess is set and the StartTask has not yet completed. |
| starttaskfailed |
The StartTask has failed on the Compute Node (and exhausted all retries), and waitForSuccess is set. The Compute Node is not usable for running Tasks. |
| unknown |
The Batch service has lost contact with the Compute Node, and does not know its true state. |
| leavingpool |
The Compute Node is leaving the Pool, either because the user explicitly removed it or because the Pool is resizing or autoscaling down. |
| offline |
The Compute Node is not currently running a Task, and scheduling of new Tasks to the Compute Node is disabled. |
| preempted |
The Spot/Low-priority Compute Node has been preempted. Tasks which were running on the Compute Node when it was preempted will be rescheduled when another Compute Node becomes available. |
| upgradingos |
The Compute Node is undergoing an OS upgrade operation. |
| deallocated |
The Compute Node is deallocated. |
| deallocating |
The Compute Node is deallocating. |
BatchStartTask
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 StartTask may be re-run even though the Compute Node was not rebooted. Special care should be taken to avoid StartTasks which create breakaway process or install/launch services from the StartTask working directory, as this will block Batch from being able to re-run the StartTask.
| Name | Type | Description |
|---|---|---|
| commandLine |
string |
The command line of the StartTask. 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://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). |
| containerSettings |
The settings for the container under which the StartTask 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 StartTask. |
|
| 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, however this is not recommended for a start task or any task. The default value is 0 (no retries). |
| 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 StartTask 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 StartTask to complete successfully (that is, to exit with exit code 0) before scheduling any Tasks on the Compute Node. If true and the StartTask fails on a Node, the Batch service retries the StartTask 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 StartTask to complete. In this case, other Tasks can start executing on the Compute Node while the StartTask is still running; and even if the StartTask fails, new Tasks will continue to be scheduled on the Compute Node. The default is true. |
BatchStartTaskInfo
Information about a StartTask running on a Compute Node.
| Name | Type | Description |
|---|---|---|
| containerInfo |
Information about the container under which the Task is executing. This property is set only if the Task runs in a container context. |
|
| endTime |
string (date-time) |
The time at which the StartTask stopped running. This is the end time of the most recent run of the StartTask, if that run has completed (even if that run failed and a retry is pending). This element is not present if the StartTask is currently running. |
| exitCode |
integer (int32) |
The exit code of the program specified on the StartTask command line. This property is set only if the StartTask is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the StartTask (due to timeout, or user termination via the API) you may see an operating system-defined exit code. |
| failureInfo |
Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. |
|
| lastRetryTime |
string (date-time) |
The most recent time at which a retry of the Task started running. This element is present only if the Task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the Task has been restarted for reasons other than retry; for example, if the Compute Node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not. |
| result |
The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. |
|
| retryCount |
integer (int32) |
The number of times the Task has been retried by the Batch service. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. |
| startTime |
string (date-time) |
The time at which the StartTask started running. This value is reset every time the Task is restarted or retried (that is, this is the most recent time at which the StartTask started running). |
| state |
The state of the StartTask on the Compute Node. |
BatchStartTaskState
BatchStartTaskState enums
| Value | Description |
|---|---|
| running |
The StartTask is currently running. |
| completed |
The StartTask has exited with exit code 0, or the StartTask has failed and the retry limit has reached, or the StartTask process did not run due to Task preparation errors (such as resource file download failures). |
BatchTaskContainerExecutionInfo
Contains information about the container which a Task is executing.
| Name | Type | Description |
|---|---|---|
| containerId |
string |
The ID of the container. |
| error |
string |
Detailed error information about the container. This is the detailed error string from the Docker service, if available. It is equivalent to the error field returned by "docker inspect". |
| state |
string |
The state of the container. This is the state of the container according to the Docker service. It is equivalent to the status field returned by "docker inspect". |
BatchTaskContainerSettings
The container settings for a Task.
| Name | Type | Description |
|---|---|---|
| containerHostBatchBindMounts |
The paths you want to mounted to container task. If this array is null or be not present, container task will mount entire temporary disk drive in windows (or AZ_BATCH_NODE_ROOT_DIR in Linux). It won't' mount any data paths into container if this array is set as empty. |
|
| 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'. |
BatchTaskExecutionInfo
Information about the execution of a Task.
| Name | Type | Description |
|---|---|---|
| containerInfo |
Information about the container under which the Task is executing. This property is set only if the Task runs in a container context. |
|
| endTime |
string (date-time) |
The time at which the Task completed. This property is set only if the Task is in the Completed state. |
| exitCode |
integer (int32) |
The exit code of the program specified on the Task command line. This property is set only if the Task is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the Task (due to timeout, or user termination via the API) you may see an operating system-defined exit code. |
| failureInfo |
Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. |
|
| lastRequeueTime |
string (date-time) |
The most recent time at which the Task has been requeued by the Batch service as the result of a user request. This property is set only if the requeueCount is nonzero. |
| lastRetryTime |
string (date-time) |
The most recent time at which a retry of the Task started running. This element is present only if the Task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the Task has been restarted for reasons other than retry; for example, if the Compute Node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not. |
| requeueCount |
integer (int32) |
The number of times the Task has been requeued by the Batch service as the result of a user request. When the user removes Compute Nodes from a Pool (by resizing/shrinking the pool) or when the Job is being disabled, the user can specify that running Tasks on the Compute Nodes be requeued for execution. This count tracks how many times the Task has been requeued for these reasons. |
| result |
The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. |
|
| retryCount |
integer (int32) |
The number of times the Task has been retried by the Batch service. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. |
| startTime |
string (date-time) |
The time at which the Task started running. 'Running' corresponds to the running state, so if the Task specifies resource files or Packages, then the start time reflects the time at which the Task started downloading or deploying these. If the Task has been restarted or retried, this is the most recent time at which the Task started running. This property is present only for Tasks that are in the running or completed state. |
BatchTaskExecutionResult
BatchTaskExecutionResult enums
| Value | Description |
|---|---|
| success |
The Task ran successfully. |
| failure |
There was an error during processing of the Task. The failure may have occurred before the Task process was launched, while the Task process was executing, or after the Task process exited. |
BatchTaskFailureInfo
Information about a Task failure.
| Name | Type | Description |
|---|---|---|
| category |
The category of the Task error. |
|
| code |
string |
An identifier for the Task error. Codes are invariant and are intended to be consumed programmatically. |
| details |
A list of additional details related to the error. |
|
| message |
string |
A message describing the Task error, intended to be suitable for display in a user interface. |
BatchTaskInfo
Information about a Task running on a Compute Node.
| Name | Type | Description |
|---|---|---|
| executionInfo |
Information about the execution of the Task. |
|
| jobId |
string |
The ID of the Job to which the Task belongs. |
| subtaskId |
integer (int32) |
The ID of the subtask if the Task is a multi-instance Task. |
| taskId |
string |
The ID of the Task. |
| taskState |
The current state of the Task. |
|
| taskUrl |
string (uri) |
The URL of the Task. |
BatchTaskState
BatchTaskState enums
| Value | Description |
|---|---|
| active |
The Task is queued and able to run, but is not currently assigned to a Compute Node. A Task enters this state when it is created, when it is enabled after being disabled, or when it is awaiting a retry after a failed run. |
| preparing |
The Task has been assigned to a Compute Node, but is waiting for a required Job Preparation Task to complete on the Compute Node. If the Job Preparation Task succeeds, the Task will move to running. If the Job Preparation Task fails, the Task will return to active and will be eligible to be assigned to a different Compute Node. |
| running |
The Task is running on a Compute Node. This includes task-level preparation such as downloading resource files or deploying Packages specified on the Task - it does not necessarily mean that the Task command line has started executing. |
| completed |
The Task is no longer eligible to run, usually because the Task has finished successfully, or the Task has finished unsuccessfully and has exhausted its retry limit. A Task is also marked as completed if an error occurred launching the Task, or when the Task has been terminated. |
BatchVmImageReference
A reference to an Azure Virtual Machines Marketplace Image or a Azure Compute Gallery Image. To get the list of all Azure Marketplace Image references verified by Azure Batch, see the ' List Supported Images ' operation.
| Name | Type | Description |
|---|---|---|
| communityGalleryImageId |
string |
The community gallery image unique identifier. This property is mutually exclusive with other properties and can be fetched from community gallery image GET call. |
| exactVersion |
string |
The specific version of the platform image or marketplace image used to create the node. This read-only field differs from 'version' only if the value specified for 'version' when the pool was created was 'latest'. |
| 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. |
| sharedGalleryImageId |
string |
The shared gallery image unique identifier. This property is mutually exclusive with other properties and can be fetched from shared gallery image GET call. |
| sku |
string |
The SKU of the Azure Virtual Machines Marketplace Image. For example, 18.04-LTS or 2019-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 (arm-id) |
The ARM resource identifier of the Azure Compute Gallery Image. Compute Nodes in the Pool will be created using this Image Id. This is of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{VersionId} or /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName} for always defaulting to the latest image version. This property is mutually exclusive with other ImageReference properties. The Azure Compute Gallery Image must have replicas in the same region and must be in the same subscription as the Azure Batch account. If the image version is not specified in the imageId, the latest version will be used. For information about the firewall settings for the Batch Compute Node agent to communicate with the Batch service see https://learn.microsoft.com/azure/batch/nodes-and-pools#virtual-network-vnet-and-firewall-configuration. |
ContainerHostBatchBindMountEntry
The entry of path and mount mode you want to mount into task container.
| Name | Type | Description |
|---|---|---|
| isReadOnly |
boolean |
Mount this source path as read-only mode or not. Default value is false (read/write mode). For Linux, if you mount this path as a read/write mode, this does not mean that all users in container have the read/write access for the path, it depends on the access in host VM. If this path is mounted read-only, all users within the container will not be able to modify the path. |
| source |
The path which be mounted to container customer can select. |
ContainerHostDataPath
The paths which will be mounted to container task's container.
| Value | Description |
|---|---|
| Shared |
The path for multi-instances task to shared their files. |
| Startup |
The path for start task. |
| VfsMounts |
The path contains all virtual file systems are mounted on this node. |
| Task |
The task path. |
| JobPrep |
The job-prep task path. |
| Applications |
The applications path. |
ContainerRegistryReference
A private container registry.
| Name | Type | Description |
|---|---|---|
| identityReference |
The reference to the user assigned identity to use to access an Azure Container Registry instead of username and password. |
|
| password |
string (password) |
The password to log into the registry server. |
| registryServer |
string (uri) |
The registry URL. If omitted, the default is "docker.io". |
| username |
string |
The user name to log into the registry server. |
ContainerWorkingDirectory
ContainerWorkingDirectory enums
| Value | Description |
|---|---|
| taskWorkingDirectory |
Use the standard Batch service Task working directory, which will contain the Task Resource Files populated by Batch. |
| containerImageDefault |
Use the working directory defined in the container Image. Beware that this directory will not contain the Resource Files downloaded by Batch. |
ElevationLevel
ElevationLevel enums
| Value | Description |
|---|---|
| nonadmin |
The user is a standard user without elevated access. |
| admin |
The user is a user with elevated access and operates with full Administrator permissions. |
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. |
InboundEndpoint
An inbound endpoint on a Compute Node.
| Name | Type | Description |
|---|---|---|
| backendPort |
integer (int32) |
The backend port number of the endpoint. |
| frontendPort |
integer (int32) |
The public port number of the endpoint. |
| name |
string |
The name of the endpoint. |
| protocol |
The protocol of the endpoint. |
|
| publicFQDN |
string |
The public fully qualified domain name for the Compute Node. |
| publicIPAddress |
string |
The public IP address of the Compute Node. |
InboundEndpointProtocol
InboundEndpointProtocol enums
| Value | Description |
|---|---|
| tcp |
Use TCP for the endpoint. |
| udp |
Use UDP for the endpoint. |
NameValuePair
Represents a name-value pair.
| Name | Type | Description |
|---|---|---|
| name |
string |
The name in the name-value pair. |
| value |
string |
The value in the name-value pair. |
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 (uri) |
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 from compute nodes. There are three ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read permissions on the blob, use a managed identity with read permission, or set the ACL for the blob or its container to allow public access. |
| identityReference |
The reference to the user assigned identity to use to access Azure Blob Storage specified by storageContainerUrl or httpUrl. |
|
| storageContainerUrl |
string (uri) |
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 from compute nodes. There are three 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, use a managed identity with read and list permissions, or set the ACL for the container to allow public access. |
SchedulingState
SchedulingState enums
| Value | Description |
|---|---|
| enabled |
Tasks can be scheduled on the Compute Node. |
| disabled |
No new Tasks will be scheduled on the Compute Node. Tasks already running on the Compute Node may still run to completion. All Compute Nodes start with scheduling enabled. |
UserIdentity
The definition of the user identity under which the Task is run. Specify either the userName or autoUser property, but not both.
| 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. |
VirtualMachineInfo
Info about the current state of the virtual machine.
| Name | Type | Description |
|---|---|---|
| imageReference |
The reference to the Azure Virtual Machine's Marketplace Image. |
|
| scaleSetVmResourceId |
string |
The resource ID of the Compute Node's current Virtual Machine Scale Set VM. Only defined if the Batch Account was created with its poolAllocationMode property set to 'UserSubscription'. |