Skip to main content

queues

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

Overview

Namequeues
TypeResource
Idaws.deadline.queues

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
allowed_storage_profile_idsarrayThe storage profile IDs for the queue.
blocked_reasonstringThe reason the queue was blocked. (NO_BUDGET_CONFIGURED, BUDGET_THRESHOLD_REACHED)
created_atstring (date-time)The date and time the resource was created.
created_bystringThe user or system that created this resource.
default_budget_actionstringThe default action taken on a queue if a budget wasn't configured. (NONE, STOP_SCHEDULING_AND_COMPLETE_TASKS, STOP_SCHEDULING_AND_CANCEL_TASKS)
descriptionstringThe description of the queue. This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.
display_namestringThe display name of the queue. This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.
farm_idstringThe farm ID for the queue. (pattern: <code>farm-[0-9a-f]{32}</code>)
job_attachment_settingsobjectThe job attachment settings. These are the Amazon S3 bucket name and the Amazon S3 prefix.
job_run_as_userobjectIdentifies the user for a job.
queue_idstringThe queue ID. (pattern: <code>queue-[0-9a-f]{32}</code>)
required_file_system_location_namesarrayA list of the required file system location names in the queue.
role_arnstringThe IAM role ARN. (pattern: <code>arn:(aws[a-zA-Z-]):iam::\d{12}:role(/[!-.0-~]+)/[\w+=,.@-]+</code>)
scheduling_configurationobjectThe scheduling configuration for a queue. Defines the strategy used to assign workers to jobs.
statusstringThe status of the queue. ACTIVE–The queue is active. SCHEDULING–The queue is scheduling. SCHEDULING_BLOCKED–The queue scheduling is blocked. See the provided reason. (IDLE, SCHEDULING, SCHEDULING_BLOCKED)
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_queueselectfarm_id, queue_id, regionGets a queue.
list_queuesselectfarm_id, regionnextToken, maxResults, principalId, statusLists queues.
create_queueinsertfarm_id, region, displayNameX-Amz-Client-TokenCreates a queue to coordinate the order in which jobs run on a farm. A queue can also specify where to pull resources and indicate where to output completed jobs.
associate_member_to_queueupdatefarm_id, queue_id, principal_id, region, principalType, identityStoreId, membershipLevelAssigns a queue membership level to a member
disassociate_member_from_queueupdatefarm_id, queue_id, principal_id, regionDisassociates a member from a queue.
update_queueupdatefarm_id, queue_id, regionX-Amz-Client-TokenUpdates a queue.
delete_queuedeletefarm_id, queue_id, regionDeletes a queue. You can't recover the jobs in a queue if you delete the queue. Deleting the queue also deletes the jobs in that queue.
assume_queue_role_for_readexecfarm_id, queue_id, regionGets Amazon Web Services credentials from the queue role. The IAM permissions of the credentials are scoped down to have read-only access.
assume_queue_role_for_userexecfarm_id, queue_id, regionAllows a user to assume a role for a queue.

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 of the queue that the user assumes the role for.
principal_idstringA member's principal ID to disassociate from a queue.
queue_idstringThe queue ID of the queue that the user assumes the role for.
regionstringAWS region (default: us-east-1)
X-Amz-Client-TokenstringThe idempotency token to update in the queue.
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.
principalIdstringThe principal IDs to include in the list of queues.
statusstringThe status of the queues listed. ACTIVE–The queues are active. SCHEDULING–The queues are scheduling. SCHEDULING_BLOCKED–The queue scheduling is blocked for these queues.

SELECT examples

Gets a queue.

SELECT
allowed_storage_profile_ids,
blocked_reason,
created_at,
created_by,
default_budget_action,
description,
display_name,
farm_id,
job_attachment_settings,
job_run_as_user,
queue_id,
required_file_system_location_names,
role_arn,
scheduling_configuration,
status,
updated_at,
updated_by
FROM aws.deadline.queues
WHERE farm_id = '{{ farm_id }}' -- required
AND queue_id = '{{ queue_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a queue to coordinate the order in which jobs run on a farm. A queue can also specify where to pull resources and indicate where to output completed jobs.

INSERT INTO aws.deadline.queues (
displayName,
description,
defaultBudgetAction,
jobAttachmentSettings,
roleArn,
jobRunAsUser,
requiredFileSystemLocationNames,
allowedStorageProfileIds,
tags,
schedulingConfiguration,
farm_id,
region,
`X-Amz-Client-Token`
)
SELECT
'{{ displayName }}' /* required */,
'{{ description }}',
'{{ defaultBudgetAction }}',
'{{ jobAttachmentSettings }}',
'{{ roleArn }}',
'{{ jobRunAsUser }}',
'{{ requiredFileSystemLocationNames }}',
'{{ allowedStorageProfileIds }}',
'{{ tags }}',
'{{ schedulingConfiguration }}',
'{{ farm_id }}',
'{{ region }}',
'{{ X-Amz-Client-Token }}'
RETURNING
queue_id
;

UPDATE examples

Assigns a queue membership level to a member

UPDATE aws.deadline.queues
SET
principalType = '{{ principalType }}',
identityStoreId = '{{ identityStoreId }}',
membershipLevel = '{{ membershipLevel }}',
identityCenterRegion = '{{ identityCenterRegion }}'
WHERE
farm_id = '{{ farm_id }}' --required
AND queue_id = '{{ queue_id }}' --required
AND principal_id = '{{ principal_id }}' --required
AND region = '{{ region }}' --required
AND principalType = '{{ principalType }}' --required
AND identityStoreId = '{{ identityStoreId }}' --required
AND membershipLevel = '{{ membershipLevel }}' --required;

DELETE examples

Deletes a queue. You can't recover the jobs in a queue if you delete the queue. Deleting the queue also deletes the jobs in that queue.

DELETE FROM aws.deadline.queues
WHERE farm_id = '{{ farm_id }}' --required
AND queue_id = '{{ queue_id }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Gets Amazon Web Services credentials from the queue role. The IAM permissions of the credentials are scoped down to have read-only access.

EXEC aws.deadline.queues.assume_queue_role_for_read
@farm_id='{{ farm_id }}' --required,
@queue_id='{{ queue_id }}' --required,
@region='{{ region }}' --required
;