aws_sdk_elasticache/client/
decrease_replica_count.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`DecreaseReplicaCount`](crate::operation::decrease_replica_count::builders::DecreaseReplicaCountFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`replication_group_id(impl Into<String>)`](crate::operation::decrease_replica_count::builders::DecreaseReplicaCountFluentBuilder::replication_group_id) / [`set_replication_group_id(Option<String>)`](crate::operation::decrease_replica_count::builders::DecreaseReplicaCountFluentBuilder::set_replication_group_id):<br>required: **true**<br><p>The id of the replication group from which you want to remove replica nodes.</p><br>
7    ///   - [`new_replica_count(i32)`](crate::operation::decrease_replica_count::builders::DecreaseReplicaCountFluentBuilder::new_replica_count) / [`set_new_replica_count(Option<i32>)`](crate::operation::decrease_replica_count::builders::DecreaseReplicaCountFluentBuilder::set_new_replica_count):<br>required: **false**<br><p>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.</p> <p>The minimum number of replicas in a shard or replication group is:</p> <ul>  <li>   <p>Valkey or Redis OSS (cluster mode disabled)</p>   <ul>    <li>     <p>If Multi-AZ is enabled: 1</p></li>    <li>     <p>If Multi-AZ is not enabled: 0</p></li>   </ul></li>  <li>   <p>Valkey or Redis OSS (cluster mode enabled): 0 (though you will not be able to failover to a replica if your primary node fails)</p></li> </ul><br>
8    ///   - [`replica_configuration(ConfigureShard)`](crate::operation::decrease_replica_count::builders::DecreaseReplicaCountFluentBuilder::replica_configuration) / [`set_replica_configuration(Option<Vec::<ConfigureShard>>)`](crate::operation::decrease_replica_count::builders::DecreaseReplicaCountFluentBuilder::set_replica_configuration):<br>required: **false**<br><p>A list of <code>ConfigureShard</code> objects that can be used to configure each shard in a Valkey or Redis OSS replication group. The <code>ConfigureShard</code> has three members: <code>NewReplicaCount</code>, <code>NodeGroupId</code>, and <code>PreferredAvailabilityZones</code>.</p><br>
9    ///   - [`replicas_to_remove(impl Into<String>)`](crate::operation::decrease_replica_count::builders::DecreaseReplicaCountFluentBuilder::replicas_to_remove) / [`set_replicas_to_remove(Option<Vec::<String>>)`](crate::operation::decrease_replica_count::builders::DecreaseReplicaCountFluentBuilder::set_replicas_to_remove):<br>required: **false**<br><p>A list of the node ids to remove from the replication group or node group (shard).</p><br>
10    ///   - [`apply_immediately(bool)`](crate::operation::decrease_replica_count::builders::DecreaseReplicaCountFluentBuilder::apply_immediately) / [`set_apply_immediately(Option<bool>)`](crate::operation::decrease_replica_count::builders::DecreaseReplicaCountFluentBuilder::set_apply_immediately):<br>required: **true**<br><p>If <code>True</code>, the number of replica nodes is decreased immediately. <code>ApplyImmediately=False</code> is not currently supported.</p><br>
11    /// - On success, responds with [`DecreaseReplicaCountOutput`](crate::operation::decrease_replica_count::DecreaseReplicaCountOutput) with field(s):
12    ///   - [`replication_group(Option<ReplicationGroup>)`](crate::operation::decrease_replica_count::DecreaseReplicaCountOutput::replication_group): <p>Contains all of the attributes of a specific Valkey or Redis OSS replication group.</p>
13    /// - On failure, responds with [`SdkError<DecreaseReplicaCountError>`](crate::operation::decrease_replica_count::DecreaseReplicaCountError)
14    pub fn decrease_replica_count(&self) -> crate::operation::decrease_replica_count::builders::DecreaseReplicaCountFluentBuilder {
15        crate::operation::decrease_replica_count::builders::DecreaseReplicaCountFluentBuilder::new(self.handle.clone())
16    }
17}