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 = '{{ region }}' AND
Identifier = '{{ arn }}';
Lists all queues in a region.
SELECT
region,
arn
FROM awscc.pcs.queues_list_only
WHERE
region = '{{ region }}';
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.pcs.queues (
ClusterId,
ComputeNodeGroupConfigurations,
Name,
Tags,
region
)
SELECT
'{{ cluster_id }}',
'{{ compute_node_group_configurations }}',
'{{ name }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.pcs.queues
WHERE
Identifier = '{{ arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
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