aws_sdk_elasticache/operation/create_cache_cluster/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_cache_cluster::_create_cache_cluster_output::CreateCacheClusterOutputBuilder;
3
4pub use crate::operation::create_cache_cluster::_create_cache_cluster_input::CreateCacheClusterInputBuilder;
5
6impl crate::operation::create_cache_cluster::builders::CreateCacheClusterInputBuilder {
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::create_cache_cluster::CreateCacheClusterOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_cache_cluster::CreateCacheClusterError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_cache_cluster();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateCacheCluster`.
24///
25/// <p>Creates a cluster. All nodes in the cluster run the same protocol-compliant cache engine software, either Memcached, Valkey or Redis OSS.</p>
26/// <p>This operation is not supported for Valkey or Redis OSS (cluster mode enabled) clusters.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct CreateCacheClusterFluentBuilder {
29    handle: ::std::sync::Arc<crate::client::Handle>,
30    inner: crate::operation::create_cache_cluster::builders::CreateCacheClusterInputBuilder,
31    config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34    crate::client::customize::internal::CustomizableSend<
35        crate::operation::create_cache_cluster::CreateCacheClusterOutput,
36        crate::operation::create_cache_cluster::CreateCacheClusterError,
37    > for CreateCacheClusterFluentBuilder
38{
39    fn send(
40        self,
41        config_override: crate::config::Builder,
42    ) -> crate::client::customize::internal::BoxFuture<
43        crate::client::customize::internal::SendResult<
44            crate::operation::create_cache_cluster::CreateCacheClusterOutput,
45            crate::operation::create_cache_cluster::CreateCacheClusterError,
46        >,
47    > {
48        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49    }
50}
51impl CreateCacheClusterFluentBuilder {
52    /// Creates a new `CreateCacheClusterFluentBuilder`.
53    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54        Self {
55            handle,
56            inner: ::std::default::Default::default(),
57            config_override: ::std::option::Option::None,
58        }
59    }
60    /// Access the CreateCacheCluster as a reference.
61    pub fn as_input(&self) -> &crate::operation::create_cache_cluster::builders::CreateCacheClusterInputBuilder {
62        &self.inner
63    }
64    /// Sends the request and returns the response.
65    ///
66    /// If an error occurs, an `SdkError` will be returned with additional details that
67    /// can be matched against.
68    ///
69    /// By default, any retryable failures will be retried twice. Retry behavior
70    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
71    /// set when configuring the client.
72    pub async fn send(
73        self,
74    ) -> ::std::result::Result<
75        crate::operation::create_cache_cluster::CreateCacheClusterOutput,
76        ::aws_smithy_runtime_api::client::result::SdkError<
77            crate::operation::create_cache_cluster::CreateCacheClusterError,
78            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
79        >,
80    > {
81        let input = self
82            .inner
83            .build()
84            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
85        let runtime_plugins = crate::operation::create_cache_cluster::CreateCacheCluster::operation_runtime_plugins(
86            self.handle.runtime_plugins.clone(),
87            &self.handle.conf,
88            self.config_override,
89        );
90        crate::operation::create_cache_cluster::CreateCacheCluster::orchestrate(&runtime_plugins, input).await
91    }
92
93    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94    pub fn customize(
95        self,
96    ) -> crate::client::customize::CustomizableOperation<
97        crate::operation::create_cache_cluster::CreateCacheClusterOutput,
98        crate::operation::create_cache_cluster::CreateCacheClusterError,
99        Self,
100    > {
101        crate::client::customize::CustomizableOperation::new(self)
102    }
103    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104        self.set_config_override(::std::option::Option::Some(config_override.into()));
105        self
106    }
107
108    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109        self.config_override = config_override;
110        self
111    }
112    /// <p>The node group (shard) identifier. This parameter is stored as a lowercase string.</p>
113    /// <p><b>Constraints:</b></p>
114    /// <ul>
115    /// <li>
116    /// <p>A name must contain from 1 to 50 alphanumeric characters or hyphens.</p></li>
117    /// <li>
118    /// <p>The first character must be a letter.</p></li>
119    /// <li>
120    /// <p>A name cannot end with a hyphen or contain two consecutive hyphens.</p></li>
121    /// </ul>
122    pub fn cache_cluster_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123        self.inner = self.inner.cache_cluster_id(input.into());
124        self
125    }
126    /// <p>The node group (shard) identifier. This parameter is stored as a lowercase string.</p>
127    /// <p><b>Constraints:</b></p>
128    /// <ul>
129    /// <li>
130    /// <p>A name must contain from 1 to 50 alphanumeric characters or hyphens.</p></li>
131    /// <li>
132    /// <p>The first character must be a letter.</p></li>
133    /// <li>
134    /// <p>A name cannot end with a hyphen or contain two consecutive hyphens.</p></li>
135    /// </ul>
136    pub fn set_cache_cluster_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137        self.inner = self.inner.set_cache_cluster_id(input);
138        self
139    }
140    /// <p>The node group (shard) identifier. This parameter is stored as a lowercase string.</p>
141    /// <p><b>Constraints:</b></p>
142    /// <ul>
143    /// <li>
144    /// <p>A name must contain from 1 to 50 alphanumeric characters or hyphens.</p></li>
145    /// <li>
146    /// <p>The first character must be a letter.</p></li>
147    /// <li>
148    /// <p>A name cannot end with a hyphen or contain two consecutive hyphens.</p></li>
149    /// </ul>
150    pub fn get_cache_cluster_id(&self) -> &::std::option::Option<::std::string::String> {
151        self.inner.get_cache_cluster_id()
152    }
153    /// <p>The ID of the replication group to which this cluster should belong. If this parameter is specified, the cluster is added to the specified replication group as a read replica; otherwise, the cluster is a standalone primary that is not part of any replication group.</p>
154    /// <p>If the specified replication group is Multi-AZ enabled and the Availability Zone is not specified, the cluster is created in Availability Zones that provide the best spread of read replicas across Availability Zones.</p><note>
155    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
156    /// </note>
157    pub fn replication_group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158        self.inner = self.inner.replication_group_id(input.into());
159        self
160    }
161    /// <p>The ID of the replication group to which this cluster should belong. If this parameter is specified, the cluster is added to the specified replication group as a read replica; otherwise, the cluster is a standalone primary that is not part of any replication group.</p>
162    /// <p>If the specified replication group is Multi-AZ enabled and the Availability Zone is not specified, the cluster is created in Availability Zones that provide the best spread of read replicas across Availability Zones.</p><note>
163    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
164    /// </note>
165    pub fn set_replication_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166        self.inner = self.inner.set_replication_group_id(input);
167        self
168    }
169    /// <p>The ID of the replication group to which this cluster should belong. If this parameter is specified, the cluster is added to the specified replication group as a read replica; otherwise, the cluster is a standalone primary that is not part of any replication group.</p>
170    /// <p>If the specified replication group is Multi-AZ enabled and the Availability Zone is not specified, the cluster is created in Availability Zones that provide the best spread of read replicas across Availability Zones.</p><note>
171    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
172    /// </note>
173    pub fn get_replication_group_id(&self) -> &::std::option::Option<::std::string::String> {
174        self.inner.get_replication_group_id()
175    }
176    /// <p>Specifies whether the nodes in this Memcached cluster are created in a single Availability Zone or created across multiple Availability Zones in the cluster's region.</p>
177    /// <p>This parameter is only supported for Memcached clusters.</p>
178    /// <p>If the <code>AZMode</code> and <code>PreferredAvailabilityZones</code> are not specified, ElastiCache assumes <code>single-az</code> mode.</p>
179    pub fn az_mode(mut self, input: crate::types::AzMode) -> Self {
180        self.inner = self.inner.az_mode(input);
181        self
182    }
183    /// <p>Specifies whether the nodes in this Memcached cluster are created in a single Availability Zone or created across multiple Availability Zones in the cluster's region.</p>
184    /// <p>This parameter is only supported for Memcached clusters.</p>
185    /// <p>If the <code>AZMode</code> and <code>PreferredAvailabilityZones</code> are not specified, ElastiCache assumes <code>single-az</code> mode.</p>
186    pub fn set_az_mode(mut self, input: ::std::option::Option<crate::types::AzMode>) -> Self {
187        self.inner = self.inner.set_az_mode(input);
188        self
189    }
190    /// <p>Specifies whether the nodes in this Memcached cluster are created in a single Availability Zone or created across multiple Availability Zones in the cluster's region.</p>
191    /// <p>This parameter is only supported for Memcached clusters.</p>
192    /// <p>If the <code>AZMode</code> and <code>PreferredAvailabilityZones</code> are not specified, ElastiCache assumes <code>single-az</code> mode.</p>
193    pub fn get_az_mode(&self) -> &::std::option::Option<crate::types::AzMode> {
194        self.inner.get_az_mode()
195    }
196    /// <p>The EC2 Availability Zone in which the cluster is created.</p>
197    /// <p>All nodes belonging to this cluster are placed in the preferred Availability Zone. If you want to create your nodes across multiple Availability Zones, use <code>PreferredAvailabilityZones</code>.</p>
198    /// <p>Default: System chosen Availability Zone.</p>
199    pub fn preferred_availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
200        self.inner = self.inner.preferred_availability_zone(input.into());
201        self
202    }
203    /// <p>The EC2 Availability Zone in which the cluster is created.</p>
204    /// <p>All nodes belonging to this cluster are placed in the preferred Availability Zone. If you want to create your nodes across multiple Availability Zones, use <code>PreferredAvailabilityZones</code>.</p>
205    /// <p>Default: System chosen Availability Zone.</p>
206    pub fn set_preferred_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
207        self.inner = self.inner.set_preferred_availability_zone(input);
208        self
209    }
210    /// <p>The EC2 Availability Zone in which the cluster is created.</p>
211    /// <p>All nodes belonging to this cluster are placed in the preferred Availability Zone. If you want to create your nodes across multiple Availability Zones, use <code>PreferredAvailabilityZones</code>.</p>
212    /// <p>Default: System chosen Availability Zone.</p>
213    pub fn get_preferred_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
214        self.inner.get_preferred_availability_zone()
215    }
216    ///
217    /// Appends an item to `PreferredAvailabilityZones`.
218    ///
219    /// To override the contents of this collection use [`set_preferred_availability_zones`](Self::set_preferred_availability_zones).
220    ///
221    /// <p>A list of the Availability Zones in which cache nodes are created. The order of the zones in the list is not important.</p>
222    /// <p>This option is only supported on Memcached.</p><note>
223    /// <p>If you are creating your cluster in an Amazon VPC (recommended) you can only locate nodes in Availability Zones that are associated with the subnets in the selected subnet group.</p>
224    /// <p>The number of Availability Zones listed must equal the value of <code>NumCacheNodes</code>.</p>
225    /// </note>
226    /// <p>If you want all the nodes in the same Availability Zone, use <code>PreferredAvailabilityZone</code> instead, or repeat the Availability Zone multiple times in the list.</p>
227    /// <p>Default: System chosen Availability Zones.</p>
228    pub fn preferred_availability_zones(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
229        self.inner = self.inner.preferred_availability_zones(input.into());
230        self
231    }
232    /// <p>A list of the Availability Zones in which cache nodes are created. The order of the zones in the list is not important.</p>
233    /// <p>This option is only supported on Memcached.</p><note>
234    /// <p>If you are creating your cluster in an Amazon VPC (recommended) you can only locate nodes in Availability Zones that are associated with the subnets in the selected subnet group.</p>
235    /// <p>The number of Availability Zones listed must equal the value of <code>NumCacheNodes</code>.</p>
236    /// </note>
237    /// <p>If you want all the nodes in the same Availability Zone, use <code>PreferredAvailabilityZone</code> instead, or repeat the Availability Zone multiple times in the list.</p>
238    /// <p>Default: System chosen Availability Zones.</p>
239    pub fn set_preferred_availability_zones(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
240        self.inner = self.inner.set_preferred_availability_zones(input);
241        self
242    }
243    /// <p>A list of the Availability Zones in which cache nodes are created. The order of the zones in the list is not important.</p>
244    /// <p>This option is only supported on Memcached.</p><note>
245    /// <p>If you are creating your cluster in an Amazon VPC (recommended) you can only locate nodes in Availability Zones that are associated with the subnets in the selected subnet group.</p>
246    /// <p>The number of Availability Zones listed must equal the value of <code>NumCacheNodes</code>.</p>
247    /// </note>
248    /// <p>If you want all the nodes in the same Availability Zone, use <code>PreferredAvailabilityZone</code> instead, or repeat the Availability Zone multiple times in the list.</p>
249    /// <p>Default: System chosen Availability Zones.</p>
250    pub fn get_preferred_availability_zones(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
251        self.inner.get_preferred_availability_zones()
252    }
253    /// <p>The initial number of cache nodes that the cluster has.</p>
254    /// <p>For clusters running Valkey or Redis OSS, this value must be 1. For clusters running Memcached, this value must be between 1 and 40.</p>
255    /// <p>If you need more than 40 nodes for your Memcached cluster, please fill out the ElastiCache Limit Increase Request form at <a href="http://aws.amazon.com/contact-us/elasticache-node-limit-request/">http://aws.amazon.com/contact-us/elasticache-node-limit-request/</a>.</p>
256    pub fn num_cache_nodes(mut self, input: i32) -> Self {
257        self.inner = self.inner.num_cache_nodes(input);
258        self
259    }
260    /// <p>The initial number of cache nodes that the cluster has.</p>
261    /// <p>For clusters running Valkey or Redis OSS, this value must be 1. For clusters running Memcached, this value must be between 1 and 40.</p>
262    /// <p>If you need more than 40 nodes for your Memcached cluster, please fill out the ElastiCache Limit Increase Request form at <a href="http://aws.amazon.com/contact-us/elasticache-node-limit-request/">http://aws.amazon.com/contact-us/elasticache-node-limit-request/</a>.</p>
263    pub fn set_num_cache_nodes(mut self, input: ::std::option::Option<i32>) -> Self {
264        self.inner = self.inner.set_num_cache_nodes(input);
265        self
266    }
267    /// <p>The initial number of cache nodes that the cluster has.</p>
268    /// <p>For clusters running Valkey or Redis OSS, this value must be 1. For clusters running Memcached, this value must be between 1 and 40.</p>
269    /// <p>If you need more than 40 nodes for your Memcached cluster, please fill out the ElastiCache Limit Increase Request form at <a href="http://aws.amazon.com/contact-us/elasticache-node-limit-request/">http://aws.amazon.com/contact-us/elasticache-node-limit-request/</a>.</p>
270    pub fn get_num_cache_nodes(&self) -> &::std::option::Option<i32> {
271        self.inner.get_num_cache_nodes()
272    }
273    /// <p>The compute and memory capacity of the nodes in the node group (shard).</p>
274    /// <p>The following node types are supported by ElastiCache. Generally speaking, the current generation types provide more memory and computational power at lower cost when compared to their equivalent previous generation counterparts.</p>
275    /// <ul>
276    /// <li>
277    /// <p>General purpose:</p>
278    /// <ul>
279    /// <li>
280    /// <p>Current generation:</p>
281    /// <p><b>M7g node types</b>: <code>cache.m7g.large</code>, <code>cache.m7g.xlarge</code>, <code>cache.m7g.2xlarge</code>, <code>cache.m7g.4xlarge</code>, <code>cache.m7g.8xlarge</code>, <code>cache.m7g.12xlarge</code>, <code>cache.m7g.16xlarge</code></p><note>
282    /// <p>For region availability, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion">Supported Node Types</a></p>
283    /// </note>
284    /// <p><b>M6g node types</b> (available only for Redis OSS engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward): <code>cache.m6g.large</code>, <code>cache.m6g.xlarge</code>, <code>cache.m6g.2xlarge</code>, <code>cache.m6g.4xlarge</code>, <code>cache.m6g.8xlarge</code>, <code>cache.m6g.12xlarge</code>, <code>cache.m6g.16xlarge</code></p>
285    /// <p><b>M5 node types:</b> <code>cache.m5.large</code>, <code>cache.m5.xlarge</code>, <code>cache.m5.2xlarge</code>, <code>cache.m5.4xlarge</code>, <code>cache.m5.12xlarge</code>, <code>cache.m5.24xlarge</code></p>
286    /// <p><b>M4 node types:</b> <code>cache.m4.large</code>, <code>cache.m4.xlarge</code>, <code>cache.m4.2xlarge</code>, <code>cache.m4.4xlarge</code>, <code>cache.m4.10xlarge</code></p>
287    /// <p><b>T4g node types</b> (available only for Redis OSS engine version 5.0.6 onward and Memcached engine version 1.5.16 onward): <code>cache.t4g.micro</code>, <code>cache.t4g.small</code>, <code>cache.t4g.medium</code></p>
288    /// <p><b>T3 node types:</b> <code>cache.t3.micro</code>, <code>cache.t3.small</code>, <code>cache.t3.medium</code></p>
289    /// <p><b>T2 node types:</b> <code>cache.t2.micro</code>, <code>cache.t2.small</code>, <code>cache.t2.medium</code></p></li>
290    /// <li>
291    /// <p>Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)</p>
292    /// <p><b>T1 node types:</b> <code>cache.t1.micro</code></p>
293    /// <p><b>M1 node types:</b> <code>cache.m1.small</code>, <code>cache.m1.medium</code>, <code>cache.m1.large</code>, <code>cache.m1.xlarge</code></p>
294    /// <p><b>M3 node types:</b> <code>cache.m3.medium</code>, <code>cache.m3.large</code>, <code>cache.m3.xlarge</code>, <code>cache.m3.2xlarge</code></p></li>
295    /// </ul></li>
296    /// <li>
297    /// <p>Compute optimized:</p>
298    /// <ul>
299    /// <li>
300    /// <p>Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)</p>
301    /// <p><b>C1 node types:</b> <code>cache.c1.xlarge</code></p></li>
302    /// </ul></li>
303    /// <li>
304    /// <p>Memory optimized:</p>
305    /// <ul>
306    /// <li>
307    /// <p>Current generation:</p>
308    /// <p><b>R7g node types</b>: <code>cache.r7g.large</code>, <code>cache.r7g.xlarge</code>, <code>cache.r7g.2xlarge</code>, <code>cache.r7g.4xlarge</code>, <code>cache.r7g.8xlarge</code>, <code>cache.r7g.12xlarge</code>, <code>cache.r7g.16xlarge</code></p><note>
309    /// <p>For region availability, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion">Supported Node Types</a></p>
310    /// </note>
311    /// <p><b>R6g node types</b> (available only for Redis OSS engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward): <code>cache.r6g.large</code>, <code>cache.r6g.xlarge</code>, <code>cache.r6g.2xlarge</code>, <code>cache.r6g.4xlarge</code>, <code>cache.r6g.8xlarge</code>, <code>cache.r6g.12xlarge</code>, <code>cache.r6g.16xlarge</code></p>
312    /// <p><b>R5 node types:</b> <code>cache.r5.large</code>, <code>cache.r5.xlarge</code>, <code>cache.r5.2xlarge</code>, <code>cache.r5.4xlarge</code>, <code>cache.r5.12xlarge</code>, <code>cache.r5.24xlarge</code></p>
313    /// <p><b>R4 node types:</b> <code>cache.r4.large</code>, <code>cache.r4.xlarge</code>, <code>cache.r4.2xlarge</code>, <code>cache.r4.4xlarge</code>, <code>cache.r4.8xlarge</code>, <code>cache.r4.16xlarge</code></p></li>
314    /// <li>
315    /// <p>Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)</p>
316    /// <p><b>M2 node types:</b> <code>cache.m2.xlarge</code>, <code>cache.m2.2xlarge</code>, <code>cache.m2.4xlarge</code></p>
317    /// <p><b>R3 node types:</b> <code>cache.r3.large</code>, <code>cache.r3.xlarge</code>, <code>cache.r3.2xlarge</code>, <code>cache.r3.4xlarge</code>, <code>cache.r3.8xlarge</code></p></li>
318    /// </ul></li>
319    /// </ul>
320    /// <p><b>Additional node type info</b></p>
321    /// <ul>
322    /// <li>
323    /// <p>All current generation instance types are created in Amazon VPC by default.</p></li>
324    /// <li>
325    /// <p>Valkey or Redis OSS append-only files (AOF) are not supported for T1 or T2 instances.</p></li>
326    /// <li>
327    /// <p>Valkey or Redis OSS Multi-AZ with automatic failover is not supported on T1 instances.</p></li>
328    /// <li>
329    /// <p>The configuration variables <code>appendonly</code> and <code>appendfsync</code> are not supported on Valkey, or on Redis OSS version 2.8.22 and later.</p></li>
330    /// </ul>
331    pub fn cache_node_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
332        self.inner = self.inner.cache_node_type(input.into());
333        self
334    }
335    /// <p>The compute and memory capacity of the nodes in the node group (shard).</p>
336    /// <p>The following node types are supported by ElastiCache. Generally speaking, the current generation types provide more memory and computational power at lower cost when compared to their equivalent previous generation counterparts.</p>
337    /// <ul>
338    /// <li>
339    /// <p>General purpose:</p>
340    /// <ul>
341    /// <li>
342    /// <p>Current generation:</p>
343    /// <p><b>M7g node types</b>: <code>cache.m7g.large</code>, <code>cache.m7g.xlarge</code>, <code>cache.m7g.2xlarge</code>, <code>cache.m7g.4xlarge</code>, <code>cache.m7g.8xlarge</code>, <code>cache.m7g.12xlarge</code>, <code>cache.m7g.16xlarge</code></p><note>
344    /// <p>For region availability, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion">Supported Node Types</a></p>
345    /// </note>
346    /// <p><b>M6g node types</b> (available only for Redis OSS engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward): <code>cache.m6g.large</code>, <code>cache.m6g.xlarge</code>, <code>cache.m6g.2xlarge</code>, <code>cache.m6g.4xlarge</code>, <code>cache.m6g.8xlarge</code>, <code>cache.m6g.12xlarge</code>, <code>cache.m6g.16xlarge</code></p>
347    /// <p><b>M5 node types:</b> <code>cache.m5.large</code>, <code>cache.m5.xlarge</code>, <code>cache.m5.2xlarge</code>, <code>cache.m5.4xlarge</code>, <code>cache.m5.12xlarge</code>, <code>cache.m5.24xlarge</code></p>
348    /// <p><b>M4 node types:</b> <code>cache.m4.large</code>, <code>cache.m4.xlarge</code>, <code>cache.m4.2xlarge</code>, <code>cache.m4.4xlarge</code>, <code>cache.m4.10xlarge</code></p>
349    /// <p><b>T4g node types</b> (available only for Redis OSS engine version 5.0.6 onward and Memcached engine version 1.5.16 onward): <code>cache.t4g.micro</code>, <code>cache.t4g.small</code>, <code>cache.t4g.medium</code></p>
350    /// <p><b>T3 node types:</b> <code>cache.t3.micro</code>, <code>cache.t3.small</code>, <code>cache.t3.medium</code></p>
351    /// <p><b>T2 node types:</b> <code>cache.t2.micro</code>, <code>cache.t2.small</code>, <code>cache.t2.medium</code></p></li>
352    /// <li>
353    /// <p>Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)</p>
354    /// <p><b>T1 node types:</b> <code>cache.t1.micro</code></p>
355    /// <p><b>M1 node types:</b> <code>cache.m1.small</code>, <code>cache.m1.medium</code>, <code>cache.m1.large</code>, <code>cache.m1.xlarge</code></p>
356    /// <p><b>M3 node types:</b> <code>cache.m3.medium</code>, <code>cache.m3.large</code>, <code>cache.m3.xlarge</code>, <code>cache.m3.2xlarge</code></p></li>
357    /// </ul></li>
358    /// <li>
359    /// <p>Compute optimized:</p>
360    /// <ul>
361    /// <li>
362    /// <p>Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)</p>
363    /// <p><b>C1 node types:</b> <code>cache.c1.xlarge</code></p></li>
364    /// </ul></li>
365    /// <li>
366    /// <p>Memory optimized:</p>
367    /// <ul>
368    /// <li>
369    /// <p>Current generation:</p>
370    /// <p><b>R7g node types</b>: <code>cache.r7g.large</code>, <code>cache.r7g.xlarge</code>, <code>cache.r7g.2xlarge</code>, <code>cache.r7g.4xlarge</code>, <code>cache.r7g.8xlarge</code>, <code>cache.r7g.12xlarge</code>, <code>cache.r7g.16xlarge</code></p><note>
371    /// <p>For region availability, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion">Supported Node Types</a></p>
372    /// </note>
373    /// <p><b>R6g node types</b> (available only for Redis OSS engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward): <code>cache.r6g.large</code>, <code>cache.r6g.xlarge</code>, <code>cache.r6g.2xlarge</code>, <code>cache.r6g.4xlarge</code>, <code>cache.r6g.8xlarge</code>, <code>cache.r6g.12xlarge</code>, <code>cache.r6g.16xlarge</code></p>
374    /// <p><b>R5 node types:</b> <code>cache.r5.large</code>, <code>cache.r5.xlarge</code>, <code>cache.r5.2xlarge</code>, <code>cache.r5.4xlarge</code>, <code>cache.r5.12xlarge</code>, <code>cache.r5.24xlarge</code></p>
375    /// <p><b>R4 node types:</b> <code>cache.r4.large</code>, <code>cache.r4.xlarge</code>, <code>cache.r4.2xlarge</code>, <code>cache.r4.4xlarge</code>, <code>cache.r4.8xlarge</code>, <code>cache.r4.16xlarge</code></p></li>
376    /// <li>
377    /// <p>Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)</p>
378    /// <p><b>M2 node types:</b> <code>cache.m2.xlarge</code>, <code>cache.m2.2xlarge</code>, <code>cache.m2.4xlarge</code></p>
379    /// <p><b>R3 node types:</b> <code>cache.r3.large</code>, <code>cache.r3.xlarge</code>, <code>cache.r3.2xlarge</code>, <code>cache.r3.4xlarge</code>, <code>cache.r3.8xlarge</code></p></li>
380    /// </ul></li>
381    /// </ul>
382    /// <p><b>Additional node type info</b></p>
383    /// <ul>
384    /// <li>
385    /// <p>All current generation instance types are created in Amazon VPC by default.</p></li>
386    /// <li>
387    /// <p>Valkey or Redis OSS append-only files (AOF) are not supported for T1 or T2 instances.</p></li>
388    /// <li>
389    /// <p>Valkey or Redis OSS Multi-AZ with automatic failover is not supported on T1 instances.</p></li>
390    /// <li>
391    /// <p>The configuration variables <code>appendonly</code> and <code>appendfsync</code> are not supported on Valkey, or on Redis OSS version 2.8.22 and later.</p></li>
392    /// </ul>
393    pub fn set_cache_node_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
394        self.inner = self.inner.set_cache_node_type(input);
395        self
396    }
397    /// <p>The compute and memory capacity of the nodes in the node group (shard).</p>
398    /// <p>The following node types are supported by ElastiCache. Generally speaking, the current generation types provide more memory and computational power at lower cost when compared to their equivalent previous generation counterparts.</p>
399    /// <ul>
400    /// <li>
401    /// <p>General purpose:</p>
402    /// <ul>
403    /// <li>
404    /// <p>Current generation:</p>
405    /// <p><b>M7g node types</b>: <code>cache.m7g.large</code>, <code>cache.m7g.xlarge</code>, <code>cache.m7g.2xlarge</code>, <code>cache.m7g.4xlarge</code>, <code>cache.m7g.8xlarge</code>, <code>cache.m7g.12xlarge</code>, <code>cache.m7g.16xlarge</code></p><note>
406    /// <p>For region availability, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion">Supported Node Types</a></p>
407    /// </note>
408    /// <p><b>M6g node types</b> (available only for Redis OSS engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward): <code>cache.m6g.large</code>, <code>cache.m6g.xlarge</code>, <code>cache.m6g.2xlarge</code>, <code>cache.m6g.4xlarge</code>, <code>cache.m6g.8xlarge</code>, <code>cache.m6g.12xlarge</code>, <code>cache.m6g.16xlarge</code></p>
409    /// <p><b>M5 node types:</b> <code>cache.m5.large</code>, <code>cache.m5.xlarge</code>, <code>cache.m5.2xlarge</code>, <code>cache.m5.4xlarge</code>, <code>cache.m5.12xlarge</code>, <code>cache.m5.24xlarge</code></p>
410    /// <p><b>M4 node types:</b> <code>cache.m4.large</code>, <code>cache.m4.xlarge</code>, <code>cache.m4.2xlarge</code>, <code>cache.m4.4xlarge</code>, <code>cache.m4.10xlarge</code></p>
411    /// <p><b>T4g node types</b> (available only for Redis OSS engine version 5.0.6 onward and Memcached engine version 1.5.16 onward): <code>cache.t4g.micro</code>, <code>cache.t4g.small</code>, <code>cache.t4g.medium</code></p>
412    /// <p><b>T3 node types:</b> <code>cache.t3.micro</code>, <code>cache.t3.small</code>, <code>cache.t3.medium</code></p>
413    /// <p><b>T2 node types:</b> <code>cache.t2.micro</code>, <code>cache.t2.small</code>, <code>cache.t2.medium</code></p></li>
414    /// <li>
415    /// <p>Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)</p>
416    /// <p><b>T1 node types:</b> <code>cache.t1.micro</code></p>
417    /// <p><b>M1 node types:</b> <code>cache.m1.small</code>, <code>cache.m1.medium</code>, <code>cache.m1.large</code>, <code>cache.m1.xlarge</code></p>
418    /// <p><b>M3 node types:</b> <code>cache.m3.medium</code>, <code>cache.m3.large</code>, <code>cache.m3.xlarge</code>, <code>cache.m3.2xlarge</code></p></li>
419    /// </ul></li>
420    /// <li>
421    /// <p>Compute optimized:</p>
422    /// <ul>
423    /// <li>
424    /// <p>Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)</p>
425    /// <p><b>C1 node types:</b> <code>cache.c1.xlarge</code></p></li>
426    /// </ul></li>
427    /// <li>
428    /// <p>Memory optimized:</p>
429    /// <ul>
430    /// <li>
431    /// <p>Current generation:</p>
432    /// <p><b>R7g node types</b>: <code>cache.r7g.large</code>, <code>cache.r7g.xlarge</code>, <code>cache.r7g.2xlarge</code>, <code>cache.r7g.4xlarge</code>, <code>cache.r7g.8xlarge</code>, <code>cache.r7g.12xlarge</code>, <code>cache.r7g.16xlarge</code></p><note>
433    /// <p>For region availability, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion">Supported Node Types</a></p>
434    /// </note>
435    /// <p><b>R6g node types</b> (available only for Redis OSS engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward): <code>cache.r6g.large</code>, <code>cache.r6g.xlarge</code>, <code>cache.r6g.2xlarge</code>, <code>cache.r6g.4xlarge</code>, <code>cache.r6g.8xlarge</code>, <code>cache.r6g.12xlarge</code>, <code>cache.r6g.16xlarge</code></p>
436    /// <p><b>R5 node types:</b> <code>cache.r5.large</code>, <code>cache.r5.xlarge</code>, <code>cache.r5.2xlarge</code>, <code>cache.r5.4xlarge</code>, <code>cache.r5.12xlarge</code>, <code>cache.r5.24xlarge</code></p>
437    /// <p><b>R4 node types:</b> <code>cache.r4.large</code>, <code>cache.r4.xlarge</code>, <code>cache.r4.2xlarge</code>, <code>cache.r4.4xlarge</code>, <code>cache.r4.8xlarge</code>, <code>cache.r4.16xlarge</code></p></li>
438    /// <li>
439    /// <p>Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)</p>
440    /// <p><b>M2 node types:</b> <code>cache.m2.xlarge</code>, <code>cache.m2.2xlarge</code>, <code>cache.m2.4xlarge</code></p>
441    /// <p><b>R3 node types:</b> <code>cache.r3.large</code>, <code>cache.r3.xlarge</code>, <code>cache.r3.2xlarge</code>, <code>cache.r3.4xlarge</code>, <code>cache.r3.8xlarge</code></p></li>
442    /// </ul></li>
443    /// </ul>
444    /// <p><b>Additional node type info</b></p>
445    /// <ul>
446    /// <li>
447    /// <p>All current generation instance types are created in Amazon VPC by default.</p></li>
448    /// <li>
449    /// <p>Valkey or Redis OSS append-only files (AOF) are not supported for T1 or T2 instances.</p></li>
450    /// <li>
451    /// <p>Valkey or Redis OSS Multi-AZ with automatic failover is not supported on T1 instances.</p></li>
452    /// <li>
453    /// <p>The configuration variables <code>appendonly</code> and <code>appendfsync</code> are not supported on Valkey, or on Redis OSS version 2.8.22 and later.</p></li>
454    /// </ul>
455    pub fn get_cache_node_type(&self) -> &::std::option::Option<::std::string::String> {
456        self.inner.get_cache_node_type()
457    }
458    /// <p>The name of the cache engine to be used for this cluster.</p>
459    /// <p>Valid values for this parameter are: <code>memcached</code> | <code>redis</code></p>
460    pub fn engine(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
461        self.inner = self.inner.engine(input.into());
462        self
463    }
464    /// <p>The name of the cache engine to be used for this cluster.</p>
465    /// <p>Valid values for this parameter are: <code>memcached</code> | <code>redis</code></p>
466    pub fn set_engine(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
467        self.inner = self.inner.set_engine(input);
468        self
469    }
470    /// <p>The name of the cache engine to be used for this cluster.</p>
471    /// <p>Valid values for this parameter are: <code>memcached</code> | <code>redis</code></p>
472    pub fn get_engine(&self) -> &::std::option::Option<::std::string::String> {
473        self.inner.get_engine()
474    }
475    /// <p>The version number of the cache engine to be used for this cluster. To view the supported cache engine versions, use the DescribeCacheEngineVersions operation.</p>
476    /// <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 cluster or replication group and create it anew with the earlier engine version.</p>
477    pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
478        self.inner = self.inner.engine_version(input.into());
479        self
480    }
481    /// <p>The version number of the cache engine to be used for this cluster. To view the supported cache engine versions, use the DescribeCacheEngineVersions operation.</p>
482    /// <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 cluster or replication group and create it anew with the earlier engine version.</p>
483    pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
484        self.inner = self.inner.set_engine_version(input);
485        self
486    }
487    /// <p>The version number of the cache engine to be used for this cluster. To view the supported cache engine versions, use the DescribeCacheEngineVersions operation.</p>
488    /// <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 cluster or replication group and create it anew with the earlier engine version.</p>
489    pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
490        self.inner.get_engine_version()
491    }
492    /// <p>The name of the parameter group to associate with this cluster. If this argument is omitted, the default parameter group for the specified engine is used. You cannot use any parameter group which has <code>cluster-enabled='yes'</code> when creating a cluster.</p>
493    pub fn cache_parameter_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
494        self.inner = self.inner.cache_parameter_group_name(input.into());
495        self
496    }
497    /// <p>The name of the parameter group to associate with this cluster. If this argument is omitted, the default parameter group for the specified engine is used. You cannot use any parameter group which has <code>cluster-enabled='yes'</code> when creating a cluster.</p>
498    pub fn set_cache_parameter_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
499        self.inner = self.inner.set_cache_parameter_group_name(input);
500        self
501    }
502    /// <p>The name of the parameter group to associate with this cluster. If this argument is omitted, the default parameter group for the specified engine is used. You cannot use any parameter group which has <code>cluster-enabled='yes'</code> when creating a cluster.</p>
503    pub fn get_cache_parameter_group_name(&self) -> &::std::option::Option<::std::string::String> {
504        self.inner.get_cache_parameter_group_name()
505    }
506    /// <p>The name of the subnet group to be used for the cluster.</p>
507    /// <p>Use this parameter only when you are creating a cluster in an Amazon Virtual Private Cloud (Amazon VPC).</p><important>
508    /// <p>If you're going to launch your cluster in an Amazon VPC, you need to create a subnet group before you start creating a cluster. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/SubnetGroups.html">Subnets and Subnet Groups</a>.</p>
509    /// </important>
510    pub fn cache_subnet_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
511        self.inner = self.inner.cache_subnet_group_name(input.into());
512        self
513    }
514    /// <p>The name of the subnet group to be used for the cluster.</p>
515    /// <p>Use this parameter only when you are creating a cluster in an Amazon Virtual Private Cloud (Amazon VPC).</p><important>
516    /// <p>If you're going to launch your cluster in an Amazon VPC, you need to create a subnet group before you start creating a cluster. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/SubnetGroups.html">Subnets and Subnet Groups</a>.</p>
517    /// </important>
518    pub fn set_cache_subnet_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
519        self.inner = self.inner.set_cache_subnet_group_name(input);
520        self
521    }
522    /// <p>The name of the subnet group to be used for the cluster.</p>
523    /// <p>Use this parameter only when you are creating a cluster in an Amazon Virtual Private Cloud (Amazon VPC).</p><important>
524    /// <p>If you're going to launch your cluster in an Amazon VPC, you need to create a subnet group before you start creating a cluster. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/SubnetGroups.html">Subnets and Subnet Groups</a>.</p>
525    /// </important>
526    pub fn get_cache_subnet_group_name(&self) -> &::std::option::Option<::std::string::String> {
527        self.inner.get_cache_subnet_group_name()
528    }
529    ///
530    /// Appends an item to `CacheSecurityGroupNames`.
531    ///
532    /// To override the contents of this collection use [`set_cache_security_group_names`](Self::set_cache_security_group_names).
533    ///
534    /// <p>A list of security group names to associate with this cluster.</p>
535    /// <p>Use this parameter only when you are creating a cluster outside of an Amazon Virtual Private Cloud (Amazon VPC).</p>
536    pub fn cache_security_group_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
537        self.inner = self.inner.cache_security_group_names(input.into());
538        self
539    }
540    /// <p>A list of security group names to associate with this cluster.</p>
541    /// <p>Use this parameter only when you are creating a cluster outside of an Amazon Virtual Private Cloud (Amazon VPC).</p>
542    pub fn set_cache_security_group_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
543        self.inner = self.inner.set_cache_security_group_names(input);
544        self
545    }
546    /// <p>A list of security group names to associate with this cluster.</p>
547    /// <p>Use this parameter only when you are creating a cluster outside of an Amazon Virtual Private Cloud (Amazon VPC).</p>
548    pub fn get_cache_security_group_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
549        self.inner.get_cache_security_group_names()
550    }
551    ///
552    /// Appends an item to `SecurityGroupIds`.
553    ///
554    /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
555    ///
556    /// <p>One or more VPC security groups associated with the cluster.</p>
557    /// <p>Use this parameter only when you are creating a cluster in an Amazon Virtual Private Cloud (Amazon VPC).</p>
558    pub fn security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
559        self.inner = self.inner.security_group_ids(input.into());
560        self
561    }
562    /// <p>One or more VPC security groups associated with the cluster.</p>
563    /// <p>Use this parameter only when you are creating a cluster in an Amazon Virtual Private Cloud (Amazon VPC).</p>
564    pub fn set_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
565        self.inner = self.inner.set_security_group_ids(input);
566        self
567    }
568    /// <p>One or more VPC security groups associated with the cluster.</p>
569    /// <p>Use this parameter only when you are creating a cluster in an Amazon Virtual Private Cloud (Amazon VPC).</p>
570    pub fn get_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
571        self.inner.get_security_group_ids()
572    }
573    ///
574    /// Appends an item to `Tags`.
575    ///
576    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
577    ///
578    /// <p>A list of tags to be added to this resource.</p>
579    pub fn tags(mut self, input: crate::types::Tag) -> Self {
580        self.inner = self.inner.tags(input);
581        self
582    }
583    /// <p>A list of tags to be added to this resource.</p>
584    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
585        self.inner = self.inner.set_tags(input);
586        self
587    }
588    /// <p>A list of tags to be added to this resource.</p>
589    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
590        self.inner.get_tags()
591    }
592    ///
593    /// Appends an item to `SnapshotArns`.
594    ///
595    /// To override the contents of this collection use [`set_snapshot_arns`](Self::set_snapshot_arns).
596    ///
597    /// <p>A single-element string list containing an Amazon Resource Name (ARN) that uniquely identifies a Valkey or Redis OSS RDB snapshot file stored in Amazon S3. The snapshot file is used to populate the node group (shard). The Amazon S3 object name in the ARN cannot contain any commas.</p><note>
598    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
599    /// </note>
600    /// <p>Example of an Amazon S3 ARN: <code>arn:aws:s3:::my_bucket/snapshot1.rdb</code></p>
601    pub fn snapshot_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
602        self.inner = self.inner.snapshot_arns(input.into());
603        self
604    }
605    /// <p>A single-element string list containing an Amazon Resource Name (ARN) that uniquely identifies a Valkey or Redis OSS RDB snapshot file stored in Amazon S3. The snapshot file is used to populate the node group (shard). The Amazon S3 object name in the ARN cannot contain any commas.</p><note>
606    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
607    /// </note>
608    /// <p>Example of an Amazon S3 ARN: <code>arn:aws:s3:::my_bucket/snapshot1.rdb</code></p>
609    pub fn set_snapshot_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
610        self.inner = self.inner.set_snapshot_arns(input);
611        self
612    }
613    /// <p>A single-element string list containing an Amazon Resource Name (ARN) that uniquely identifies a Valkey or Redis OSS RDB snapshot file stored in Amazon S3. The snapshot file is used to populate the node group (shard). The Amazon S3 object name in the ARN cannot contain any commas.</p><note>
614    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
615    /// </note>
616    /// <p>Example of an Amazon S3 ARN: <code>arn:aws:s3:::my_bucket/snapshot1.rdb</code></p>
617    pub fn get_snapshot_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
618        self.inner.get_snapshot_arns()
619    }
620    /// <p>The name of a Valkey or Redis OSS snapshot from which to restore data into the new node group (shard). The snapshot status changes to <code>restoring</code> while the new node group (shard) is being created.</p><note>
621    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
622    /// </note>
623    pub fn snapshot_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
624        self.inner = self.inner.snapshot_name(input.into());
625        self
626    }
627    /// <p>The name of a Valkey or Redis OSS snapshot from which to restore data into the new node group (shard). The snapshot status changes to <code>restoring</code> while the new node group (shard) is being created.</p><note>
628    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
629    /// </note>
630    pub fn set_snapshot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
631        self.inner = self.inner.set_snapshot_name(input);
632        self
633    }
634    /// <p>The name of a Valkey or Redis OSS snapshot from which to restore data into the new node group (shard). The snapshot status changes to <code>restoring</code> while the new node group (shard) is being created.</p><note>
635    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
636    /// </note>
637    pub fn get_snapshot_name(&self) -> &::std::option::Option<::std::string::String> {
638        self.inner.get_snapshot_name()
639    }
640    /// <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>
641    pub fn preferred_maintenance_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
642        self.inner = self.inner.preferred_maintenance_window(input.into());
643        self
644    }
645    /// <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>
646    pub fn set_preferred_maintenance_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
647        self.inner = self.inner.set_preferred_maintenance_window(input);
648        self
649    }
650    /// <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>
651    pub fn get_preferred_maintenance_window(&self) -> &::std::option::Option<::std::string::String> {
652        self.inner.get_preferred_maintenance_window()
653    }
654    /// <p>The port number on which each of the cache nodes accepts connections.</p>
655    pub fn port(mut self, input: i32) -> Self {
656        self.inner = self.inner.port(input);
657        self
658    }
659    /// <p>The port number on which each of the cache nodes accepts connections.</p>
660    pub fn set_port(mut self, input: ::std::option::Option<i32>) -> Self {
661        self.inner = self.inner.set_port(input);
662        self
663    }
664    /// <p>The port number on which each of the cache nodes accepts connections.</p>
665    pub fn get_port(&self) -> &::std::option::Option<i32> {
666        self.inner.get_port()
667    }
668    /// <p>The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic to which notifications are sent.</p><note>
669    /// <p>The Amazon SNS topic owner must be the same as the cluster owner.</p>
670    /// </note>
671    pub fn notification_topic_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
672        self.inner = self.inner.notification_topic_arn(input.into());
673        self
674    }
675    /// <p>The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic to which notifications are sent.</p><note>
676    /// <p>The Amazon SNS topic owner must be the same as the cluster owner.</p>
677    /// </note>
678    pub fn set_notification_topic_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
679        self.inner = self.inner.set_notification_topic_arn(input);
680        self
681    }
682    /// <p>The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic to which notifications are sent.</p><note>
683    /// <p>The Amazon SNS topic owner must be the same as the cluster owner.</p>
684    /// </note>
685    pub fn get_notification_topic_arn(&self) -> &::std::option::Option<::std::string::String> {
686        self.inner.get_notification_topic_arn()
687    }
688    /// <p>&nbsp;If you are running Valkey 7.2 and above or Redis OSS engine version 6.0 and above, set this parameter to yes to opt-in to the next auto minor version upgrade campaign. This parameter is disabled for previous versions.&nbsp;</p>
689    pub fn auto_minor_version_upgrade(mut self, input: bool) -> Self {
690        self.inner = self.inner.auto_minor_version_upgrade(input);
691        self
692    }
693    /// <p>&nbsp;If you are running Valkey 7.2 and above or Redis OSS engine version 6.0 and above, set this parameter to yes to opt-in to the next auto minor version upgrade campaign. This parameter is disabled for previous versions.&nbsp;</p>
694    pub fn set_auto_minor_version_upgrade(mut self, input: ::std::option::Option<bool>) -> Self {
695        self.inner = self.inner.set_auto_minor_version_upgrade(input);
696        self
697    }
698    /// <p>&nbsp;If you are running Valkey 7.2 and above or Redis OSS engine version 6.0 and above, set this parameter to yes to opt-in to the next auto minor version upgrade campaign. This parameter is disabled for previous versions.&nbsp;</p>
699    pub fn get_auto_minor_version_upgrade(&self) -> &::std::option::Option<bool> {
700        self.inner.get_auto_minor_version_upgrade()
701    }
702    /// <p>The number of days for which ElastiCache retains automatic snapshots before deleting them. For example, if you set <code>SnapshotRetentionLimit</code> to 5, a snapshot taken today is retained for 5 days before being deleted.</p><note>
703    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
704    /// </note>
705    /// <p>Default: 0 (i.e., automatic backups are disabled for this cache cluster).</p>
706    pub fn snapshot_retention_limit(mut self, input: i32) -> Self {
707        self.inner = self.inner.snapshot_retention_limit(input);
708        self
709    }
710    /// <p>The number of days for which ElastiCache retains automatic snapshots before deleting them. For example, if you set <code>SnapshotRetentionLimit</code> to 5, a snapshot taken today is retained for 5 days before being deleted.</p><note>
711    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
712    /// </note>
713    /// <p>Default: 0 (i.e., automatic backups are disabled for this cache cluster).</p>
714    pub fn set_snapshot_retention_limit(mut self, input: ::std::option::Option<i32>) -> Self {
715        self.inner = self.inner.set_snapshot_retention_limit(input);
716        self
717    }
718    /// <p>The number of days for which ElastiCache retains automatic snapshots before deleting them. For example, if you set <code>SnapshotRetentionLimit</code> to 5, a snapshot taken today is retained for 5 days before being deleted.</p><note>
719    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
720    /// </note>
721    /// <p>Default: 0 (i.e., automatic backups are disabled for this cache cluster).</p>
722    pub fn get_snapshot_retention_limit(&self) -> &::std::option::Option<i32> {
723        self.inner.get_snapshot_retention_limit()
724    }
725    /// <p>The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your node group (shard).</p>
726    /// <p>Example: <code>05:00-09:00</code></p>
727    /// <p>If you do not specify this parameter, ElastiCache automatically chooses an appropriate time range.</p><note>
728    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
729    /// </note>
730    pub fn snapshot_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
731        self.inner = self.inner.snapshot_window(input.into());
732        self
733    }
734    /// <p>The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your node group (shard).</p>
735    /// <p>Example: <code>05:00-09:00</code></p>
736    /// <p>If you do not specify this parameter, ElastiCache automatically chooses an appropriate time range.</p><note>
737    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
738    /// </note>
739    pub fn set_snapshot_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
740        self.inner = self.inner.set_snapshot_window(input);
741        self
742    }
743    /// <p>The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your node group (shard).</p>
744    /// <p>Example: <code>05:00-09:00</code></p>
745    /// <p>If you do not specify this parameter, ElastiCache automatically chooses an appropriate time range.</p><note>
746    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
747    /// </note>
748    pub fn get_snapshot_window(&self) -> &::std::option::Option<::std::string::String> {
749        self.inner.get_snapshot_window()
750    }
751    /// <p><b>Reserved parameter.</b> The password used to access a password protected server.</p>
752    /// <p>Password constraints:</p>
753    /// <ul>
754    /// <li>
755    /// <p>Must be only printable ASCII characters.</p></li>
756    /// <li>
757    /// <p>Must be at least 16 characters and no more than 128 characters in length.</p></li>
758    /// <li>
759    /// <p>The only permitted printable special characters are !, &amp;, #, $, ^, &lt;, &gt;, and -. Other printable special characters cannot be used in the AUTH token.</p></li>
760    /// </ul>
761    /// <p>For more information, see <a href="http://redis.io/commands/AUTH">AUTH password</a> at http://redis.io/commands/AUTH.</p>
762    pub fn auth_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
763        self.inner = self.inner.auth_token(input.into());
764        self
765    }
766    /// <p><b>Reserved parameter.</b> The password used to access a password protected server.</p>
767    /// <p>Password constraints:</p>
768    /// <ul>
769    /// <li>
770    /// <p>Must be only printable ASCII characters.</p></li>
771    /// <li>
772    /// <p>Must be at least 16 characters and no more than 128 characters in length.</p></li>
773    /// <li>
774    /// <p>The only permitted printable special characters are !, &amp;, #, $, ^, &lt;, &gt;, and -. Other printable special characters cannot be used in the AUTH token.</p></li>
775    /// </ul>
776    /// <p>For more information, see <a href="http://redis.io/commands/AUTH">AUTH password</a> at http://redis.io/commands/AUTH.</p>
777    pub fn set_auth_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
778        self.inner = self.inner.set_auth_token(input);
779        self
780    }
781    /// <p><b>Reserved parameter.</b> The password used to access a password protected server.</p>
782    /// <p>Password constraints:</p>
783    /// <ul>
784    /// <li>
785    /// <p>Must be only printable ASCII characters.</p></li>
786    /// <li>
787    /// <p>Must be at least 16 characters and no more than 128 characters in length.</p></li>
788    /// <li>
789    /// <p>The only permitted printable special characters are !, &amp;, #, $, ^, &lt;, &gt;, and -. Other printable special characters cannot be used in the AUTH token.</p></li>
790    /// </ul>
791    /// <p>For more information, see <a href="http://redis.io/commands/AUTH">AUTH password</a> at http://redis.io/commands/AUTH.</p>
792    pub fn get_auth_token(&self) -> &::std::option::Option<::std::string::String> {
793        self.inner.get_auth_token()
794    }
795    /// <p>Specifies whether the nodes in the cluster are created in a single outpost or across multiple outposts.</p>
796    pub fn outpost_mode(mut self, input: crate::types::OutpostMode) -> Self {
797        self.inner = self.inner.outpost_mode(input);
798        self
799    }
800    /// <p>Specifies whether the nodes in the cluster are created in a single outpost or across multiple outposts.</p>
801    pub fn set_outpost_mode(mut self, input: ::std::option::Option<crate::types::OutpostMode>) -> Self {
802        self.inner = self.inner.set_outpost_mode(input);
803        self
804    }
805    /// <p>Specifies whether the nodes in the cluster are created in a single outpost or across multiple outposts.</p>
806    pub fn get_outpost_mode(&self) -> &::std::option::Option<crate::types::OutpostMode> {
807        self.inner.get_outpost_mode()
808    }
809    /// <p>The outpost ARN in which the cache cluster is created.</p>
810    pub fn preferred_outpost_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
811        self.inner = self.inner.preferred_outpost_arn(input.into());
812        self
813    }
814    /// <p>The outpost ARN in which the cache cluster is created.</p>
815    pub fn set_preferred_outpost_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
816        self.inner = self.inner.set_preferred_outpost_arn(input);
817        self
818    }
819    /// <p>The outpost ARN in which the cache cluster is created.</p>
820    pub fn get_preferred_outpost_arn(&self) -> &::std::option::Option<::std::string::String> {
821        self.inner.get_preferred_outpost_arn()
822    }
823    ///
824    /// Appends an item to `PreferredOutpostArns`.
825    ///
826    /// To override the contents of this collection use [`set_preferred_outpost_arns`](Self::set_preferred_outpost_arns).
827    ///
828    /// <p>The outpost ARNs in which the cache cluster is created.</p>
829    pub fn preferred_outpost_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
830        self.inner = self.inner.preferred_outpost_arns(input.into());
831        self
832    }
833    /// <p>The outpost ARNs in which the cache cluster is created.</p>
834    pub fn set_preferred_outpost_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
835        self.inner = self.inner.set_preferred_outpost_arns(input);
836        self
837    }
838    /// <p>The outpost ARNs in which the cache cluster is created.</p>
839    pub fn get_preferred_outpost_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
840        self.inner.get_preferred_outpost_arns()
841    }
842    ///
843    /// Appends an item to `LogDeliveryConfigurations`.
844    ///
845    /// To override the contents of this collection use [`set_log_delivery_configurations`](Self::set_log_delivery_configurations).
846    ///
847    /// <p>Specifies the destination, format and type of the logs.</p>
848    pub fn log_delivery_configurations(mut self, input: crate::types::LogDeliveryConfigurationRequest) -> Self {
849        self.inner = self.inner.log_delivery_configurations(input);
850        self
851    }
852    /// <p>Specifies the destination, format and type of the logs.</p>
853    pub fn set_log_delivery_configurations(
854        mut self,
855        input: ::std::option::Option<::std::vec::Vec<crate::types::LogDeliveryConfigurationRequest>>,
856    ) -> Self {
857        self.inner = self.inner.set_log_delivery_configurations(input);
858        self
859    }
860    /// <p>Specifies the destination, format and type of the logs.</p>
861    pub fn get_log_delivery_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::LogDeliveryConfigurationRequest>> {
862        self.inner.get_log_delivery_configurations()
863    }
864    /// <p>A flag that enables in-transit encryption when set to true.</p>
865    pub fn transit_encryption_enabled(mut self, input: bool) -> Self {
866        self.inner = self.inner.transit_encryption_enabled(input);
867        self
868    }
869    /// <p>A flag that enables in-transit encryption when set to true.</p>
870    pub fn set_transit_encryption_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
871        self.inner = self.inner.set_transit_encryption_enabled(input);
872        self
873    }
874    /// <p>A flag that enables in-transit encryption when set to true.</p>
875    pub fn get_transit_encryption_enabled(&self) -> &::std::option::Option<bool> {
876        self.inner.get_transit_encryption_enabled()
877    }
878    /// <p>Must be either <code>ipv4</code> | <code>ipv6</code> | <code>dual_stack</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>
879    pub fn network_type(mut self, input: crate::types::NetworkType) -> Self {
880        self.inner = self.inner.network_type(input);
881        self
882    }
883    /// <p>Must be either <code>ipv4</code> | <code>ipv6</code> | <code>dual_stack</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>
884    pub fn set_network_type(mut self, input: ::std::option::Option<crate::types::NetworkType>) -> Self {
885        self.inner = self.inner.set_network_type(input);
886        self
887    }
888    /// <p>Must be either <code>ipv4</code> | <code>ipv6</code> | <code>dual_stack</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>
889    pub fn get_network_type(&self) -> &::std::option::Option<crate::types::NetworkType> {
890        self.inner.get_network_type()
891    }
892    /// <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>
893    pub fn ip_discovery(mut self, input: crate::types::IpDiscovery) -> Self {
894        self.inner = self.inner.ip_discovery(input);
895        self
896    }
897    /// <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>
898    pub fn set_ip_discovery(mut self, input: ::std::option::Option<crate::types::IpDiscovery>) -> Self {
899        self.inner = self.inner.set_ip_discovery(input);
900        self
901    }
902    /// <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>
903    pub fn get_ip_discovery(&self) -> &::std::option::Option<crate::types::IpDiscovery> {
904        self.inner.get_ip_discovery()
905    }
906}