tasks
Creates, updates, deletes, gets or lists a tasks resource.
Overview
| Name | tasks |
| Type | Resource |
| Id | aws.deadline.tasks |
Fields
The following fields are returned by SELECT queries:
- get_task
- list_tasks
- search_tasks
- batch_get_task
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The date and time the resource was created. |
created_by | string | The user or system that created this resource. |
ended_at | string (date-time) | The date and time the resource ended running. |
failure_retry_count | integer | The number of times that the task failed and was retried. |
latest_session_action_id | string | The latest session action ID for the task. (pattern: <code>sessionaction-[0-9a-f]{32}-(0|([1-9][0-9]{0,9}))</code>) |
parameters | object | The parameters for the task. |
run_status | string | The run status for the task. (PENDING, READY, ASSIGNED, STARTING, SCHEDULED, INTERRUPTING, RUNNING, SUSPENDED, CANCELED, FAILED, SUCCEEDED, NOT_COMPATIBLE) |
started_at | string (date-time) | The date and time the resource started running. |
target_run_status | string | The run status with which to start the task. (READY, FAILED, SUCCEEDED, CANCELED, SUSPENDED, PENDING) |
task_id | string | The task ID. (pattern: <code>task-[0-9a-f]{32}-(0|([1-9][0-9]{0,9}))</code>) |
updated_at | string (date-time) | The date and time the resource was updated. |
updated_by | string | The user or system that updated this resource. |
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The date and time the resource was created. |
created_by | string | The user or system that created this resource. |
ended_at | string (date-time) | The date and time the resource ended running. |
failure_retry_count | integer | The number of times that the task failed and was retried. |
latest_session_action_id | string | The latest session action ID for the task. (pattern: <code>sessionaction-[0-9a-f]{32}-(0|([1-9][0-9]{0,9}))</code>) |
parameters | object | The task parameters. |
run_status | string | The run status of the task. (PENDING, READY, ASSIGNED, STARTING, SCHEDULED, INTERRUPTING, RUNNING, SUSPENDED, CANCELED, FAILED, SUCCEEDED, NOT_COMPATIBLE) |
started_at | string (date-time) | The date and time the resource started running. |
target_run_status | string | The run status on which the started. (READY, FAILED, SUCCEEDED, CANCELED, SUSPENDED, PENDING) |
task_id | string | The task ID. (pattern: <code>task-[0-9a-f]{32}-(0|([1-9][0-9]{0,9}))</code>) |
updated_at | string (date-time) | The date and time the resource was updated. |
updated_by | string | The user or system that updated this resource. |
| Name | Datatype | Description |
|---|---|---|
next_item_offset | integer | The next item offset for the search results. |
tasks | array | Tasks in the search. |
total_results | integer | The total number of results in the search. |
| Name | Datatype | Description |
|---|---|---|
errors | array | A list of errors for tasks that could not be retrieved. |
tasks | array | A list of tasks that were successfully retrieved. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_task | select | farm_id, queue_id, job_id, step_id, task_id, region | Gets a task. | |
list_tasks | select | farm_id, queue_id, job_id, step_id, region | nextToken, maxResults | Lists tasks for a job. |
search_tasks | select | farm_id, region | Searches for tasks. | |
batch_get_task | select | region | Retrieves multiple tasks in a single request. This is a batch version of the GetTask API. The result of getting each task is reported individually in the response. Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200. | |
update_task | update | farm_id, queue_id, job_id, step_id, task_id, region, targetRunStatus | X-Amz-Client-Token | Updates a task. |
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 |
|---|---|---|
farm_id | string | The farm ID to update. |
job_id | string | The job ID to update. |
queue_id | string | The queue ID to update. |
region | string | AWS region (default: us-east-1) |
step_id | string | The step ID to update. |
task_id | string | The task ID to update. |
X-Amz-Client-Token | string | The unique token which the server uses to recognize retries of the same request. |
maxResults | integer | The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. |
nextToken | string | The token for the next set of results, or null to start from the beginning. |
SELECT examples
- get_task
- list_tasks
- search_tasks
- batch_get_task
Gets a task.
SELECT
created_at,
created_by,
ended_at,
failure_retry_count,
latest_session_action_id,
parameters,
run_status,
started_at,
target_run_status,
task_id,
updated_at,
updated_by
FROM aws.deadline.tasks
WHERE farm_id = '{{ farm_id }}' -- required
AND queue_id = '{{ queue_id }}' -- required
AND job_id = '{{ job_id }}' -- required
AND step_id = '{{ step_id }}' -- required
AND task_id = '{{ task_id }}' -- required
AND region = '{{ region }}' -- required
;
Lists tasks for a job.
SELECT
created_at,
created_by,
ended_at,
failure_retry_count,
latest_session_action_id,
parameters,
run_status,
started_at,
target_run_status,
task_id,
updated_at,
updated_by
FROM aws.deadline.tasks
WHERE farm_id = '{{ farm_id }}' -- required
AND queue_id = '{{ queue_id }}' -- required
AND job_id = '{{ job_id }}' -- required
AND step_id = '{{ step_id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
Searches for tasks.
SELECT
next_item_offset,
tasks,
total_results
FROM aws.deadline.tasks
WHERE farm_id = '{{ farm_id }}' -- required
AND region = '{{ region }}' -- required
;
Retrieves multiple tasks in a single request. This is a batch version of the GetTask API. The result of getting each task is reported individually in the response. Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.
SELECT
errors,
tasks
FROM aws.deadline.tasks
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- update_task
Updates a task.
UPDATE aws.deadline.tasks
SET
targetRunStatus = '{{ targetRunStatus }}'
WHERE
farm_id = '{{ farm_id }}' --required
AND queue_id = '{{ queue_id }}' --required
AND job_id = '{{ job_id }}' --required
AND step_id = '{{ step_id }}' --required
AND task_id = '{{ task_id }}' --required
AND region = '{{ region }}' --required
AND targetRunStatus = '{{ targetRunStatus }}' --required
AND `X-Amz-Client-Token` = '{{ X-Amz-Client-Token}}';