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.
Idaws.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.
tags1 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

NameAccessible byRequired Params
create_resourceINSERTNetworking, Scheduler, Size, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all clusters in a region.

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

Gets all properties from an individual cluster.

SELECT
region,
arn,
endpoints,
error_info,
id,
name,
networking,
scheduler,
size,
slurm_configuration,
status,
tags
FROM aws.pcs.clusters
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

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

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

DELETE example

/*+ delete */
DELETE FROM aws.pcs.clusters
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

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

Create

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

Read

pcs:GetCluster,
pcs:ListTagsForResource

Update

pcs:GetCluster,
pcs:ListTagsForResource,
pcs:TagResource,
pcs:UntagResource

Delete

pcs:DeleteCluster,
pcs:GetCluster

List

pcs:ListClusters