Skip to main content

tasks

Creates, updates, deletes, gets or lists a tasks resource.

Overview

Nametasks
TypeResource
Idaws.deadline.tasks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_atstring (date-time)The date and time the resource was created.
created_bystringThe user or system that created this resource.
ended_atstring (date-time)The date and time the resource ended running.
failure_retry_countintegerThe number of times that the task failed and was retried.
latest_session_action_idstringThe latest session action ID for the task. (pattern: <code>sessionaction-[0-9a-f]{32}-(0|([1-9][0-9]{0,9}))</code>)
parametersobjectThe parameters for the task.
run_statusstringThe run status for the task. (PENDING, READY, ASSIGNED, STARTING, SCHEDULED, INTERRUPTING, RUNNING, SUSPENDED, CANCELED, FAILED, SUCCEEDED, NOT_COMPATIBLE)
started_atstring (date-time)The date and time the resource started running.
target_run_statusstringThe run status with which to start the task. (READY, FAILED, SUCCEEDED, CANCELED, SUSPENDED, PENDING)
task_idstringThe task ID. (pattern: <code>task-[0-9a-f]{32}-(0|([1-9][0-9]{0,9}))</code>)
updated_atstring (date-time)The date and time the resource was updated.
updated_bystringThe user or system that updated this resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_taskselectfarm_id, queue_id, job_id, step_id, task_id, regionGets a task.
list_tasksselectfarm_id, queue_id, job_id, step_id, regionnextToken, maxResultsLists tasks for a job.
search_tasksselectfarm_id, regionSearches for tasks.
batch_get_taskselectregionRetrieves 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_taskupdatefarm_id, queue_id, job_id, step_id, task_id, region, targetRunStatusX-Amz-Client-TokenUpdates 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.

NameDatatypeDescription
farm_idstringThe farm ID to update.
job_idstringThe job ID to update.
queue_idstringThe queue ID to update.
regionstringAWS region (default: us-east-1)
step_idstringThe step ID to update.
task_idstringThe task ID to update.
X-Amz-Client-TokenstringThe unique token which the server uses to recognize retries of the same request.
maxResultsintegerThe maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.
nextTokenstringThe token for the next set of results, or null to start from the beginning.

SELECT examples

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
;

UPDATE examples

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}}';