Skip to main content

clusters

Creates, updates, deletes or gets a cluster resource or lists clusters in a region

Overview

Nameclusters
TypeResource
DescriptionAWS::PCS::Cluster resource creates an AWS PCS cluster.
Idawscc.pcs.clusters

Fields

NameDatatypeDescription
arnstringThe unique Amazon Resource Name (ARN) of the cluster.
endpointsarrayThe list of endpoints available for interaction with the scheduler.
error_infoarrayThe list of errors that occurred during cluster provisioning.
idstringThe generated unique ID of the cluster.
namestringThe name that identifies the cluster.
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.
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.
tagsobject1 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.
regionstringAWS region.

For more information, see AWS::PCS::Cluster.

Methods

NameResourceAccessible byRequired Params
create_resourceclustersINSERTNetworking, Scheduler, Size, region
delete_resourceclustersDELETEIdentifier, region
update_resourceclustersUPDATEIdentifier, PatchDocument, region
list_resourcesclusters_list_onlySELECTregion
get_resourceclustersSELECTIdentifier, region

SELECT examples

Gets all properties from an individual cluster.

SELECT
region,
arn,
endpoints,
error_info,
id,
name,
networking,
scheduler,
size,
slurm_configuration,
status,
tags
FROM awscc.pcs.clusters
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new cluster resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.pcs.clusters (
Networking,
Scheduler,
Size,
region
)
SELECT
'{{ networking }}',
'{{ scheduler }}',
'{{ size }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a cluster resource, using stack-deploy.

/*+ update */
UPDATE awscc.pcs.clusters
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.pcs.clusters
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';

Permissions

To operate on the clusters resource, the following permissions are required:

ec2:CreateNetworkInterface,
ec2:DescribeVpcs,
ec2:DescribeSubnets,
ec2:DescribeSecurityGroups,
ec2:GetSecurityGroupsForVpc,
iam:CreateServiceLinkedRole,
secretsmanager:CreateSecret,
secretsmanager:TagResource,
pcs:CreateCluster,
pcs:GetCluster,
pcs:ListTagsForResource,
pcs:TagResource