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 | aws.elasticache.global_replication_groups |
Fields
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. |
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. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Members, 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_replication_groups
in a region.
SELECT
region,
global_replication_group_id_suffix,
automatic_failover_enabled,
cache_node_type,
engine_version,
cache_parameter_group_name,
global_node_group_count,
global_replication_group_description,
global_replication_group_id,
members,
status,
regional_configurations
FROM aws.elasticache.global_replication_groups
WHERE region = 'us-east-1';
Gets all properties from an individual global_replication_group
.
SELECT
region,
global_replication_group_id_suffix,
automatic_failover_enabled,
cache_node_type,
engine_version,
cache_parameter_group_name,
global_node_group_count,
global_replication_group_description,
global_replication_group_id,
members,
status,
regional_configurations
FROM aws.elasticache.global_replication_groups
WHERE region = 'us-east-1' AND data__Identifier = '<GlobalReplicationGroupId>';
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 aws.elasticache.global_replication_groups (
Members,
region
)
SELECT
'{{ Members }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.elasticache.global_replication_groups (
GlobalReplicationGroupIdSuffix,
AutomaticFailoverEnabled,
CacheNodeType,
EngineVersion,
CacheParameterGroupName,
GlobalNodeGroupCount,
GlobalReplicationGroupDescription,
Members,
RegionalConfigurations,
region
)
SELECT
'{{ GlobalReplicationGroupIdSuffix }}',
'{{ AutomaticFailoverEnabled }}',
'{{ CacheNodeType }}',
'{{ EngineVersion }}',
'{{ CacheParameterGroupName }}',
'{{ GlobalNodeGroupCount }}',
'{{ GlobalReplicationGroupDescription }}',
'{{ Members }}',
'{{ RegionalConfigurations }}',
'{{ 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: GlobalReplicationGroupIdSuffix
value: '{{ GlobalReplicationGroupIdSuffix }}'
- name: AutomaticFailoverEnabled
value: '{{ AutomaticFailoverEnabled }}'
- name: CacheNodeType
value: '{{ CacheNodeType }}'
- name: EngineVersion
value: '{{ EngineVersion }}'
- name: CacheParameterGroupName
value: '{{ CacheParameterGroupName }}'
- name: GlobalNodeGroupCount
value: '{{ GlobalNodeGroupCount }}'
- name: GlobalReplicationGroupDescription
value: '{{ GlobalReplicationGroupDescription }}'
- name: Members
value:
- ReplicationGroupId: '{{ ReplicationGroupId }}'
ReplicationGroupRegion: '{{ ReplicationGroupRegion }}'
Role: '{{ Role }}'
- name: RegionalConfigurations
value:
- ReplicationGroupId: '{{ ReplicationGroupId }}'
ReplicationGroupRegion: '{{ ReplicationGroupRegion }}'
ReshardingConfigurations:
- NodeGroupId: '{{ NodeGroupId }}'
PreferredAvailabilityZones:
- '{{ PreferredAvailabilityZones[0] }}'
DELETE
example
/*+ delete */
DELETE FROM aws.elasticache.global_replication_groups
WHERE data__Identifier = '<GlobalReplicationGroupId>'
AND region = 'us-east-1';
Permissions
To operate on the global_replication_groups
resource, the following permissions are required:
Create
elasticache:CreateGlobalReplicationGroup,
elasticache:DescribeGlobalReplicationGroups
Read
elasticache:DescribeGlobalReplicationGroups
Update
elasticache:ModifyGlobalReplicationGroup,
elasticache:FailoverGlobalReplicationGroup,
elasticache:DescribeGlobalReplicationGroups,
elasticache:IncreaseNodeGroupsInGlobalReplicationGroup,
elasticache:DecreaseNodeGroupsInGlobalReplicationGroup,
elasticache:DisassociateGlobalReplicationGroup,
elasticache:RebalanceSlotsInGlobalReplicationGroup
Delete
elasticache:DeleteGlobalReplicationGroup,
elasticache:DisassociateGlobalReplicationGroup,
elasticache:DescribeGlobalReplicationGroups
List
elasticache:DescribeGlobalReplicationGroups