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
- get (all properties)
- list (identifiers only)
| 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. |
| Name | Datatype | Description |
|---|---|---|
identifier | string | The ID of the created cluster. |
region | string | AWS region. |
For more information, see AWS::DSQL::Cluster.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | clusters | INSERT | , region |
delete_resource | clusters | DELETE | Identifier, region |
update_resource | clusters | UPDATE | Identifier, PatchDocument, region |
list_resources | clusters_list_only | SELECT | region |
get_resource | clusters | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 = '{{ region }}' AND
Identifier = '{{ identifier }}';
Lists all clusters in a region.
SELECT
region,
identifier
FROM awscc.dsql.clusters_list_only
WHERE
region = '{{ region }}';
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.dsql.clusters (
DeletionProtectionEnabled,
Tags,
MultiRegionProperties,
KmsEncryptionKey,
region
)
SELECT
'{{ deletion_protection_enabled }}',
'{{ tags }}',
'{{ multi_region_properties }}',
'{{ kms_encryption_key }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: cluster
props:
- name: deletion_protection_enabled
value: '{{ deletion_protection_enabled }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: multi_region_properties
value:
witness_region: '{{ witness_region }}'
clusters:
- '{{ clusters[0] }}'
- name: kms_encryption_key
value: '{{ kms_encryption_key }}'
UPDATE example
Use the following StackQL query and manifest file to update a cluster resource, using stack-deploy.
/*+ update */
UPDATE awscc.dsql.clusters
SET PatchDocument = string('{{ {
"DeletionProtectionEnabled": deletion_protection_enabled,
"Tags": tags,
"MultiRegionProperties": multi_region_properties,
"KmsEncryptionKey": kms_encryption_key
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ identifier }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.dsql.clusters
WHERE
Identifier = '{{ identifier }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the clusters resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
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
dsql:GetCluster,
dsql:GetVpcEndpointServiceName,
dsql:ListTagsForResource,
tag:GetTagKeys,
tag:GetTagValues
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
dsql:DeleteCluster,
dsql:GetCluster,
dsql:ListTagsForResource
dsql:ListClusters,
dsql:ListTagsForResource,
tag:GetTagKeys,
tag:GetTagValues