Megosztás a következőn keresztül:


Job - List Preparation And Release Task Status

Lists the execution status of the Job Preparation and Job Release Task for the specified Job across the Compute Nodes where the Job has run.
This API returns the Job Preparation and Job Release Task status on all Compute Nodes that have run the Job Preparation or Job Release Task. This includes Compute Nodes which have since been removed from the Pool. If this API is invoked on a Job which has no Job Preparation or Job Release Task, the Batch service returns HTTP status code 409 (Conflict) with an error code of JobPreparationTaskNotSpecified.

GET {batchUrl}/jobs/{jobId}/jobpreparationandreleasetaskstatus?api-version=2024-07-01.20.0
GET {batchUrl}/jobs/{jobId}/jobpreparationandreleasetaskstatus?$filter={$filter}&$select={$select}&maxresults={maxresults}&timeout={timeout}&api-version=2024-07-01.20.0

URI Parameters

Name In Required Type Description
batchUrl
path True

string

The base URL for all Azure Batch service requests.

jobId
path True

string

The ID of the Job.

api-version
query True

string

Client API Version.

$filter
query

string

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

$select
query

string

An OData $select clause.

maxresults
query

integer

int32

The maximum number of items to return in the response. A maximum of 1000 Tasks 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. If the value is larger than 30, the default will be used instead.

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

CloudJobListPreparationAndReleaseTaskStatusResult

A response containing a list of Job Preparation and Job Release Task statuses.

Headers

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

BatchError

The error from the Batch service. If this API is invoked on a Job which has no Job Preparation or Job Release Task, the Batch service returns HTTP status code 409.

Security

azure_auth

Microsoft Entra OAuth 2.0 auth code 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

Job list preparation and release task status

Sample request

GET account.region.batch.azure.com/jobs/jobId/jobpreparationandreleasetaskstatus?api-version=2024-07-01.20.0


Sample response

{
  "value": [
    {
      "poolId": "poolId",
      "nodeId": "tvm-2167304207_1-20140905t174658z",
      "nodeUrl": "https://account.region.batch.azure.com/pools/poolId/nodes/tvm-2167304207_1-20140905t174658z",
      "jobPreparationTaskExecutionInfo": {
        "state": "completed",
        "startTime": "2015-05-01T10:20:31Z",
        "endTime": "2015-05-02T20:12:42Z",
        "taskRootDirectory": "tasks/myjob/job-1/myjobpreptask",
        "taskRootDirectoryUrl": "https://account.region.batch.azure.com/pools/poolId/nodes/tvm-2167304207_1-20140905t174658z/files/tasks/myjob/job-1/myjobpreptask",
        "exitCode": 0,
        "retryCount": 0
      },
      "jobReleaseTaskExecutionInfo": {
        "state": "completed",
        "startTime": "2015-05-01T10:20:31Z",
        "endTime": "2015-05-02T20:12:42Z",
        "taskRootDirectory": "tasks/myjob/job-1/myjobreleasetask",
        "taskRootDirectoryUrl": "https://account.region.batch.azure.com/pools/poolId/nodes/tvm-2167304207_1-20140905t174658z/files/tasks/myjob/job-1/myjobreleasetask",
        "exitCode": 0
      }
    }
  ],
  "odata.nextLink": "https://account.region.batch.azure.com/jobs/myjob/jobpreparationandreleasestatus?$skipToken=tvm-2167304207_1-20140905t174658z&api-version=2024-07-01.20.0"
}

Definitions

Name Description
BatchError

An error response received from the Azure Batch service.

BatchErrorDetail

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

CloudJobListPreparationAndReleaseTaskStatusResult

The result of listing the status of the Job Preparation and Job Release Tasks for a Job.

ErrorCategory

The category of the error.

ErrorMessage

An error message received in an Azure Batch error response.

JobPreparationAndReleaseTaskExecutionInformation

The status of the Job Preparation and Job Release Tasks on a Compute Node.

JobPreparationTaskExecutionInformation

Contains information about the execution of a Job Preparation Task on a Compute Node.

JobPreparationTaskState

The current state of the Job Preparation Task on the Compute Node.

JobReleaseTaskExecutionInformation

Contains information about the execution of a Job Release Task on a Compute Node.

JobReleaseTaskState

The current state of the Job Release Task on the Compute Node.

NameValuePair

Represents a name-value pair.

TaskContainerExecutionInformation

Contains information about the container which a Task is executing.

TaskExecutionResult

The result of Task execution.

TaskFailureInformation

Information about a Task failure.

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

ErrorMessage

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

values

BatchErrorDetail[]

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.

CloudJobListPreparationAndReleaseTaskStatusResult

The result of listing the status of the Job Preparation and Job Release Tasks for a Job.

Name Type Description
odata.nextLink

string

The URL to get the next set of results.

value

JobPreparationAndReleaseTaskExecutionInformation[]

A list of Job Preparation and Job Release Task execution information.

ErrorCategory

The category of the error.

Name Type Description
servererror

string

The error is due to an internal server issue.

usererror

string

The error is due to a user issue, such as misconfiguration.

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.

JobPreparationAndReleaseTaskExecutionInformation

The status of the Job Preparation and Job Release Tasks on a Compute Node.

Name Type Description
jobPreparationTaskExecutionInfo

JobPreparationTaskExecutionInformation

Information about the execution status of the Job Preparation Task on this Compute Node.

jobReleaseTaskExecutionInfo

JobReleaseTaskExecutionInformation

Information about the execution status of the Job Release Task on this Compute Node.
This property is set only if the Job Release Task has run on the Compute Node.

nodeId

string

The ID of the Compute Node to which this entry refers.

nodeUrl

string

The URL of the Compute Node to which this entry refers.

poolId

string

The ID of the Pool containing the Compute Node to which this entry refers.

JobPreparationTaskExecutionInformation

Contains information about the execution of a Job Preparation Task on a Compute Node.

Name Type Description
containerInfo

TaskContainerExecutionInformation

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

The time at which the Job Preparation Task completed.
This property is set only if the Task is in the Completed state.

exitCode

integer

The exit code of the program specified on the Task command line.
This parameter is returned only if the Task is in the completed state. 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. Note that the exit code may also be generated by the Compute Node operating system, such as when a process is forcibly terminated.

failureInfo

TaskFailureInformation

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

The most recent time at which a retry of the Job Preparation Task started running.
This property is set 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

TaskExecutionResult

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

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

The time at which the Task started running.
If the Task has been restarted or retried, this is the most recent time at which the Task started running.

state

JobPreparationTaskState

The current state of the Job Preparation Task on the Compute Node.

taskRootDirectory

string

The root directory of the Job Preparation Task on the Compute Node. You can use this path to retrieve files created by the Task, such as log files.

taskRootDirectoryUrl

string

The URL to the root directory of the Job Preparation Task on the Compute Node.

JobPreparationTaskState

The current state of the Job Preparation Task on the Compute Node.

Name Type Description
completed

string

The Task has exited with exit code 0, or the Task has exhausted its retry limit, or the Batch service was unable to start the Task due to Task preparation errors (such as resource file download failures).

running

string

The Task is currently running (including retrying).

JobReleaseTaskExecutionInformation

Contains information about the execution of a Job Release Task on a Compute Node.

Name Type Description
containerInfo

TaskContainerExecutionInformation

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

The time at which the Job Release Task completed.
This property is set only if the Task is in the Completed state.

exitCode

integer

The exit code of the program specified on the Task command line.
This parameter is returned only if the Task is in the completed state. 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. Note that the exit code may also be generated by the Compute Node operating system, such as when a process is forcibly terminated.

failureInfo

TaskFailureInformation

Information describing the Task failure, if any.
This property is set only if the Task is in the completed state and encountered a failure.

result

TaskExecutionResult

The result of the Task execution.
If the value is 'failed', then the details of the failure can be found in the failureInfo property.

startTime

string

The time at which the Task started running.
If the Task has been restarted or retried, this is the most recent time at which the Task started running.

state

JobReleaseTaskState

The current state of the Job Release Task on the Compute Node.

taskRootDirectory

string

The root directory of the Job Release Task on the Compute Node. You can use this path to retrieve files created by the Task, such as log files.

taskRootDirectoryUrl

string

The URL to the root directory of the Job Release Task on the Compute Node.

JobReleaseTaskState

The current state of the Job Release Task on the Compute Node.

Name Type Description
completed

string

The Task has exited with exit code 0, or the Task has exhausted its retry limit, or the Batch service was unable to start the Task due to Task preparation errors (such as resource file download failures).

running

string

The Task is currently running (including retrying).

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.

TaskContainerExecutionInformation

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

TaskExecutionResult

The result of Task execution.

Name Type Description
failure

string

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.

success

string

The Task ran successfully.

TaskFailureInformation

Information about a Task failure.

Name Type Description
category

ErrorCategory

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

NameValuePair[]

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.