queues
Creates, updates, deletes, gets or lists a queues resource.
Overview
| Name | queues |
| Type | Resource |
| Id | aws.pcs.queues |
Fields
The following fields are returned by SELECT queries:
- get_queue
- list_queues
| Name | Datatype | Description |
|---|---|---|
id | string | The generated unique ID of the queue. |
name | string | The name that identifies the queue. (pattern: <code>(?!pcs_)^[A-Za-z][A-Za-z0-9-]+</code>) |
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. |
created_at | string (date-time) | The date and time the resource was created. |
error_info | array | The list of errors that occurred during queue provisioning. |
modified_at | string (date-time) | The date and time the resource was modified. |
slurm_configuration | object | Additional options related to the Slurm scheduler. |
status | string | The provisioning status of the queue. The provisioning status doesn't indicate the overall health of the queue. The resource enters the SUSPENDING and SUSPENDED states when the scheduler is beyond end of life and we have suspended the cluster. When in these states, you can't use the cluster. The cluster controller is down and all compute instances are terminated. The resources still count toward your service quotas. You can delete a resource if its status is SUSPENDED. For more information, see Frequently asked questions about Slurm versions in PCS in the PCS User Guide. (CREATING, ACTIVE, UPDATING, DELETING, CREATE_FAILED, DELETE_FAILED, UPDATE_FAILED, SUSPENDING, SUSPENDED, RESUMING) |
| Name | Datatype | Description |
|---|---|---|
id | string | The generated unique ID of the queue. |
name | string | The name that identifies the queue. (pattern: <code>(?!pcs_)^[A-Za-z][A-Za-z0-9-]+</code>) |
arn | string | The unique Amazon Resource Name (ARN) of the queue. |
cluster_id | string | The ID of the cluster of the queue. |
created_at | string (date-time) | The date and time the resource was created. |
modified_at | string (date-time) | The date and time the resource was modified. |
status | string | The provisioning status of the queue. The provisioning status doesn't indicate the overall health of the queue. The resource enters the SUSPENDING and SUSPENDED states when the scheduler is beyond end of life and we have suspended the cluster. When in these states, you can't use the cluster. The cluster controller is down and all compute instances are terminated. The resources still count toward your service quotas. You can delete a resource if its status is SUSPENDED. For more information, see Frequently asked questions about Slurm versions in PCS in the PCS User Guide. (CREATING, ACTIVE, UPDATING, DELETING, CREATE_FAILED, DELETE_FAILED, UPDATE_FAILED, SUSPENDING, SUSPENDED, RESUMING) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_queue | select | region | Returns detailed information about a queue. The information includes the compute node groups that the queue uses to schedule jobs. | |
list_queues | select | region | Returns a list of all queues associated with a cluster. | |
create_queue | insert | region, clusterIdentifier, queueName | Creates a job queue. You must associate 1 or more compute node groups with the queue. You can associate 1 compute node group with multiple queues. | |
update_queue | update | region, clusterIdentifier, queueIdentifier | Updates the compute node group configuration of a queue. Use this API to change the compute node groups that the queue can send jobs to. | |
delete_queue | delete | region | Deletes a job queue. If the compute node group associated with this queue isn't associated with any other queues, PCS terminates all the compute nodes for this 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_queue
- list_queues
Returns detailed information about a queue. The information includes the compute node groups that the queue uses to schedule jobs.
SELECT
id,
name,
arn,
cluster_id,
compute_node_group_configurations,
created_at,
error_info,
modified_at,
slurm_configuration,
status
FROM aws.pcs.queues
WHERE region = '{{ region }}' -- required
;
Returns a list of all queues associated with a cluster.
SELECT
id,
name,
arn,
cluster_id,
created_at,
modified_at,
status
FROM aws.pcs.queues
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_queue
- Manifest
Creates a job queue. You must associate 1 or more compute node groups with the queue. You can associate 1 compute node group with multiple queues.
INSERT INTO aws.pcs.queues (
clusterIdentifier,
queueName,
computeNodeGroupConfigurations,
slurmConfiguration,
clientToken,
tags,
region
)
SELECT
'{{ clusterIdentifier }}' /* required */,
'{{ queueName }}' /* required */,
'{{ computeNodeGroupConfigurations }}',
'{{ slurmConfiguration }}',
'{{ clientToken }}',
'{{ tags }}',
'{{ region }}'
RETURNING
queue
;
# Description fields are for documentation purposes
- name: queues
props:
- name: region
value: "{{ region }}"
description: Required parameter for the queues resource.
- name: clusterIdentifier
value: "{{ clusterIdentifier }}"
description: |
The name or ID of the cluster for which to create a queue.
- name: queueName
value: "{{ queueName }}"
description: |
A name to identify the queue.
- name: computeNodeGroupConfigurations
description: |
The list of compute node group configurations to associate with the queue. Queues assign jobs to associated compute node groups.
value:
- computeNodeGroupId: "{{ computeNodeGroupId }}"
- name: slurmConfiguration
description: |
Additional options related to the Slurm scheduler.
value:
slurmCustomSettings:
- parameterName: "{{ parameterName }}"
parameterValue: "{{ parameterValue }}"
- name: clientToken
value: "{{ clientToken }}"
description: |
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect. If you don't specify a client token, the CLI and SDK automatically generate 1 for you.
- name: tags
value: "{{ tags }}"
description: |
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.
UPDATE examples
- update_queue
Updates the compute node group configuration of a queue. Use this API to change the compute node groups that the queue can send jobs to.
UPDATE aws.pcs.queues
SET
clusterIdentifier = '{{ clusterIdentifier }}',
queueIdentifier = '{{ queueIdentifier }}',
computeNodeGroupConfigurations = '{{ computeNodeGroupConfigurations }}',
slurmConfiguration = '{{ slurmConfiguration }}',
clientToken = '{{ clientToken }}'
WHERE
region = '{{ region }}' --required
AND clusterIdentifier = '{{ clusterIdentifier }}' --required
AND queueIdentifier = '{{ queueIdentifier }}' --required
RETURNING
queue;
DELETE examples
- delete_queue
Deletes a job queue. If the compute node group associated with this queue isn't associated with any other queues, PCS terminates all the compute nodes for this queue.
DELETE FROM aws.pcs.queues
WHERE region = '{{ region }}' --required
;