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 = 'us-east-1' 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 = 'us-east-1';
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 }}';
/*+ 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 }}';
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 }}';
DELETE example
/*+ delete */
DELETE FROM awscc.elasticache.global_replication_groups
WHERE
Identifier = '{{ global_replication_group_id }}' AND
region = 'us-east-1';
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