Skip to main content

queues

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

Overview

Namequeues
TypeResource
Idaws.pcs.queues

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe generated unique ID of the queue.
namestringThe name that identifies the queue. (pattern: <code>(?!pcs_)^[A-Za-z][A-Za-z0-9-]+</code>)
arnstringThe unique Amazon Resource Name (ARN) of the queue.
cluster_idstringThe ID of the cluster of the queue.
compute_node_group_configurationsarrayThe list of compute node group configurations associated with the queue. Queues assign jobs to associated compute node groups.
created_atstring (date-time)The date and time the resource was created.
error_infoarrayThe list of errors that occurred during queue provisioning.
modified_atstring (date-time)The date and time the resource was modified.
slurm_configurationobjectAdditional options related to the Slurm scheduler.
statusstringThe 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:

NameAccessible byRequired ParamsOptional ParamsDescription
get_queueselectregionReturns detailed information about a queue. The information includes the compute node groups that the queue uses to schedule jobs.
list_queuesselectregionReturns a list of all queues associated with a cluster.
create_queueinsertregion, clusterIdentifier, queueNameCreates 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_queueupdateregion, clusterIdentifier, queueIdentifierUpdates 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_queuedeleteregionDeletes 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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
;