clusters
Creates, updates, deletes or gets a cluster resource or lists clusters in a region
Overview
| Name | clusters |
| Type | Resource |
| Description | Resource Type definition for AWS::DSQL::Cluster |
| Id | awscc.dsql.clusters |
Fields
| Name | Datatype | Description |
|---|---|---|
deletion_protection_enabled | boolean | Whether deletion protection is enabled in this cluster. |
tags | array | |
resource_arn | string | The Amazon Resource Name (ARN) for the cluster. |
identifier | string | The ID of the created cluster. |
creation_time | string | The time of when the cluster was created in ISO-8601 format. |
status | string | The status of the cluster. |
vpc_endpoint_service_name | string | The VPC endpoint service name. |
multi_region_properties | object | The Multi-region properties associated to this cluster. |
kms_encryption_key | string | The KMS key that encrypts data on the cluster. |
encryption_details | object | The encryption configuration details for the cluster. |
region | string | AWS region. |
For more information, see AWS::DSQL::Cluster.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | , 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 properties from an individual cluster.
SELECT
region,
deletion_protection_enabled,
tags,
resource_arn,
identifier,
creation_time,
status,
vpc_endpoint_service_name,
multi_region_properties,
kms_encryption_key,
encryption_details
FROM awscc.dsql.clusters
WHERE region = 'us-east-1' AND data__Identifier = '<Identifier>';
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 awscc.dsql.clusters (
,
region
)
SELECT
'{{ }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.dsql.clusters (
DeletionProtectionEnabled,
Tags,
MultiRegionProperties,
KmsEncryptionKey,
region
)
SELECT
'{{ DeletionProtectionEnabled }}',
'{{ Tags }}',
'{{ MultiRegionProperties }}',
'{{ KmsEncryptionKey }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: cluster
props:
- name: DeletionProtectionEnabled
value: '{{ DeletionProtectionEnabled }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: MultiRegionProperties
value:
WitnessRegion: '{{ WitnessRegion }}'
Clusters:
- '{{ Clusters[0] }}'
- name: KmsEncryptionKey
value: '{{ KmsEncryptionKey }}'
DELETE example
/*+ delete */
DELETE FROM awscc.dsql.clusters
WHERE data__Identifier = '<Identifier>'
AND region = 'us-east-1';
Permissions
To operate on the clusters resource, the following permissions are required:
Create
dsql:CreateCluster,
dsql:UpdateCluster,
dsql:GetCluster,
dsql:TagResource,
dsql:GetVpcEndpointServiceName,
dsql:ListTagsForResource,
iam:CreateServiceLinkedRole,
dsql:PutMultiRegionProperties,
dsql:AddPeerCluster,
dsql:PutWitnessRegion,
kms:Decrypt,
kms:Encrypt,
kms:GenerateDataKey,
kms:DescribeKey
Read
dsql:GetCluster,
dsql:GetVpcEndpointServiceName,
dsql:ListTagsForResource,
tag:GetTagKeys,
tag:GetTagValues
Update
dsql:UpdateCluster,
dsql:GetCluster,
dsql:UntagResource,
dsql:TagResource,
dsql:GetVpcEndpointServiceName,
dsql:ListTagsForResource,
dsql:PutMultiRegionProperties,
dsql:PutWitnessRegion,
dsql:AddPeerCluster,
dsql:RemovePeerCluster,
kms:Decrypt,
kms:Encrypt,
kms:GenerateDataKey,
kms:DescribeKey
Delete
dsql:DeleteCluster,
dsql:GetCluster,
dsql:ListTagsForResource
List
dsql:ListClusters,
dsql:ListTagsForResource,
tag:GetTagKeys,
tag:GetTagValues