Skip to main content

clusters

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

Overview

Nameclusters
TypeResource
Idaws.pcs.clusters

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe generated unique ID of the cluster.
namestringThe name that identifies the cluster.
arnstringThe unique Amazon Resource Name (ARN) of the cluster.
created_atstring (date-time)The date and time the resource was created.
endpointsarrayThe list of endpoints available for interaction with the scheduler.
error_infoarrayThe list of errors that occurred during cluster provisioning.
modified_atstring (date-time)The date and time the resource was modified.
networkingobjectThe networking configuration for the cluster's control plane.
schedulerobjectThe cluster management and job scheduling software associated with the cluster.
sizestringThe size of the cluster. SMALL: 32 compute nodes and 256 jobs MEDIUM: 512 compute nodes and 8192 jobs LARGE: 2048 compute nodes and 16,384 jobs (SMALL, MEDIUM, LARGE)
slurm_configurationobjectAdditional options related to the Slurm scheduler.
statusstringThe provisioning status of the cluster. The provisioning status doesn't indicate the overall health of the cluster. 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_clusterselectregionReturns detailed information about a running cluster in your account. This API action provides networking information, endpoint information for communication with the scheduler, and provisioning status.
list_clustersselectregionReturns a list of running clusters in your account.
create_clusterinsertregion, clusterName, scheduler, size, networkingCreates a cluster in your account. PCS creates the cluster controller in a service-owned account. The cluster controller communicates with the cluster resources in your account. The subnets and security groups for the cluster must already exist before you use this API action. It takes time for PCS to create the cluster. The cluster is in a Creating state until it is ready to use. There can only be 1 cluster in a Creating state per Amazon Web Services Region per Amazon Web Services account. CreateCluster fails with a ServiceQuotaExceededException if there is already a cluster in a Creating state.
update_clusterupdateregion, clusterIdentifierUpdates a cluster configuration. You can update the scheduler version, modify scheduler settings, and update accounting configuration for an existing cluster. For more information about updating the scheduler version, see Updating the scheduler version on a cluster in the PCS User Guide. You can only update clusters that are in ACTIVE, UPDATE_FAILED, or SUSPENDED state. All associated resources (queues and compute node groups) must be in ACTIVE state before you can update the cluster.
delete_clusterdeleteregionDeletes a cluster and all its linked resources. You must delete all queues and compute node groups associated with the cluster before you can delete the cluster.

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 running cluster in your account. This API action provides networking information, endpoint information for communication with the scheduler, and provisioning status.

SELECT
id,
name,
arn,
created_at,
endpoints,
error_info,
modified_at,
networking,
scheduler,
size,
slurm_configuration,
status
FROM aws.pcs.clusters
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a cluster in your account. PCS creates the cluster controller in a service-owned account. The cluster controller communicates with the cluster resources in your account. The subnets and security groups for the cluster must already exist before you use this API action. It takes time for PCS to create the cluster. The cluster is in a Creating state until it is ready to use. There can only be 1 cluster in a Creating state per Amazon Web Services Region per Amazon Web Services account. CreateCluster fails with a ServiceQuotaExceededException if there is already a cluster in a Creating state.

INSERT INTO aws.pcs.clusters (
clusterName,
scheduler,
size,
networking,
slurmConfiguration,
clientToken,
tags,
region
)
SELECT
'{{ clusterName }}' /* required */,
'{{ scheduler }}' /* required */,
'{{ size }}' /* required */,
'{{ networking }}' /* required */,
'{{ slurmConfiguration }}',
'{{ clientToken }}',
'{{ tags }}',
'{{ region }}'
RETURNING
cluster
;

UPDATE examples

Updates a cluster configuration. You can update the scheduler version, modify scheduler settings, and update accounting configuration for an existing cluster. For more information about updating the scheduler version, see Updating the scheduler version on a cluster in the PCS User Guide. You can only update clusters that are in ACTIVE, UPDATE_FAILED, or SUSPENDED state. All associated resources (queues and compute node groups) must be in ACTIVE state before you can update the cluster.

UPDATE aws.pcs.clusters
SET
clusterIdentifier = '{{ clusterIdentifier }}',
clientToken = '{{ clientToken }}',
slurmConfiguration = '{{ slurmConfiguration }}',
scheduler = '{{ scheduler }}'
WHERE
region = '{{ region }}' --required
AND clusterIdentifier = '{{ clusterIdentifier }}' --required
RETURNING
cluster;

DELETE examples

Deletes a cluster and all its linked resources. You must delete all queues and compute node groups associated with the cluster before you can delete the cluster.

DELETE FROM aws.pcs.clusters
WHERE region = '{{ region }}' --required
;