subtasks
Creates, updates, deletes, gets or lists a subtasks resource.
Overview
| Name | subtasks |
| Type | Resource |
| Id | azure.batch_dataplane.subtasks |
Fields
The following fields are returned by SELECT queries:
- list_subtasks
| Name | Datatype | Description |
|---|---|---|
id | integer | The ID of the subtask. |
containerInfo | object | 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 subtask completed. This property is set only if the subtask is in the Completed state. |
exitCode | integer | The exit code of the program specified on the subtask command line. This property is set only if the subtask 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 subtask (due to timeout, or user termination via the API) you may see an operating system-defined exit code. |
failureInfo | object | Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. |
nodeInfo | object | Information about the Compute Node on which the subtask ran. |
previousState | string | The previous state of the subtask. This property is not set if the subtask is in its initial running state. Known values are: "preparing", "running", and "completed". (preparing, running, completed) |
previousStateTransitionTime | string (date-time) | The time at which the subtask entered its previous state. This property is not set if the subtask is in its initial running state. |
result | string | The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. Known values are: "success" and "failure". (success, failure) |
startTime | string (date-time) | The time at which the subtask started running. If the subtask has been restarted or retried, this is the most recent time at which the subtask started running. |
state | string | The current state of the subtask. Known values are: "preparing", "running", and "completed". (preparing, running, completed) |
stateTransitionTime | string (date-time) | The time at which the subtask entered its current state. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_subtasks | select | job_id, task_id, endpoint | timeOut, ocp-date, $select | Lists all of the subtasks that are associated with the specified multi-instance Task. If the Task is not a multi-instance Task then this returns an empty collection. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
endpoint | string | The service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: ) |
job_id | string | The ID of the Job. Required. |
task_id | string | The ID of the Task. Required. |
$select | array | An OData $select clause. Default value is None. |
ocp-date | string | 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. Default value is None. |
timeOut | integer | 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.". Default value is None. |
SELECT examples
- list_subtasks
Lists all of the subtasks that are associated with the specified multi-instance Task. If the Task is not a multi-instance Task then this returns an empty collection.
SELECT
id,
containerInfo,
endTime,
exitCode,
failureInfo,
nodeInfo,
previousState,
previousStateTransitionTime,
result,
startTime,
state,
stateTransitionTime
FROM azure.batch_dataplane.subtasks
WHERE job_id = '{{ job_id }}' -- required
AND task_id = '{{ task_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND timeOut = '{{ timeOut }}'
AND ocp-date = '{{ ocp-date }}'
AND $select = '{{ $select }}'
;