clusters
Creates, updates, deletes or gets a cluster
resource or lists clusters
in a region
Overview
Name | clusters |
Type | Resource |
Description | AWS::PCS::Cluster resource creates an AWS PCS cluster. |
Id | aws.pcs.clusters |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | The unique Amazon Resource Name (ARN) of the cluster. |
endpoints | array | The list of endpoints available for interaction with the scheduler. |
error_info | array | The list of errors that occurred during cluster provisioning. |
id | string | The generated unique ID of the cluster. |
name | string | The name that identifies the cluster. |
networking | object | The networking configuration for the cluster's control plane. |
scheduler | object | The cluster management and job scheduling software associated with the cluster. |
size | string | The size of the cluster. |
slurm_configuration | object | Additional options related to the Slurm scheduler. |
status | string | The provisioning status of the cluster. The provisioning status doesn't indicate the overall health of the cluster. |
tags |
| 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. |
region | string | AWS region. |
For more information, see AWS::PCS::Cluster
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Networking, Scheduler, Size, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.pcs.clusters (
Networking,
Scheduler,
Size,
region
)
SELECT
'{{ Networking }}',
'{{ Scheduler }}',
'{{ Size }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.pcs.clusters (
Name,
Networking,
Scheduler,
Size,
SlurmConfiguration,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ Networking }}',
'{{ Scheduler }}',
'{{ Size }}',
'{{ SlurmConfiguration }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: cluster
props:
- name: Name
value: '{{ Name }}'
- name: Networking
value:
SecurityGroupIds:
- '{{ SecurityGroupIds[0] }}'
SubnetIds:
- '{{ SubnetIds[0] }}'
- name: Scheduler
value:
Type: '{{ Type }}'
Version: '{{ Version }}'
- name: Size
value: '{{ Size }}'
- name: SlurmConfiguration
value:
AuthKey:
SecretArn: '{{ SecretArn }}'
SecretVersion: '{{ SecretVersion }}'
ScaleDownIdleTimeInSeconds: '{{ ScaleDownIdleTimeInSeconds }}'
SlurmCustomSettings:
- ParameterName: '{{ ParameterName }}'
ParameterValue: '{{ ParameterValue }}'
- name: Tags
value: null
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