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 | awscc.rds.global_clusters |
Fields
- get (all properties)
- list (identifiers only)
| 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).<br />If you specify the SourceDBClusterIdentifier property, don't specify this property. The value is inherited from the cluster. |
tags | array | An array of key-value pairs to apply to this resource. |
engine_lifecycle_support | string | The life cycle type of the global cluster. You can use this setting to enroll your global cluster into Amazon RDS Extended Support. |
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.<br />If you specify the SourceDBClusterIdentifier property, don't specify this property. The value is inherited from the cluster. |
global_endpoint | object | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
global_cluster_identifier | string | The cluster identifier of the new global database cluster. This parameter is stored as a lowercase string. |
region | string | AWS region. |
For more information, see AWS::RDS::GlobalCluster.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | global_clusters | INSERT | region |
delete_resource | global_clusters | DELETE | Identifier, region |
update_resource | global_clusters | UPDATE | Identifier, PatchDocument, region |
list_resources | global_clusters_list_only | SELECT | region |
get_resource | global_clusters | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual global_cluster.
SELECT
region,
engine,
tags,
engine_lifecycle_support,
engine_version,
deletion_protection,
global_cluster_identifier,
source_db_cluster_identifier,
storage_encrypted,
global_endpoint
FROM awscc.rds.global_clusters
WHERE
region = 'us-east-1' AND
Identifier = '{{ global_cluster_identifier }}';
Lists all global_clusters in a region.
SELECT
region,
global_cluster_identifier
FROM awscc.rds.global_clusters_list_only
WHERE
region = 'us-east-1';
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 awscc.rds.global_clusters (
Engine,
Tags,
EngineLifecycleSupport,
EngineVersion,
DeletionProtection,
GlobalClusterIdentifier,
SourceDBClusterIdentifier,
StorageEncrypted,
region
)
SELECT
'{{ engine }}',
'{{ tags }}',
'{{ engine_lifecycle_support }}',
'{{ engine_version }}',
'{{ deletion_protection }}',
'{{ global_cluster_identifier }}',
'{{ source_db_cluster_identifier }}',
'{{ storage_encrypted }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.rds.global_clusters (
Engine,
Tags,
EngineLifecycleSupport,
EngineVersion,
DeletionProtection,
GlobalClusterIdentifier,
SourceDBClusterIdentifier,
StorageEncrypted,
region
)
SELECT
'{{ engine }}',
'{{ tags }}',
'{{ engine_lifecycle_support }}',
'{{ engine_version }}',
'{{ deletion_protection }}',
'{{ global_cluster_identifier }}',
'{{ source_db_cluster_identifier }}',
'{{ storage_encrypted }}',
'{{ 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: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: engine_lifecycle_support
value: '{{ engine_lifecycle_support }}'
- name: engine_version
value: '{{ engine_version }}'
- name: deletion_protection
value: '{{ deletion_protection }}'
- name: global_cluster_identifier
value: '{{ global_cluster_identifier }}'
- name: source_db_cluster_identifier
value: '{{ source_db_cluster_identifier }}'
- name: storage_encrypted
value: '{{ storage_encrypted }}'
UPDATE example
Use the following StackQL query and manifest file to update a global_cluster resource, using stack-deploy.
/*+ update */
UPDATE awscc.rds.global_clusters
SET PatchDocument = string('{{ {
"Tags": tags,
"EngineLifecycleSupport": engine_lifecycle_support,
"EngineVersion": engine_version,
"DeletionProtection": deletion_protection
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ global_cluster_identifier }}';
DELETE example
/*+ delete */
DELETE FROM awscc.rds.global_clusters
WHERE
Identifier = '{{ global_cluster_identifier }}' AND
region = 'us-east-1';
Permissions
To operate on the global_clusters resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
rds:CreateGlobalCluster,
rds:DescribeDBClusters,
rds:DescribeGlobalClusters
rds:DescribeGlobalClusters
rds:ModifyGlobalCluster,
rds:DescribeGlobalClusters,
rds:AddTagsToResource,
rds:RemoveTagsFromResource
rds:DescribeGlobalClusters,
rds:DeleteGlobalCluster,
rds:RemoveFromGlobalCluster,
rds:DescribeDBClusters
rds:DescribeGlobalClusters