aws_sdk_elasticache/operation/modify_replication_group/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::modify_replication_group::_modify_replication_group_output::ModifyReplicationGroupOutputBuilder;
3
4pub use crate::operation::modify_replication_group::_modify_replication_group_input::ModifyReplicationGroupInputBuilder;
5
6impl crate::operation::modify_replication_group::builders::ModifyReplicationGroupInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::modify_replication_group::ModifyReplicationGroupOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::modify_replication_group::ModifyReplicationGroupError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.modify_replication_group();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `ModifyReplicationGroup`.
24///
25/// <p>Modifies the settings for a replication group. This is limited to Valkey and Redis OSS 7 and above.</p>
26/// <ul>
27/// <li>
28/// <p><a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/scaling-redis-cluster-mode-enabled.html">Scaling for Valkey or Redis OSS (cluster mode enabled)</a> in the ElastiCache User Guide</p></li>
29/// <li>
30/// <p><a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_ModifyReplicationGroupShardConfiguration.html">ModifyReplicationGroupShardConfiguration</a> in the ElastiCache API Reference</p></li>
31/// </ul><note>
32/// <p>This operation is valid for Valkey or Redis OSS only.</p>
33/// </note>
34#[derive(::std::clone::Clone, ::std::fmt::Debug)]
35pub struct ModifyReplicationGroupFluentBuilder {
36 handle: ::std::sync::Arc<crate::client::Handle>,
37 inner: crate::operation::modify_replication_group::builders::ModifyReplicationGroupInputBuilder,
38 config_override: ::std::option::Option<crate::config::Builder>,
39}
40impl
41 crate::client::customize::internal::CustomizableSend<
42 crate::operation::modify_replication_group::ModifyReplicationGroupOutput,
43 crate::operation::modify_replication_group::ModifyReplicationGroupError,
44 > for ModifyReplicationGroupFluentBuilder
45{
46 fn send(
47 self,
48 config_override: crate::config::Builder,
49 ) -> crate::client::customize::internal::BoxFuture<
50 crate::client::customize::internal::SendResult<
51 crate::operation::modify_replication_group::ModifyReplicationGroupOutput,
52 crate::operation::modify_replication_group::ModifyReplicationGroupError,
53 >,
54 > {
55 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
56 }
57}
58impl ModifyReplicationGroupFluentBuilder {
59 /// Creates a new `ModifyReplicationGroupFluentBuilder`.
60 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
61 Self {
62 handle,
63 inner: ::std::default::Default::default(),
64 config_override: ::std::option::Option::None,
65 }
66 }
67 /// Access the ModifyReplicationGroup as a reference.
68 pub fn as_input(&self) -> &crate::operation::modify_replication_group::builders::ModifyReplicationGroupInputBuilder {
69 &self.inner
70 }
71 /// Sends the request and returns the response.
72 ///
73 /// If an error occurs, an `SdkError` will be returned with additional details that
74 /// can be matched against.
75 ///
76 /// By default, any retryable failures will be retried twice. Retry behavior
77 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
78 /// set when configuring the client.
79 pub async fn send(
80 self,
81 ) -> ::std::result::Result<
82 crate::operation::modify_replication_group::ModifyReplicationGroupOutput,
83 ::aws_smithy_runtime_api::client::result::SdkError<
84 crate::operation::modify_replication_group::ModifyReplicationGroupError,
85 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
86 >,
87 > {
88 let input = self
89 .inner
90 .build()
91 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
92 let runtime_plugins = crate::operation::modify_replication_group::ModifyReplicationGroup::operation_runtime_plugins(
93 self.handle.runtime_plugins.clone(),
94 &self.handle.conf,
95 self.config_override,
96 );
97 crate::operation::modify_replication_group::ModifyReplicationGroup::orchestrate(&runtime_plugins, input).await
98 }
99
100 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
101 pub fn customize(
102 self,
103 ) -> crate::client::customize::CustomizableOperation<
104 crate::operation::modify_replication_group::ModifyReplicationGroupOutput,
105 crate::operation::modify_replication_group::ModifyReplicationGroupError,
106 Self,
107 > {
108 crate::client::customize::CustomizableOperation::new(self)
109 }
110 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
111 self.set_config_override(::std::option::Option::Some(config_override.into()));
112 self
113 }
114
115 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
116 self.config_override = config_override;
117 self
118 }
119 /// <p>The identifier of the replication group to modify.</p>
120 pub fn replication_group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121 self.inner = self.inner.replication_group_id(input.into());
122 self
123 }
124 /// <p>The identifier of the replication group to modify.</p>
125 pub fn set_replication_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
126 self.inner = self.inner.set_replication_group_id(input);
127 self
128 }
129 /// <p>The identifier of the replication group to modify.</p>
130 pub fn get_replication_group_id(&self) -> &::std::option::Option<::std::string::String> {
131 self.inner.get_replication_group_id()
132 }
133 /// <p>A description for the replication group. Maximum length is 255 characters.</p>
134 pub fn replication_group_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
135 self.inner = self.inner.replication_group_description(input.into());
136 self
137 }
138 /// <p>A description for the replication group. Maximum length is 255 characters.</p>
139 pub fn set_replication_group_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140 self.inner = self.inner.set_replication_group_description(input);
141 self
142 }
143 /// <p>A description for the replication group. Maximum length is 255 characters.</p>
144 pub fn get_replication_group_description(&self) -> &::std::option::Option<::std::string::String> {
145 self.inner.get_replication_group_description()
146 }
147 /// <p>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.</p>
148 pub fn primary_cluster_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
149 self.inner = self.inner.primary_cluster_id(input.into());
150 self
151 }
152 /// <p>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.</p>
153 pub fn set_primary_cluster_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
154 self.inner = self.inner.set_primary_cluster_id(input);
155 self
156 }
157 /// <p>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.</p>
158 pub fn get_primary_cluster_id(&self) -> &::std::option::Option<::std::string::String> {
159 self.inner.get_primary_cluster_id()
160 }
161 /// <p>The cluster ID that is used as the daily snapshot source for the replication group. This parameter cannot be set for Valkey or Redis OSS (cluster mode enabled) replication groups.</p>
162 pub fn snapshotting_cluster_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
163 self.inner = self.inner.snapshotting_cluster_id(input.into());
164 self
165 }
166 /// <p>The cluster ID that is used as the daily snapshot source for the replication group. This parameter cannot be set for Valkey or Redis OSS (cluster mode enabled) replication groups.</p>
167 pub fn set_snapshotting_cluster_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
168 self.inner = self.inner.set_snapshotting_cluster_id(input);
169 self
170 }
171 /// <p>The cluster ID that is used as the daily snapshot source for the replication group. This parameter cannot be set for Valkey or Redis OSS (cluster mode enabled) replication groups.</p>
172 pub fn get_snapshotting_cluster_id(&self) -> &::std::option::Option<::std::string::String> {
173 self.inner.get_snapshotting_cluster_id()
174 }
175 /// <p>Determines whether a read replica is automatically promoted to read/write primary if the existing primary encounters a failure.</p>
176 /// <p>Valid values: <code>true</code> | <code>false</code></p>
177 pub fn automatic_failover_enabled(mut self, input: bool) -> Self {
178 self.inner = self.inner.automatic_failover_enabled(input);
179 self
180 }
181 /// <p>Determines whether a read replica is automatically promoted to read/write primary if the existing primary encounters a failure.</p>
182 /// <p>Valid values: <code>true</code> | <code>false</code></p>
183 pub fn set_automatic_failover_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
184 self.inner = self.inner.set_automatic_failover_enabled(input);
185 self
186 }
187 /// <p>Determines whether a read replica is automatically promoted to read/write primary if the existing primary encounters a failure.</p>
188 /// <p>Valid values: <code>true</code> | <code>false</code></p>
189 pub fn get_automatic_failover_enabled(&self) -> &::std::option::Option<bool> {
190 self.inner.get_automatic_failover_enabled()
191 }
192 /// <p>A flag to indicate MultiAZ is enabled.</p>
193 pub fn multi_az_enabled(mut self, input: bool) -> Self {
194 self.inner = self.inner.multi_az_enabled(input);
195 self
196 }
197 /// <p>A flag to indicate MultiAZ is enabled.</p>
198 pub fn set_multi_az_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
199 self.inner = self.inner.set_multi_az_enabled(input);
200 self
201 }
202 /// <p>A flag to indicate MultiAZ is enabled.</p>
203 pub fn get_multi_az_enabled(&self) -> &::std::option::Option<bool> {
204 self.inner.get_multi_az_enabled()
205 }
206 /// <p>Deprecated. This parameter is not used.</p>
207 #[deprecated]
208 pub fn node_group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
209 self.inner = self.inner.node_group_id(input.into());
210 self
211 }
212 /// <p>Deprecated. This parameter is not used.</p>
213 #[deprecated]
214 pub fn set_node_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
215 self.inner = self.inner.set_node_group_id(input);
216 self
217 }
218 /// <p>Deprecated. This parameter is not used.</p>
219 #[deprecated]
220 pub fn get_node_group_id(&self) -> &::std::option::Option<::std::string::String> {
221 self.inner.get_node_group_id()
222 }
223 ///
224 /// Appends an item to `CacheSecurityGroupNames`.
225 ///
226 /// To override the contents of this collection use [`set_cache_security_group_names`](Self::set_cache_security_group_names).
227 ///
228 /// <p>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.</p>
229 /// <p>This parameter can be used only with replication group containing clusters running outside of an Amazon Virtual Private Cloud (Amazon VPC).</p>
230 /// <p>Constraints: Must contain no more than 255 alphanumeric characters. Must not be <code>Default</code>.</p>
231 pub fn cache_security_group_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
232 self.inner = self.inner.cache_security_group_names(input.into());
233 self
234 }
235 /// <p>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.</p>
236 /// <p>This parameter can be used only with replication group containing clusters running outside of an Amazon Virtual Private Cloud (Amazon VPC).</p>
237 /// <p>Constraints: Must contain no more than 255 alphanumeric characters. Must not be <code>Default</code>.</p>
238 pub fn set_cache_security_group_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
239 self.inner = self.inner.set_cache_security_group_names(input);
240 self
241 }
242 /// <p>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.</p>
243 /// <p>This parameter can be used only with replication group containing clusters running outside of an Amazon Virtual Private Cloud (Amazon VPC).</p>
244 /// <p>Constraints: Must contain no more than 255 alphanumeric characters. Must not be <code>Default</code>.</p>
245 pub fn get_cache_security_group_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
246 self.inner.get_cache_security_group_names()
247 }
248 ///
249 /// Appends an item to `SecurityGroupIds`.
250 ///
251 /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
252 ///
253 /// <p>Specifies the VPC Security Groups associated with the clusters in the replication group.</p>
254 /// <p>This parameter can be used only with replication group containing clusters running in an Amazon Virtual Private Cloud (Amazon VPC).</p>
255 pub fn security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
256 self.inner = self.inner.security_group_ids(input.into());
257 self
258 }
259 /// <p>Specifies the VPC Security Groups associated with the clusters in the replication group.</p>
260 /// <p>This parameter can be used only with replication group containing clusters running in an Amazon Virtual Private Cloud (Amazon VPC).</p>
261 pub fn set_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
262 self.inner = self.inner.set_security_group_ids(input);
263 self
264 }
265 /// <p>Specifies the VPC Security Groups associated with the clusters in the replication group.</p>
266 /// <p>This parameter can be used only with replication group containing clusters running in an Amazon Virtual Private Cloud (Amazon VPC).</p>
267 pub fn get_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
268 self.inner.get_security_group_ids()
269 }
270 /// <p>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.</p>
271 /// <p>Valid values for <code>ddd</code> are:</p>
272 /// <ul>
273 /// <li>
274 /// <p><code>sun</code></p></li>
275 /// <li>
276 /// <p><code>mon</code></p></li>
277 /// <li>
278 /// <p><code>tue</code></p></li>
279 /// <li>
280 /// <p><code>wed</code></p></li>
281 /// <li>
282 /// <p><code>thu</code></p></li>
283 /// <li>
284 /// <p><code>fri</code></p></li>
285 /// <li>
286 /// <p><code>sat</code></p></li>
287 /// </ul>
288 /// <p>Example: <code>sun:23:00-mon:01:30</code></p>
289 pub fn preferred_maintenance_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
290 self.inner = self.inner.preferred_maintenance_window(input.into());
291 self
292 }
293 /// <p>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.</p>
294 /// <p>Valid values for <code>ddd</code> are:</p>
295 /// <ul>
296 /// <li>
297 /// <p><code>sun</code></p></li>
298 /// <li>
299 /// <p><code>mon</code></p></li>
300 /// <li>
301 /// <p><code>tue</code></p></li>
302 /// <li>
303 /// <p><code>wed</code></p></li>
304 /// <li>
305 /// <p><code>thu</code></p></li>
306 /// <li>
307 /// <p><code>fri</code></p></li>
308 /// <li>
309 /// <p><code>sat</code></p></li>
310 /// </ul>
311 /// <p>Example: <code>sun:23:00-mon:01:30</code></p>
312 pub fn set_preferred_maintenance_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
313 self.inner = self.inner.set_preferred_maintenance_window(input);
314 self
315 }
316 /// <p>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.</p>
317 /// <p>Valid values for <code>ddd</code> are:</p>
318 /// <ul>
319 /// <li>
320 /// <p><code>sun</code></p></li>
321 /// <li>
322 /// <p><code>mon</code></p></li>
323 /// <li>
324 /// <p><code>tue</code></p></li>
325 /// <li>
326 /// <p><code>wed</code></p></li>
327 /// <li>
328 /// <p><code>thu</code></p></li>
329 /// <li>
330 /// <p><code>fri</code></p></li>
331 /// <li>
332 /// <p><code>sat</code></p></li>
333 /// </ul>
334 /// <p>Example: <code>sun:23:00-mon:01:30</code></p>
335 pub fn get_preferred_maintenance_window(&self) -> &::std::option::Option<::std::string::String> {
336 self.inner.get_preferred_maintenance_window()
337 }
338 /// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications are sent.</p><note>
339 /// <p>The Amazon SNS topic owner must be same as the replication group owner.</p>
340 /// </note>
341 pub fn notification_topic_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
342 self.inner = self.inner.notification_topic_arn(input.into());
343 self
344 }
345 /// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications are sent.</p><note>
346 /// <p>The Amazon SNS topic owner must be same as the replication group owner.</p>
347 /// </note>
348 pub fn set_notification_topic_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
349 self.inner = self.inner.set_notification_topic_arn(input);
350 self
351 }
352 /// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications are sent.</p><note>
353 /// <p>The Amazon SNS topic owner must be same as the replication group owner.</p>
354 /// </note>
355 pub fn get_notification_topic_arn(&self) -> &::std::option::Option<::std::string::String> {
356 self.inner.get_notification_topic_arn()
357 }
358 /// <p>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 <code>ApplyImmediately</code> parameter is specified as <code>true</code> for this request.</p>
359 pub fn cache_parameter_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
360 self.inner = self.inner.cache_parameter_group_name(input.into());
361 self
362 }
363 /// <p>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 <code>ApplyImmediately</code> parameter is specified as <code>true</code> for this request.</p>
364 pub fn set_cache_parameter_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
365 self.inner = self.inner.set_cache_parameter_group_name(input);
366 self
367 }
368 /// <p>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 <code>ApplyImmediately</code> parameter is specified as <code>true</code> for this request.</p>
369 pub fn get_cache_parameter_group_name(&self) -> &::std::option::Option<::std::string::String> {
370 self.inner.get_cache_parameter_group_name()
371 }
372 /// <p>The status of the Amazon SNS notification topic for the replication group. Notifications are sent only if the status is <code>active</code>.</p>
373 /// <p>Valid values: <code>active</code> | <code>inactive</code></p>
374 pub fn notification_topic_status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
375 self.inner = self.inner.notification_topic_status(input.into());
376 self
377 }
378 /// <p>The status of the Amazon SNS notification topic for the replication group. Notifications are sent only if the status is <code>active</code>.</p>
379 /// <p>Valid values: <code>active</code> | <code>inactive</code></p>
380 pub fn set_notification_topic_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
381 self.inner = self.inner.set_notification_topic_status(input);
382 self
383 }
384 /// <p>The status of the Amazon SNS notification topic for the replication group. Notifications are sent only if the status is <code>active</code>.</p>
385 /// <p>Valid values: <code>active</code> | <code>inactive</code></p>
386 pub fn get_notification_topic_status(&self) -> &::std::option::Option<::std::string::String> {
387 self.inner.get_notification_topic_status()
388 }
389 /// <p>If <code>true</code>, this parameter causes the modifications in this request and any pending modifications to be applied, asynchronously and as soon as possible, regardless of the <code>PreferredMaintenanceWindow</code> setting for the replication group.</p>
390 /// <p>If <code>false</code>, changes to the nodes in the replication group are applied on the next maintenance reboot, or the next failure reboot, whichever occurs first.</p>
391 /// <p>Valid values: <code>true</code> | <code>false</code></p>
392 /// <p>Default: <code>false</code></p>
393 pub fn apply_immediately(mut self, input: bool) -> Self {
394 self.inner = self.inner.apply_immediately(input);
395 self
396 }
397 /// <p>If <code>true</code>, this parameter causes the modifications in this request and any pending modifications to be applied, asynchronously and as soon as possible, regardless of the <code>PreferredMaintenanceWindow</code> setting for the replication group.</p>
398 /// <p>If <code>false</code>, changes to the nodes in the replication group are applied on the next maintenance reboot, or the next failure reboot, whichever occurs first.</p>
399 /// <p>Valid values: <code>true</code> | <code>false</code></p>
400 /// <p>Default: <code>false</code></p>
401 pub fn set_apply_immediately(mut self, input: ::std::option::Option<bool>) -> Self {
402 self.inner = self.inner.set_apply_immediately(input);
403 self
404 }
405 /// <p>If <code>true</code>, this parameter causes the modifications in this request and any pending modifications to be applied, asynchronously and as soon as possible, regardless of the <code>PreferredMaintenanceWindow</code> setting for the replication group.</p>
406 /// <p>If <code>false</code>, changes to the nodes in the replication group are applied on the next maintenance reboot, or the next failure reboot, whichever occurs first.</p>
407 /// <p>Valid values: <code>true</code> | <code>false</code></p>
408 /// <p>Default: <code>false</code></p>
409 pub fn get_apply_immediately(&self) -> &::std::option::Option<bool> {
410 self.inner.get_apply_immediately()
411 }
412 /// <p>Modifies the engine listed in a replication group message. The options are redis, memcached or valkey.</p>
413 pub fn engine(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
414 self.inner = self.inner.engine(input.into());
415 self
416 }
417 /// <p>Modifies the engine listed in a replication group message. The options are redis, memcached or valkey.</p>
418 pub fn set_engine(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
419 self.inner = self.inner.set_engine(input);
420 self
421 }
422 /// <p>Modifies the engine listed in a replication group message. The options are redis, memcached or valkey.</p>
423 pub fn get_engine(&self) -> &::std::option::Option<::std::string::String> {
424 self.inner.get_engine()
425 }
426 /// <p>The upgraded version of the cache engine to be run on the clusters in the replication group.</p>
427 /// <p><b>Important:</b> You can upgrade to a newer engine version (see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/SelectEngine.html#VersionManagement">Selecting a Cache Engine and Version</a>), 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.</p>
428 pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
429 self.inner = self.inner.engine_version(input.into());
430 self
431 }
432 /// <p>The upgraded version of the cache engine to be run on the clusters in the replication group.</p>
433 /// <p><b>Important:</b> You can upgrade to a newer engine version (see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/SelectEngine.html#VersionManagement">Selecting a Cache Engine and Version</a>), 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.</p>
434 pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
435 self.inner = self.inner.set_engine_version(input);
436 self
437 }
438 /// <p>The upgraded version of the cache engine to be run on the clusters in the replication group.</p>
439 /// <p><b>Important:</b> You can upgrade to a newer engine version (see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/SelectEngine.html#VersionManagement">Selecting a Cache Engine and Version</a>), 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.</p>
440 pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
441 self.inner.get_engine_version()
442 }
443 /// <p> If you are running Valkey or Redis OSS engine version 6.0 or later, set this parameter to yes if you want to opt-in to the next auto minor version upgrade campaign. This parameter is disabled for previous versions. </p>
444 pub fn auto_minor_version_upgrade(mut self, input: bool) -> Self {
445 self.inner = self.inner.auto_minor_version_upgrade(input);
446 self
447 }
448 /// <p> If you are running Valkey or Redis OSS engine version 6.0 or later, set this parameter to yes if you want to opt-in to the next auto minor version upgrade campaign. This parameter is disabled for previous versions. </p>
449 pub fn set_auto_minor_version_upgrade(mut self, input: ::std::option::Option<bool>) -> Self {
450 self.inner = self.inner.set_auto_minor_version_upgrade(input);
451 self
452 }
453 /// <p> If you are running Valkey or Redis OSS engine version 6.0 or later, set this parameter to yes if you want to opt-in to the next auto minor version upgrade campaign. This parameter is disabled for previous versions. </p>
454 pub fn get_auto_minor_version_upgrade(&self) -> &::std::option::Option<bool> {
455 self.inner.get_auto_minor_version_upgrade()
456 }
457 /// <p>The number of days for which ElastiCache retains automatic node group (shard) snapshots before deleting them. For example, if you set <code>SnapshotRetentionLimit</code> to 5, a snapshot that was taken today is retained for 5 days before being deleted.</p>
458 /// <p><b>Important</b> If the value of SnapshotRetentionLimit is set to zero (0), backups are turned off.</p>
459 pub fn snapshot_retention_limit(mut self, input: i32) -> Self {
460 self.inner = self.inner.snapshot_retention_limit(input);
461 self
462 }
463 /// <p>The number of days for which ElastiCache retains automatic node group (shard) snapshots before deleting them. For example, if you set <code>SnapshotRetentionLimit</code> to 5, a snapshot that was taken today is retained for 5 days before being deleted.</p>
464 /// <p><b>Important</b> If the value of SnapshotRetentionLimit is set to zero (0), backups are turned off.</p>
465 pub fn set_snapshot_retention_limit(mut self, input: ::std::option::Option<i32>) -> Self {
466 self.inner = self.inner.set_snapshot_retention_limit(input);
467 self
468 }
469 /// <p>The number of days for which ElastiCache retains automatic node group (shard) snapshots before deleting them. For example, if you set <code>SnapshotRetentionLimit</code> to 5, a snapshot that was taken today is retained for 5 days before being deleted.</p>
470 /// <p><b>Important</b> If the value of SnapshotRetentionLimit is set to zero (0), backups are turned off.</p>
471 pub fn get_snapshot_retention_limit(&self) -> &::std::option::Option<i32> {
472 self.inner.get_snapshot_retention_limit()
473 }
474 /// <p>The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of the node group (shard) specified by <code>SnapshottingClusterId</code>.</p>
475 /// <p>Example: <code>05:00-09:00</code></p>
476 /// <p>If you do not specify this parameter, ElastiCache automatically chooses an appropriate time range.</p>
477 pub fn snapshot_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
478 self.inner = self.inner.snapshot_window(input.into());
479 self
480 }
481 /// <p>The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of the node group (shard) specified by <code>SnapshottingClusterId</code>.</p>
482 /// <p>Example: <code>05:00-09:00</code></p>
483 /// <p>If you do not specify this parameter, ElastiCache automatically chooses an appropriate time range.</p>
484 pub fn set_snapshot_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
485 self.inner = self.inner.set_snapshot_window(input);
486 self
487 }
488 /// <p>The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of the node group (shard) specified by <code>SnapshottingClusterId</code>.</p>
489 /// <p>Example: <code>05:00-09:00</code></p>
490 /// <p>If you do not specify this parameter, ElastiCache automatically chooses an appropriate time range.</p>
491 pub fn get_snapshot_window(&self) -> &::std::option::Option<::std::string::String> {
492 self.inner.get_snapshot_window()
493 }
494 /// <p>A valid cache node type that you want to scale this replication group to.</p>
495 pub fn cache_node_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
496 self.inner = self.inner.cache_node_type(input.into());
497 self
498 }
499 /// <p>A valid cache node type that you want to scale this replication group to.</p>
500 pub fn set_cache_node_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
501 self.inner = self.inner.set_cache_node_type(input);
502 self
503 }
504 /// <p>A valid cache node type that you want to scale this replication group to.</p>
505 pub fn get_cache_node_type(&self) -> &::std::option::Option<::std::string::String> {
506 self.inner.get_cache_node_type()
507 }
508 /// <p>Reserved parameter. The password used to access a password protected server. This parameter must be specified with the <code>auth-token-update-strategy </code> parameter. Password constraints:</p>
509 /// <ul>
510 /// <li>
511 /// <p>Must be only printable ASCII characters</p></li>
512 /// <li>
513 /// <p>Must be at least 16 characters and no more than 128 characters in length</p></li>
514 /// <li>
515 /// <p>Cannot contain any of the following characters: '/', '"', or '@', '%'</p></li>
516 /// </ul>
517 /// <p>For more information, see AUTH password at <a href="http://redis.io/commands/AUTH">AUTH</a>.</p>
518 pub fn auth_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
519 self.inner = self.inner.auth_token(input.into());
520 self
521 }
522 /// <p>Reserved parameter. The password used to access a password protected server. This parameter must be specified with the <code>auth-token-update-strategy </code> parameter. Password constraints:</p>
523 /// <ul>
524 /// <li>
525 /// <p>Must be only printable ASCII characters</p></li>
526 /// <li>
527 /// <p>Must be at least 16 characters and no more than 128 characters in length</p></li>
528 /// <li>
529 /// <p>Cannot contain any of the following characters: '/', '"', or '@', '%'</p></li>
530 /// </ul>
531 /// <p>For more information, see AUTH password at <a href="http://redis.io/commands/AUTH">AUTH</a>.</p>
532 pub fn set_auth_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
533 self.inner = self.inner.set_auth_token(input);
534 self
535 }
536 /// <p>Reserved parameter. The password used to access a password protected server. This parameter must be specified with the <code>auth-token-update-strategy </code> parameter. Password constraints:</p>
537 /// <ul>
538 /// <li>
539 /// <p>Must be only printable ASCII characters</p></li>
540 /// <li>
541 /// <p>Must be at least 16 characters and no more than 128 characters in length</p></li>
542 /// <li>
543 /// <p>Cannot contain any of the following characters: '/', '"', or '@', '%'</p></li>
544 /// </ul>
545 /// <p>For more information, see AUTH password at <a href="http://redis.io/commands/AUTH">AUTH</a>.</p>
546 pub fn get_auth_token(&self) -> &::std::option::Option<::std::string::String> {
547 self.inner.get_auth_token()
548 }
549 /// <p>Specifies the strategy to use to update the AUTH token. This parameter must be specified with the <code>auth-token</code> parameter. Possible values:</p>
550 /// <ul>
551 /// <li>
552 /// <p>ROTATE - default, if no update strategy is provided</p></li>
553 /// <li>
554 /// <p>SET - allowed only after ROTATE</p></li>
555 /// <li>
556 /// <p>DELETE - allowed only when transitioning to RBAC</p></li>
557 /// </ul>
558 /// <p>For more information, see <a href="http://docs.aws.amazon.com/AmazonElastiCache/latest/dg/auth.html">Authenticating Users with AUTH</a></p>
559 pub fn auth_token_update_strategy(mut self, input: crate::types::AuthTokenUpdateStrategyType) -> Self {
560 self.inner = self.inner.auth_token_update_strategy(input);
561 self
562 }
563 /// <p>Specifies the strategy to use to update the AUTH token. This parameter must be specified with the <code>auth-token</code> parameter. Possible values:</p>
564 /// <ul>
565 /// <li>
566 /// <p>ROTATE - default, if no update strategy is provided</p></li>
567 /// <li>
568 /// <p>SET - allowed only after ROTATE</p></li>
569 /// <li>
570 /// <p>DELETE - allowed only when transitioning to RBAC</p></li>
571 /// </ul>
572 /// <p>For more information, see <a href="http://docs.aws.amazon.com/AmazonElastiCache/latest/dg/auth.html">Authenticating Users with AUTH</a></p>
573 pub fn set_auth_token_update_strategy(mut self, input: ::std::option::Option<crate::types::AuthTokenUpdateStrategyType>) -> Self {
574 self.inner = self.inner.set_auth_token_update_strategy(input);
575 self
576 }
577 /// <p>Specifies the strategy to use to update the AUTH token. This parameter must be specified with the <code>auth-token</code> parameter. Possible values:</p>
578 /// <ul>
579 /// <li>
580 /// <p>ROTATE - default, if no update strategy is provided</p></li>
581 /// <li>
582 /// <p>SET - allowed only after ROTATE</p></li>
583 /// <li>
584 /// <p>DELETE - allowed only when transitioning to RBAC</p></li>
585 /// </ul>
586 /// <p>For more information, see <a href="http://docs.aws.amazon.com/AmazonElastiCache/latest/dg/auth.html">Authenticating Users with AUTH</a></p>
587 pub fn get_auth_token_update_strategy(&self) -> &::std::option::Option<crate::types::AuthTokenUpdateStrategyType> {
588 self.inner.get_auth_token_update_strategy()
589 }
590 ///
591 /// Appends an item to `UserGroupIdsToAdd`.
592 ///
593 /// To override the contents of this collection use [`set_user_group_ids_to_add`](Self::set_user_group_ids_to_add).
594 ///
595 /// <p>The ID of the user group you are associating with the replication group.</p>
596 pub fn user_group_ids_to_add(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
597 self.inner = self.inner.user_group_ids_to_add(input.into());
598 self
599 }
600 /// <p>The ID of the user group you are associating with the replication group.</p>
601 pub fn set_user_group_ids_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
602 self.inner = self.inner.set_user_group_ids_to_add(input);
603 self
604 }
605 /// <p>The ID of the user group you are associating with the replication group.</p>
606 pub fn get_user_group_ids_to_add(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
607 self.inner.get_user_group_ids_to_add()
608 }
609 ///
610 /// Appends an item to `UserGroupIdsToRemove`.
611 ///
612 /// To override the contents of this collection use [`set_user_group_ids_to_remove`](Self::set_user_group_ids_to_remove).
613 ///
614 /// <p>The ID of the user group to disassociate from the replication group, meaning the users in the group no longer can access the replication group.</p>
615 pub fn user_group_ids_to_remove(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
616 self.inner = self.inner.user_group_ids_to_remove(input.into());
617 self
618 }
619 /// <p>The ID of the user group to disassociate from the replication group, meaning the users in the group no longer can access the replication group.</p>
620 pub fn set_user_group_ids_to_remove(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
621 self.inner = self.inner.set_user_group_ids_to_remove(input);
622 self
623 }
624 /// <p>The ID of the user group to disassociate from the replication group, meaning the users in the group no longer can access the replication group.</p>
625 pub fn get_user_group_ids_to_remove(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
626 self.inner.get_user_group_ids_to_remove()
627 }
628 /// <p>Removes the user group associated with this replication group.</p>
629 pub fn remove_user_groups(mut self, input: bool) -> Self {
630 self.inner = self.inner.remove_user_groups(input);
631 self
632 }
633 /// <p>Removes the user group associated with this replication group.</p>
634 pub fn set_remove_user_groups(mut self, input: ::std::option::Option<bool>) -> Self {
635 self.inner = self.inner.set_remove_user_groups(input);
636 self
637 }
638 /// <p>Removes the user group associated with this replication group.</p>
639 pub fn get_remove_user_groups(&self) -> &::std::option::Option<bool> {
640 self.inner.get_remove_user_groups()
641 }
642 ///
643 /// Appends an item to `LogDeliveryConfigurations`.
644 ///
645 /// To override the contents of this collection use [`set_log_delivery_configurations`](Self::set_log_delivery_configurations).
646 ///
647 /// <p>Specifies the destination, format and type of the logs.</p>
648 pub fn log_delivery_configurations(mut self, input: crate::types::LogDeliveryConfigurationRequest) -> Self {
649 self.inner = self.inner.log_delivery_configurations(input);
650 self
651 }
652 /// <p>Specifies the destination, format and type of the logs.</p>
653 pub fn set_log_delivery_configurations(
654 mut self,
655 input: ::std::option::Option<::std::vec::Vec<crate::types::LogDeliveryConfigurationRequest>>,
656 ) -> Self {
657 self.inner = self.inner.set_log_delivery_configurations(input);
658 self
659 }
660 /// <p>Specifies the destination, format and type of the logs.</p>
661 pub fn get_log_delivery_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::LogDeliveryConfigurationRequest>> {
662 self.inner.get_log_delivery_configurations()
663 }
664 /// <p>The network type you choose when modifying a cluster, either <code>ipv4</code> | <code>ipv6</code>. IPv6 is supported for workloads using Valkey 7.2 and above, Redis OSS engine version 6.2 to 7.1 and Memcached engine version 1.6.6 and above on all instances built on the <a href="http://aws.amazon.com/ec2/nitro/">Nitro system</a>.</p>
665 pub fn ip_discovery(mut self, input: crate::types::IpDiscovery) -> Self {
666 self.inner = self.inner.ip_discovery(input);
667 self
668 }
669 /// <p>The network type you choose when modifying a cluster, either <code>ipv4</code> | <code>ipv6</code>. IPv6 is supported for workloads using Valkey 7.2 and above, Redis OSS engine version 6.2 to 7.1 and Memcached engine version 1.6.6 and above on all instances built on the <a href="http://aws.amazon.com/ec2/nitro/">Nitro system</a>.</p>
670 pub fn set_ip_discovery(mut self, input: ::std::option::Option<crate::types::IpDiscovery>) -> Self {
671 self.inner = self.inner.set_ip_discovery(input);
672 self
673 }
674 /// <p>The network type you choose when modifying a cluster, either <code>ipv4</code> | <code>ipv6</code>. IPv6 is supported for workloads using Valkey 7.2 and above, Redis OSS engine version 6.2 to 7.1 and Memcached engine version 1.6.6 and above on all instances built on the <a href="http://aws.amazon.com/ec2/nitro/">Nitro system</a>.</p>
675 pub fn get_ip_discovery(&self) -> &::std::option::Option<crate::types::IpDiscovery> {
676 self.inner.get_ip_discovery()
677 }
678 /// <p>A flag that enables in-transit encryption when set to true. If you are enabling in-transit encryption for an existing cluster, you must also set <code>TransitEncryptionMode</code> to <code>preferred</code>.</p>
679 pub fn transit_encryption_enabled(mut self, input: bool) -> Self {
680 self.inner = self.inner.transit_encryption_enabled(input);
681 self
682 }
683 /// <p>A flag that enables in-transit encryption when set to true. If you are enabling in-transit encryption for an existing cluster, you must also set <code>TransitEncryptionMode</code> to <code>preferred</code>.</p>
684 pub fn set_transit_encryption_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
685 self.inner = self.inner.set_transit_encryption_enabled(input);
686 self
687 }
688 /// <p>A flag that enables in-transit encryption when set to true. If you are enabling in-transit encryption for an existing cluster, you must also set <code>TransitEncryptionMode</code> to <code>preferred</code>.</p>
689 pub fn get_transit_encryption_enabled(&self) -> &::std::option::Option<bool> {
690 self.inner.get_transit_encryption_enabled()
691 }
692 /// <p>A setting that allows you to migrate your clients to use in-transit encryption, with no downtime.</p>
693 /// <p>You must set <code>TransitEncryptionEnabled</code> to <code>true</code>, for your existing cluster, and set <code>TransitEncryptionMode</code> to <code>preferred</code> in the same request to allow both encrypted and unencrypted connections at the same time. Once you migrate all your Valkey or Redis OSS clients to use encrypted connections you can set the value to <code>required</code> to allow encrypted connections only.</p>
694 /// <p>Setting <code>TransitEncryptionMode</code> to <code>required</code> is a two-step process that requires you to first set the <code>TransitEncryptionMode</code> to <code>preferred</code>, after that you can set <code>TransitEncryptionMode</code> to <code>required</code>.</p>
695 pub fn transit_encryption_mode(mut self, input: crate::types::TransitEncryptionMode) -> Self {
696 self.inner = self.inner.transit_encryption_mode(input);
697 self
698 }
699 /// <p>A setting that allows you to migrate your clients to use in-transit encryption, with no downtime.</p>
700 /// <p>You must set <code>TransitEncryptionEnabled</code> to <code>true</code>, for your existing cluster, and set <code>TransitEncryptionMode</code> to <code>preferred</code> in the same request to allow both encrypted and unencrypted connections at the same time. Once you migrate all your Valkey or Redis OSS clients to use encrypted connections you can set the value to <code>required</code> to allow encrypted connections only.</p>
701 /// <p>Setting <code>TransitEncryptionMode</code> to <code>required</code> is a two-step process that requires you to first set the <code>TransitEncryptionMode</code> to <code>preferred</code>, after that you can set <code>TransitEncryptionMode</code> to <code>required</code>.</p>
702 pub fn set_transit_encryption_mode(mut self, input: ::std::option::Option<crate::types::TransitEncryptionMode>) -> Self {
703 self.inner = self.inner.set_transit_encryption_mode(input);
704 self
705 }
706 /// <p>A setting that allows you to migrate your clients to use in-transit encryption, with no downtime.</p>
707 /// <p>You must set <code>TransitEncryptionEnabled</code> to <code>true</code>, for your existing cluster, and set <code>TransitEncryptionMode</code> to <code>preferred</code> in the same request to allow both encrypted and unencrypted connections at the same time. Once you migrate all your Valkey or Redis OSS clients to use encrypted connections you can set the value to <code>required</code> to allow encrypted connections only.</p>
708 /// <p>Setting <code>TransitEncryptionMode</code> to <code>required</code> is a two-step process that requires you to first set the <code>TransitEncryptionMode</code> to <code>preferred</code>, after that you can set <code>TransitEncryptionMode</code> to <code>required</code>.</p>
709 pub fn get_transit_encryption_mode(&self) -> &::std::option::Option<crate::types::TransitEncryptionMode> {
710 self.inner.get_transit_encryption_mode()
711 }
712 /// <p>Enabled or Disabled. To modify cluster mode from Disabled to Enabled, you must first set the cluster mode to Compatible. Compatible mode allows your Valkey or Redis OSS clients to connect using both cluster mode enabled and cluster mode disabled. After you migrate all Valkey or Redis OSS clients to use cluster mode enabled, you can then complete cluster mode configuration and set the cluster mode to Enabled.</p>
713 pub fn cluster_mode(mut self, input: crate::types::ClusterMode) -> Self {
714 self.inner = self.inner.cluster_mode(input);
715 self
716 }
717 /// <p>Enabled or Disabled. To modify cluster mode from Disabled to Enabled, you must first set the cluster mode to Compatible. Compatible mode allows your Valkey or Redis OSS clients to connect using both cluster mode enabled and cluster mode disabled. After you migrate all Valkey or Redis OSS clients to use cluster mode enabled, you can then complete cluster mode configuration and set the cluster mode to Enabled.</p>
718 pub fn set_cluster_mode(mut self, input: ::std::option::Option<crate::types::ClusterMode>) -> Self {
719 self.inner = self.inner.set_cluster_mode(input);
720 self
721 }
722 /// <p>Enabled or Disabled. To modify cluster mode from Disabled to Enabled, you must first set the cluster mode to Compatible. Compatible mode allows your Valkey or Redis OSS clients to connect using both cluster mode enabled and cluster mode disabled. After you migrate all Valkey or Redis OSS clients to use cluster mode enabled, you can then complete cluster mode configuration and set the cluster mode to Enabled.</p>
723 pub fn get_cluster_mode(&self) -> &::std::option::Option<crate::types::ClusterMode> {
724 self.inner.get_cluster_mode()
725 }
726}