global_clusters
Creates, updates, deletes or gets a global_cluster
resource or lists global_clusters
in a region
Overview
Name | global_clusters |
Type | Resource |
Description | Resource Type definition for AWS::RDS::GlobalCluster |
Id | aws.rds.global_clusters |
Fields
Name | Datatype | Description |
---|---|---|
engine | string | The name of the database engine to be used for this DB cluster. Valid Values: aurora (for MySQL 5.6-compatible Aurora), aurora-mysql (for MySQL 5.7-compatible Aurora). If you specify the SourceDBClusterIdentifier property, don't specify this property. The value is inherited from the cluster. |
engine_version | string | The version number of the database engine to use. If you specify the SourceDBClusterIdentifier property, don't specify this property. The value is inherited from the cluster. |
deletion_protection | boolean | The deletion protection setting for the new global database. The global database can't be deleted when deletion protection is enabled. |
global_cluster_identifier | string | The cluster identifier of the new global database cluster. This parameter is stored as a lowercase string. |
source_db_cluster_identifier | string | The Amazon Resource Name (ARN) to use as the primary cluster of the global database. This parameter is optional. This parameter is stored as a lowercase string. |
storage_encrypted | boolean | The storage encryption setting for the new global database cluster. If you specify the SourceDBClusterIdentifier property, don't specify this property. The value is inherited from the cluster. |
region | string | AWS region. |
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 global_clusters
in a region.
SELECT
region,
engine,
engine_version,
deletion_protection,
global_cluster_identifier,
source_db_cluster_identifier,
storage_encrypted
FROM aws.rds.global_clusters
WHERE region = 'us-east-1';
Gets all properties from an individual global_cluster
.
SELECT
region,
engine,
engine_version,
deletion_protection,
global_cluster_identifier,
source_db_cluster_identifier,
storage_encrypted
FROM aws.rds.global_clusters
WHERE region = 'us-east-1' AND data__Identifier = '<GlobalClusterIdentifier>';
INSERT
example
Use the following StackQL query and manifest file to create a new global_cluster
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.rds.global_clusters (
Engine,
EngineVersion,
DeletionProtection,
GlobalClusterIdentifier,
SourceDBClusterIdentifier,
StorageEncrypted,
region
)
SELECT
'{{ Engine }}',
'{{ EngineVersion }}',
'{{ DeletionProtection }}',
'{{ GlobalClusterIdentifier }}',
'{{ SourceDBClusterIdentifier }}',
'{{ StorageEncrypted }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.rds.global_clusters (
Engine,
EngineVersion,
DeletionProtection,
GlobalClusterIdentifier,
SourceDBClusterIdentifier,
StorageEncrypted,
region
)
SELECT
'{{ Engine }}',
'{{ EngineVersion }}',
'{{ DeletionProtection }}',
'{{ GlobalClusterIdentifier }}',
'{{ SourceDBClusterIdentifier }}',
'{{ StorageEncrypted }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: global_cluster
props:
- name: Engine
value: '{{ Engine }}'
- name: EngineVersion
value: '{{ EngineVersion }}'
- name: DeletionProtection
value: '{{ DeletionProtection }}'
- name: GlobalClusterIdentifier
value: '{{ GlobalClusterIdentifier }}'
- name: SourceDBClusterIdentifier
value: '{{ SourceDBClusterIdentifier }}'
- name: StorageEncrypted
value: '{{ StorageEncrypted }}'
DELETE
example
/*+ delete */
DELETE FROM aws.rds.global_clusters
WHERE data__Identifier = '<GlobalClusterIdentifier>'
AND region = 'us-east-1';
Permissions
To operate on the global_clusters
resource, the following permissions are required:
Create
rds:CreateGlobalCluster,
rds:DescribeDBClusters,
rds:DescribeGlobalClusters
Read
rds:DescribeGlobalClusters
Update
rds:ModifyGlobalCluster,
rds:DescribeGlobalClusters
Delete
rds:DescribeGlobalClusters,
rds:DeleteGlobalCluster,
rds:RemoveFromGlobalCluster,
rds:DescribeDBClusters
List
rds:DescribeGlobalClusters