Skip to main content

global_clusters

Creates, updates, deletes or gets a global_cluster resource or lists global_clusters in a region

Overview

Nameglobal_clusters
TypeResource
DescriptionResource Type definition for AWS::RDS::GlobalCluster
Idawscc.rds.global_clusters

Fields

NameDatatypeDescription
enginestring
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.
tagsarrayAn array of key-value pairs to apply to this resource.
engine_lifecycle_supportstringThe life cycle type of the global cluster. You can use this setting to enroll your global cluster into Amazon RDS Extended Support.
engine_versionstringThe 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_protectionbooleanThe deletion protection setting for the new global database. The global database can't be deleted when deletion protection is enabled.
global_cluster_identifierstringThe cluster identifier of the new global database cluster. This parameter is stored as a lowercase string.
source_db_cluster_identifierstringThe 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_encryptedboolean
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.
global_endpointobject
regionstringAWS region.

For more information, see AWS::RDS::GlobalCluster.

Methods

NameResourceAccessible byRequired Params
create_resourceglobal_clustersINSERTregion
delete_resourceglobal_clustersDELETEIdentifier, region
update_resourceglobal_clustersUPDATEIdentifier, PatchDocument, region
list_resourcesglobal_clusters_list_onlySELECTregion
get_resourceglobal_clustersSELECTIdentifier, region

SELECT examples

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 = '{{ region }}' AND
Identifier = '{{ global_cluster_identifier }}';

INSERT example

Use the following StackQL query and manifest file to create a new global_cluster resource, using stack-deploy.

/*+ 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.rds.global_clusters
WHERE
Identifier = '{{ global_cluster_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:

ParameterDescription
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 global_clusters resource, the following permissions are required:

rds:CreateGlobalCluster,
rds:DescribeDBClusters,
rds:DescribeGlobalClusters