Menu
Amazon ElastiCache
API Reference (API Version 2015-02-02)

ModifyReplicationGroup

Modifies the settings for a replication group.

Important

Due to current limitations on Redis (cluster mode disabled), this operation or parameter is not supported on Redis (cluster mode enabled) replication groups.

Note

This operation is valid for Redis only.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

ReplicationGroupId

The identifier of the replication group to modify.

Type: String

Required: Yes

ApplyImmediately

If true, this parameter causes the modifications in this request and any pending modifications to be applied, asynchronously and as soon as possible, regardless of the PreferredMaintenanceWindow setting for the replication group.

If false, changes to the nodes in the replication group are applied on the next maintenance reboot, or the next failure reboot, whichever occurs first.

Valid values: true | false

Default: false

Type: Boolean

Required: No

AutomaticFailoverEnabled

Determines whether a read replica is automatically promoted to read/write primary if the existing primary encounters a failure.

Valid values: true | false

Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover on:

  • Redis versions earlier than 2.8.6.

  • Redis (cluster mode disabled): T1 and T2 cache node types.

  • Redis (cluster mode enabled): T1 node types.

Type: Boolean

Required: No

AutoMinorVersionUpgrade

This parameter is currently disabled.

Type: Boolean

Required: No

CacheNodeType

A valid cache node type that you want to scale this replication group to.

Type: String

Required: No

CacheParameterGroupName

The name of the cache parameter group to apply to all of the clusters in this replication group. This change is asynchronously applied as soon as possible for parameters when the ApplyImmediately parameter is specified as true for this request.

Type: String

Required: No

CacheSecurityGroupNames.CacheSecurityGroupName.N

A list of cache security group names to authorize for the clusters in this replication group. This change is asynchronously applied as soon as possible.

This parameter can be used only with replication group containing cache clusters running outside of an Amazon Virtual Private Cloud (Amazon VPC).

Constraints: Must contain no more than 255 alphanumeric characters. Must not be Default.

Type: Array of strings

Required: No

EngineVersion

The upgraded version of the cache engine to be run on the cache clusters in the replication group.

Important: You can upgrade to a newer engine version (see Selecting a Cache Engine and Version), but you cannot downgrade to an earlier engine version. If you want to use an earlier engine version, you must delete the existing replication group and create it anew with the earlier engine version.

Type: String

Required: No

NodeGroupId

The name of the Node Group (called shard in the console).

Type: String

Required: No

NotificationTopicArn

The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications are sent.

Note

The Amazon SNS topic owner must be same as the replication group owner.

Type: String

Required: No

NotificationTopicStatus

The status of the Amazon SNS notification topic for the replication group. Notifications are sent only if the status is active.

Valid values: active | inactive

Type: String

Required: No

PreferredMaintenanceWindow

Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period.

Valid values for ddd are:

  • sun

  • mon

  • tue

  • wed

  • thu

  • fri

  • sat

Example: sun:23:00-mon:01:30

Type: String

Required: No

PrimaryClusterId

For replication groups with a single primary, if this parameter is specified, ElastiCache promotes the specified cluster in the specified replication group to the primary role. The nodes of all other clusters in the replication group are read replicas.

Type: String

Required: No

ReplicationGroupDescription

A description for the replication group. Maximum length is 255 characters.

Type: String

Required: No

SecurityGroupIds.SecurityGroupId.N

Specifies the VPC Security Groups associated with the cache clusters in the replication group.

This parameter can be used only with replication group containing cache clusters running in an Amazon Virtual Private Cloud (Amazon VPC).

Type: Array of strings

Required: No

SnapshotRetentionLimit

The number of days for which ElastiCache retains automatic node group (shard) snapshots before deleting them. For example, if you set SnapshotRetentionLimit to 5, a snapshot that was taken today is retained for 5 days before being deleted.

Important If the value of SnapshotRetentionLimit is set to zero (0), backups are turned off.

Type: Integer

Required: No

SnapshottingClusterId

The cache cluster ID that is used as the daily snapshot source for the replication group. This parameter cannot be set for Redis (cluster mode enabled) replication groups.

Type: String

Required: No

SnapshotWindow

The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of the node group (shard) specified by SnapshottingClusterId.

Example: 05:00-09:00

If you do not specify this parameter, ElastiCache automatically chooses an appropriate time range.

Type: String

Required: No

Response Elements

The following element is returned by the service.

ReplicationGroup

Contains all of the attributes of a specific Redis replication group.

Type: ReplicationGroup object

Errors

For information about the errors that are common to all actions, see Common Errors.

CacheClusterNotFound

The requested cache cluster ID does not refer to an existing cache cluster.

HTTP Status Code: 404

CacheParameterGroupNotFound

The requested cache parameter group name does not refer to an existing cache parameter group.

HTTP Status Code: 404

CacheSecurityGroupNotFound

The requested cache security group name does not refer to an existing cache security group.

HTTP Status Code: 404

InsufficientCacheClusterCapacity

The requested cache node type is not available in the specified Availability Zone.

HTTP Status Code: 400

InvalidCacheClusterState

The requested cache cluster is not in the available state.

HTTP Status Code: 400

InvalidCacheSecurityGroupState

The current state of the cache security group does not allow deletion.

HTTP Status Code: 400

InvalidParameterCombination

Two or more incompatible parameters were specified.

HTTP Status Code: 400

InvalidParameterValue

The value for a parameter is invalid.

HTTP Status Code: 400

InvalidReplicationGroupState

The requested replication group is not in the available state.

HTTP Status Code: 400

InvalidVPCNetworkStateFault

The VPC network is in an invalid state.

HTTP Status Code: 400

NodeQuotaForClusterExceeded

The request cannot be processed because it would exceed the allowed number of cache nodes in a single cache cluster.

HTTP Status Code: 400

NodeQuotaForCustomerExceeded

The request cannot be processed because it would exceed the allowed number of cache nodes per customer.

HTTP Status Code: 400

ReplicationGroupNotFoundFault

The specified replication group does not exist.

HTTP Status Code: 404

Example

Sample Request

Copy
https://elasticache.us-west-2.amazonaws.com/ ?Action=ModifyReplicationGroup &ApplyImmediately=false &ReplicationGroupId=my-repgroup &PrimaryClusterId=my-replica-1 &Version=2015-02-02 &SignatureVersion=4 &SignatureMethod=HmacSHA256 &Timestamp=20150202T192317Z &X-Amz-Credential=<credential>

Sample Response

Copy
<ModifyReplicationGroupResponse xmlns="http://elasticache.amazonaws.com/doc/2015-02-02/"> <ModifyReplicationGroupResult> <ReplicationGroup> <SnapshottingClusterId>my-redis-primary</SnapshottingClusterId> <MemberClusters> <ClusterId>my-redis-primary</ClusterId> <ClusterId>my-replica-1</ClusterId> </MemberClusters> <NodeGroups> <NodeGroup> <NodeGroupId>0001</NodeGroupId> <PrimaryEndpoint> <Port>6379</Port> <Address>my-repgroup.q68zge.ng.0001.use1devo.elmo-dev.amazonaws.com</Address> </PrimaryEndpoint> <Status>available</Status> <NodeGroupMembers> <NodeGroupMember> <CacheClusterId>my-redis-primary</CacheClusterId> <ReadEndpoint> <Port>6379</Port> <Address>my-redis-primary.q68zge.0001.use1devo.elmo-dev.amazonaws.com</Address> </ReadEndpoint> <PreferredAvailabilityZone>us-west-2c</PreferredAvailabilityZone> <CacheNodeId>0001</CacheNodeId> <CurrentRole>primary</CurrentRole> </NodeGroupMember> <NodeGroupMember> <CacheClusterId>my-replica-1</CacheClusterId> <ReadEndpoint> <Port>6379</Port> <Address>my-replica-1.q68zge.0001.use1devo.elmo-dev.amazonaws.com</Address> </ReadEndpoint> <PreferredAvailabilityZone>us-west-2b</PreferredAvailabilityZone> <CacheNodeId>0001</CacheNodeId> <CurrentRole>replica</CurrentRole> </NodeGroupMember> </NodeGroupMembers> </NodeGroup> </NodeGroups> <ReplicationGroupId>my-repgroup</ReplicationGroupId> <Status>available</Status> <PendingModifiedValues> <PrimaryClusterId>my-replica-1</PrimaryClusterId> </PendingModifiedValues> <Description>My replication group</Description> </ReplicationGroup> </ModifyReplicationGroupResult> <ResponseMetadata> <RequestId>6fd0aad6-b9d7-11e3-8a16-7978bb24ffdf</RequestId> </ResponseMetadata> </ModifyReplicationGroupResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: