queues
Creates, updates, deletes or gets a queue resource or lists queues in a region
Overview
| Name | queues |
| Type | Resource |
| Description | AWS::PCS::Queue resource creates an AWS PCS queue. |
| Id | awscc.pcs.queues |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | The unique Amazon Resource Name (ARN) of the queue. |
cluster_id | string | The ID of the cluster of the queue. |
compute_node_group_configurations | array | The list of compute node group configurations associated with the queue. Queues assign jobs to associated compute node groups. |
error_info | array | The list of errors that occurred during queue provisioning. |
id | string | The generated unique ID of the queue. |
name | string | The name that identifies the queue. |
status | string | The provisioning status of the queue. The provisioning status doesn't indicate the overall health of the queue. |
tags | object | 1 or more tags added to the resource. Each tag consists of a tag key and tag value. The tag value is optional and can be an empty string. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The unique Amazon Resource Name (ARN) of the queue. |
region | string | AWS region. |
For more information, see AWS::PCS::Queue.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | queues | INSERT | ClusterId, region |
delete_resource | queues | DELETE | Identifier, region |
update_resource | queues | UPDATE | Identifier, PatchDocument, region |
list_resources | queues_list_only | SELECT | region |
get_resource | queues | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual queue.
SELECT
region,
arn,
cluster_id,
compute_node_group_configurations,
error_info,
id,
name,
status,
tags
FROM awscc.pcs.queues
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';
Lists all queues in a region.
SELECT
region,
arn
FROM awscc.pcs.queues_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new queue resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.pcs.queues (
ClusterId,
region
)
SELECT
'{{ cluster_id }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.pcs.queues (
ClusterId,
ComputeNodeGroupConfigurations,
Name,
Tags,
region
)
SELECT
'{{ cluster_id }}',
'{{ compute_node_group_configurations }}',
'{{ name }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: queue
props:
- name: cluster_id
value: '{{ cluster_id }}'
- name: compute_node_group_configurations
value:
- compute_node_group_id: '{{ compute_node_group_id }}'
- name: name
value: '{{ name }}'
- name: tags
value: {}
UPDATE example
Use the following StackQL query and manifest file to update a queue resource, using stack-deploy.
/*+ update */
UPDATE awscc.pcs.queues
SET PatchDocument = string('{{ {
"ComputeNodeGroupConfigurations": compute_node_group_configurations,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.pcs.queues
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';
Permissions
To operate on the queues resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
ec2:CreateNetworkInterface,
ec2:DescribeVpcs,
ec2:DescribeSubnets,
ec2:DescribeSecurityGroups,
ec2:GetSecurityGroupsForVpc,
iam:CreateServiceLinkedRole,
secretsmanager:CreateSecret,
secretsmanager:TagResource,
pcs:CreateQueue,
pcs:GetQueue,
pcs:ListTagsForResource,
pcs:TagResource
pcs:GetQueue,
pcs:ListTagsForResource
pcs:GetQueue,
pcs:UpdateQueue,
pcs:ListTagsForResource,
pcs:TagResource,
pcs:UntagResource
pcs:DeleteQueue,
pcs:GetQueue
pcs:ListClusters,
pcs:ListQueues