global_replication_groups
Creates, updates, deletes or gets a global_replication_group resource or lists global_replication_groups in a region
Overview
| Name | global_replication_groups |
| Type | Resource |
| Description | The AWS::ElastiCache::GlobalReplicationGroup resource creates an Amazon ElastiCache Global Replication Group. |
| Id | awscc.elasticache.global_replication_groups |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
global_replication_group_id_suffix | string | The suffix name of a Global Datastore. Amazon ElastiCache automatically applies a prefix to the Global Datastore ID when it is created. Each AWS Region has its own prefix. |
automatic_failover_enabled | boolean | AutomaticFailoverEnabled |
cache_node_type | string | The cache node type of the Global Datastore |
engine_version | string | The engine version of the Global Datastore. |
engine | string | The engine of the Global Datastore. |
cache_parameter_group_name | string | Cache parameter group name to use for the new engine version. This parameter cannot be modified independently. |
global_node_group_count | integer | Indicates the number of node groups in the Global Datastore. |
global_replication_group_description | string | The optional description of the Global Datastore |
global_replication_group_id | string | The name of the Global Datastore, it is generated by ElastiCache adding a prefix to GlobalReplicationGroupIdSuffix. |
members | array | The replication groups that comprise the Global Datastore. |
status | string | The status of the Global Datastore |
regional_configurations | array | Describes the replication group IDs, the AWS regions where they are stored and the shard configuration for each that comprise the Global Datastore |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
global_replication_group_id | string | The name of the Global Datastore, it is generated by ElastiCache adding a prefix to GlobalReplicationGroupIdSuffix. |
region | string | AWS region. |
For more information, see AWS::ElastiCache::GlobalReplicationGroup.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | global_replication_groups | INSERT | Members, region |
delete_resource | global_replication_groups | DELETE | Identifier, region |
update_resource | global_replication_groups | UPDATE | Identifier, PatchDocument, region |
list_resources | global_replication_groups_list_only | SELECT | region |
get_resource | global_replication_groups | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual global_replication_group.
SELECT
region,
global_replication_group_id_suffix,
automatic_failover_enabled,
cache_node_type,
engine_version,
engine,
cache_parameter_group_name,
global_node_group_count,
global_replication_group_description,
global_replication_group_id,
members,
status,
regional_configurations
FROM awscc.elasticache.global_replication_groups
WHERE
region = '{{ region }}' AND
Identifier = '{{ global_replication_group_id }}';
Lists all global_replication_groups in a region.
SELECT
region,
global_replication_group_id
FROM awscc.elasticache.global_replication_groups_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new global_replication_group resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.elasticache.global_replication_groups (
Members,
region
)
SELECT
'{{ members }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.elasticache.global_replication_groups (
GlobalReplicationGroupIdSuffix,
AutomaticFailoverEnabled,
CacheNodeType,
EngineVersion,
Engine,
CacheParameterGroupName,
GlobalNodeGroupCount,
GlobalReplicationGroupDescription,
Members,
RegionalConfigurations,
region
)
SELECT
'{{ global_replication_group_id_suffix }}',
'{{ automatic_failover_enabled }}',
'{{ cache_node_type }}',
'{{ engine_version }}',
'{{ engine }}',
'{{ cache_parameter_group_name }}',
'{{ global_node_group_count }}',
'{{ global_replication_group_description }}',
'{{ members }}',
'{{ regional_configurations }}',
'{{ 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: global_replication_group
props:
- name: global_replication_group_id_suffix
value: '{{ global_replication_group_id_suffix }}'
- name: automatic_failover_enabled
value: '{{ automatic_failover_enabled }}'
- name: cache_node_type
value: '{{ cache_node_type }}'
- name: engine_version
value: '{{ engine_version }}'
- name: engine
value: '{{ engine }}'
- name: cache_parameter_group_name
value: '{{ cache_parameter_group_name }}'
- name: global_node_group_count
value: '{{ global_node_group_count }}'
- name: global_replication_group_description
value: '{{ global_replication_group_description }}'
- name: members
value:
- replication_group_id: '{{ replication_group_id }}'
replication_group_region: '{{ replication_group_region }}'
role: '{{ role }}'
- name: regional_configurations
value:
- replication_group_id: '{{ replication_group_id }}'
replication_group_region: '{{ replication_group_region }}'
resharding_configurations:
- node_group_id: '{{ node_group_id }}'
preferred_availability_zones:
- '{{ preferred_availability_zones[0] }}'
UPDATE example
Use the following StackQL query and manifest file to update a global_replication_group resource, using stack-deploy.
/*+ update */
UPDATE awscc.elasticache.global_replication_groups
SET PatchDocument = string('{{ {
"GlobalReplicationGroupIdSuffix": global_replication_group_id_suffix,
"AutomaticFailoverEnabled": automatic_failover_enabled,
"CacheNodeType": cache_node_type,
"EngineVersion": engine_version,
"Engine": engine,
"CacheParameterGroupName": cache_parameter_group_name,
"GlobalNodeGroupCount": global_node_group_count,
"GlobalReplicationGroupDescription": global_replication_group_description,
"Members": members,
"RegionalConfigurations": regional_configurations
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ global_replication_group_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.elasticache.global_replication_groups
WHERE
Identifier = '{{ global_replication_group_id }}' 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 global_replication_groups resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
elasticache:CreateGlobalReplicationGroup,
elasticache:DescribeGlobalReplicationGroups
elasticache:DescribeGlobalReplicationGroups
elasticache:ModifyGlobalReplicationGroup,
elasticache:FailoverGlobalReplicationGroup,
elasticache:DescribeGlobalReplicationGroups,
elasticache:IncreaseNodeGroupsInGlobalReplicationGroup,
elasticache:DecreaseNodeGroupsInGlobalReplicationGroup,
elasticache:DisassociateGlobalReplicationGroup,
elasticache:RebalanceSlotsInGlobalReplicationGroup
elasticache:DeleteGlobalReplicationGroup,
elasticache:DisassociateGlobalReplicationGroup,
elasticache:DescribeGlobalReplicationGroups
elasticache:DescribeGlobalReplicationGroups