IncreaseReplicaCount
Dynamically increases the number of replicas in a Valkey or Redis OSS (cluster mode disabled) replication group or the number of replica nodes in one or more node groups (shards) of a Valkey or Redis OSS (cluster mode enabled) replication group. This operation is performed with no cluster down time.
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
- ApplyImmediately
-
If
True
, the number of replica nodes is increased immediately.ApplyImmediately=False
is not currently supported.Type: Boolean
Required: Yes
- ReplicationGroupId
-
The id of the replication group to which you want to add replica nodes.
Type: String
Required: Yes
- NewReplicaCount
-
The number of read replica nodes you want at the completion of this operation. For Valkey or Redis OSS (cluster mode disabled) replication groups, this is the number of replica nodes in the replication group. For Valkey or Redis OSS (cluster mode enabled) replication groups, this is the number of replica nodes in each of the replication group's node groups.
Type: Integer
Required: No
- ReplicaConfiguration.ConfigureShard.N
-
A list of
ConfigureShard
objects that can be used to configure each shard in a Valkey or Redis OSS (cluster mode enabled) replication group. TheConfigureShard
has three members:NewReplicaCount
,NodeGroupId
, andPreferredAvailabilityZones
.Type: Array of ConfigureShard objects
Required: No
Response Elements
The following element is returned by the service.
- ReplicationGroup
-
Contains all of the attributes of a specific Valkey or Redis OSS replication group.
Type: ReplicationGroup object
Errors
For information about the errors that are common to all actions, see Common Errors.
- ClusterQuotaForCustomerExceeded
-
The request cannot be processed because it would exceed the allowed number of clusters per customer.
HTTP Status Code: 400
- InsufficientCacheClusterCapacity
-
The requested cache node type is not available in the specified Availability Zone. For more information, see InsufficientCacheClusterCapacity in the ElastiCache User Guide.
HTTP Status Code: 400
- InvalidCacheClusterState
-
The requested cluster is not in the
available
state.HTTP Status Code: 400
- InvalidKMSKeyFault
-
The KMS key supplied is not valid.
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
- NodeGroupsPerReplicationGroupQuotaExceeded
-
The request cannot be processed because it would exceed the maximum allowed number of node groups (shards) in a single replication group. The default maximum is 90
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
- NoOperationFault
-
The operation was not performed because no changes were required.
HTTP Status Code: 400
- ReplicationGroupNotFoundFault
-
The specified replication group does not exist.
HTTP Status Code: 404
Examples
Example
The following example increases the replica count to 3 in all node groups
of sample-repl-group
.
https://elasticache.us-west-2.amazonaws.com/ ?Action=IncreaseReplicaCount &ApplyImmediately=True &NewReplicaCount=3 &ReplicationGroupId=sample-repl-group &Version=2015-02-02 &SignatureVersion=4 &SignatureMethod=HmacSHA256 &Timestamp=20150202T192317Z &X-Amz-Credential=<credential>
Example
The following example increases the replica count in two node groups. Because there are multiple node groups, this code only works for Valkey or Redis OSS (cluster mode enabled) replication groups.
https://elasticache.us-west-2.amazonaws.com/ ?Action=IncreaseReplicaCount &ApplyImmediately=True &ReplicaConfiguration.ConfigureShard.1.NodeGroupId=0001 &ReplicaConfiguration.ConfigureShard.1.NewReplicaCount=2 &ReplicaConfiguration.ConfigureShard.1.PreferredAvailabilityZones.PreferredAvailabilityZone.1=us-east-1a &ReplicaConfiguration.ConfigureShard.1.PreferredAvailabilityZones.PreferredAvailabilityZone.2=us-east-1c &ReplicaConfiguration.ConfigureShard.1.PreferredAvailabilityZones.PreferredAvailabilityZone.3=us-east-1b &ReplicaConfiguration.ConfigureShard.2.NodeGroupId=0003 &ReplicaConfiguration.ConfigureShard.2.NewReplicaCount=3 &ReplicaConfiguration.ConfigureShard.2.PreferredAvailabilityZones.PreferredAvailabilityZone.1=us-east-1a &ReplicaConfiguration.ConfigureShard.2.PreferredAvailabilityZones.PreferredAvailabilityZone.2=us-east-1b &ReplicaConfiguration.ConfigureShard.2.PreferredAvailabilityZones.PreferredAvailabilityZone.3=us-east-1c &ReplicaConfiguration.ConfigureShard.2.PreferredAvailabilityZones.PreferredAvailabilityZone.4=us-east-1c &ReplicationGroupId=sample-repl-group &Version=2015-02-02 &SignatureVersion=4 &SignatureMethod=HmacSHA256 &Timestamp=20150202T192317Z &X-Amz-Credential=<credential>
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: