decrease_replica_count
async
¶
decrease_replica_count(
*,
config_overrides: Optional[AsyncElastiCacheClientConfig] = None,
replication_group_id: Optional[String] = None,
new_replica_count: Optional[IntegerOptional] = None,
replica_configuration: Optional[ReplicaConfigurationList] = None,
replicas_to_remove: Optional[RemoveReplicasList] = None,
apply_immediately: Optional[Boolean] = None,
) -> DecreaseReplicaCountResult
Dynamically decreases 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.
Parameters:
-
replication_group_id(Optional[String], default:None) –The id of the replication group from which you want to remove replica nodes.
-
new_replica_count(Optional[IntegerOptional], default:None) –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.
The minimum number of replicas in a shard or replication group is:
-
Valkey or Redis OSS (cluster mode disabled)
-
If Multi-AZ is enabled: 1
-
If Multi-AZ is not enabled: 0
-
-
Valkey or Redis OSS (cluster mode enabled): 0 (though you will not be able to failover to a replica if your primary node fails)
-
-
replica_configuration(Optional[ReplicaConfigurationList], default:None) –A list of
ConfigureShardobjects that can be used to configure each shard in a Valkey or Redis OSS replication group. TheConfigureShardhas three members:NewReplicaCount,NodeGroupId, andPreferredAvailabilityZones. -
replicas_to_remove(Optional[RemoveReplicasList], default:None) –A list of the node ids to remove from the replication group or node group (shard).
-
apply_immediately(Optional[Boolean], default:None) –If
True, the number of replica nodes is decreased immediately.ApplyImmediately=Falseis not currently supported.
Raises:
-
ClusterQuotaForCustomerExceededFault–The request cannot be processed because it would exceed the allowed number of clusters per customer.
-
InsufficientCacheClusterCapacityFault–The requested cache node type is not available in the specified Availability Zone. For more information, see InsufficientCacheClusterCapacity in the ElastiCache User Guide.
-
InvalidCacheClusterStateFault–The requested cluster is not in the
availablestate. -
InvalidParameterCombinationException–Two or more incompatible parameters were specified.
-
InvalidParameterValueException–The value for a parameter is invalid.
-
InvalidReplicationGroupStateFault–The requested replication group is not in the
availablestate. -
InvalidVPCNetworkStateFault–The VPC network is in an invalid state.
-
NodeGroupsPerReplicationGroupQuotaExceededFault–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
-
NodeQuotaForCustomerExceededFault–The request cannot be processed because it would exceed the allowed number of cache nodes per customer.
-
NoOperationFault–The operation was not performed because no changes were required.
-
ReplicationGroupNotFoundFault–The specified replication group does not exist.
-
ServiceLinkedRoleNotFoundFault–The specified service linked role (SLR) was not found.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_elasticache/_services/async_elasti_cache.py
2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 | |