1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::create_cache_cluster::_create_cache_cluster_output::CreateCacheClusterOutputBuilder;

pub use crate::operation::create_cache_cluster::_create_cache_cluster_input::CreateCacheClusterInputBuilder;

/// Fluent builder constructing a request to `CreateCacheCluster`.
///
/// <p>Creates a cluster. All nodes in the cluster run the same protocol-compliant cache engine software, either Memcached or Redis.</p>
/// <p>This operation is not supported for Redis (cluster mode enabled) clusters.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct CreateCacheClusterFluentBuilder {
    handle: std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::create_cache_cluster::builders::CreateCacheClusterInputBuilder,
}
impl CreateCacheClusterFluentBuilder {
    /// Creates a new `CreateCacheCluster`.
    pub(crate) fn new(handle: std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: Default::default(),
        }
    }

    /// Consume this builder, creating a customizable operation that can be modified before being
    /// sent. The operation's inner [http::Request] can be modified as well.
    pub async fn customize(
        self,
    ) -> std::result::Result<
        crate::client::customize::CustomizableOperation<
            crate::operation::create_cache_cluster::CreateCacheCluster,
            aws_http::retry::AwsResponseRetryClassifier,
        >,
        aws_smithy_http::result::SdkError<
            crate::operation::create_cache_cluster::CreateCacheClusterError,
        >,
    > {
        let handle = self.handle.clone();
        let operation = self
            .inner
            .build()
            .map_err(aws_smithy_http::result::SdkError::construction_failure)?
            .make_operation(&handle.conf)
            .await
            .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
        Ok(crate::client::customize::CustomizableOperation { handle, operation })
    }

    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> std::result::Result<
        crate::operation::create_cache_cluster::CreateCacheClusterOutput,
        aws_smithy_http::result::SdkError<
            crate::operation::create_cache_cluster::CreateCacheClusterError,
        >,
    > {
        let op = self
            .inner
            .build()
            .map_err(aws_smithy_http::result::SdkError::construction_failure)?
            .make_operation(&self.handle.conf)
            .await
            .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
        self.handle.client.call(op).await
    }
    /// <p>The node group (shard) identifier. This parameter is stored as a lowercase string.</p>
    /// <p> <b>Constraints:</b> </p>
    /// <ul>
    /// <li> <p>A name must contain from 1 to 50 alphanumeric characters or hyphens.</p> </li>
    /// <li> <p>The first character must be a letter.</p> </li>
    /// <li> <p>A name cannot end with a hyphen or contain two consecutive hyphens.</p> </li>
    /// </ul>
    pub fn cache_cluster_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.cache_cluster_id(input.into());
        self
    }
    /// <p>The node group (shard) identifier. This parameter is stored as a lowercase string.</p>
    /// <p> <b>Constraints:</b> </p>
    /// <ul>
    /// <li> <p>A name must contain from 1 to 50 alphanumeric characters or hyphens.</p> </li>
    /// <li> <p>The first character must be a letter.</p> </li>
    /// <li> <p>A name cannot end with a hyphen or contain two consecutive hyphens.</p> </li>
    /// </ul>
    pub fn set_cache_cluster_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_cache_cluster_id(input);
        self
    }
    /// <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>
    /// <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>
    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
    /// </note>
    pub fn replication_group_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.replication_group_id(input.into());
        self
    }
    /// <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>
    /// <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>
    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
    /// </note>
    pub fn set_replication_group_id(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.inner = self.inner.set_replication_group_id(input);
        self
    }
    /// <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>
    /// <p>This parameter is only supported for Memcached clusters.</p>
    /// <p>If the <code>AZMode</code> and <code>PreferredAvailabilityZones</code> are not specified, ElastiCache assumes <code>single-az</code> mode.</p>
    pub fn az_mode(mut self, input: crate::types::AzMode) -> Self {
        self.inner = self.inner.az_mode(input);
        self
    }
    /// <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>
    /// <p>This parameter is only supported for Memcached clusters.</p>
    /// <p>If the <code>AZMode</code> and <code>PreferredAvailabilityZones</code> are not specified, ElastiCache assumes <code>single-az</code> mode.</p>
    pub fn set_az_mode(mut self, input: std::option::Option<crate::types::AzMode>) -> Self {
        self.inner = self.inner.set_az_mode(input);
        self
    }
    /// <p>The EC2 Availability Zone in which the cluster is created.</p>
    /// <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>
    /// <p>Default: System chosen Availability Zone.</p>
    pub fn preferred_availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.preferred_availability_zone(input.into());
        self
    }
    /// <p>The EC2 Availability Zone in which the cluster is created.</p>
    /// <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>
    /// <p>Default: System chosen Availability Zone.</p>
    pub fn set_preferred_availability_zone(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.inner = self.inner.set_preferred_availability_zone(input);
        self
    }
    /// Appends an item to `PreferredAvailabilityZones`.
    ///
    /// To override the contents of this collection use [`set_preferred_availability_zones`](Self::set_preferred_availability_zones).
    ///
    /// <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>
    /// <p>This option is only supported on Memcached.</p> <note>
    /// <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>
    /// <p>The number of Availability Zones listed must equal the value of <code>NumCacheNodes</code>.</p>
    /// </note>
    /// <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>
    /// <p>Default: System chosen Availability Zones.</p>
    pub fn preferred_availability_zones(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.preferred_availability_zones(input.into());
        self
    }
    /// <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>
    /// <p>This option is only supported on Memcached.</p> <note>
    /// <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>
    /// <p>The number of Availability Zones listed must equal the value of <code>NumCacheNodes</code>.</p>
    /// </note>
    /// <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>
    /// <p>Default: System chosen Availability Zones.</p>
    pub fn set_preferred_availability_zones(
        mut self,
        input: std::option::Option<std::vec::Vec<std::string::String>>,
    ) -> Self {
        self.inner = self.inner.set_preferred_availability_zones(input);
        self
    }
    /// <p>The initial number of cache nodes that the cluster has.</p>
    /// <p>For clusters running Redis, this value must be 1. For clusters running Memcached, this value must be between 1 and 40.</p>
    /// <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>
    pub fn num_cache_nodes(mut self, input: i32) -> Self {
        self.inner = self.inner.num_cache_nodes(input);
        self
    }
    /// <p>The initial number of cache nodes that the cluster has.</p>
    /// <p>For clusters running Redis, this value must be 1. For clusters running Memcached, this value must be between 1 and 40.</p>
    /// <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>
    pub fn set_num_cache_nodes(mut self, input: std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_num_cache_nodes(input);
        self
    }
    /// <p>The compute and memory capacity of the nodes in the node group (shard).</p>
    /// <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>
    /// <ul>
    /// <li> <p>General purpose:</p>
    /// <ul>
    /// <li> <p>Current generation: </p> <p> <b>M6g node types</b> (available only for Redis 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> <note>
    /// <p>For region availability, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion">Supported Node Types</a> </p>
    /// </note> <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> <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> <p> <b>T4g node types</b> (available only for Redis 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> <p> <b>T3 node types:</b> <code>cache.t3.micro</code>, <code>cache.t3.small</code>, <code>cache.t3.medium</code> </p> <p> <b>T2 node types:</b> <code>cache.t2.micro</code>, <code>cache.t2.small</code>, <code>cache.t2.medium</code> </p> </li>
    /// <li> <p>Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)</p> <p> <b>T1 node types:</b> <code>cache.t1.micro</code> </p> <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> <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>
    /// </ul> </li>
    /// <li> <p>Compute optimized:</p>
    /// <ul>
    /// <li> <p>Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)</p> <p> <b>C1 node types:</b> <code>cache.c1.xlarge</code> </p> </li>
    /// </ul> </li>
    /// <li> <p>Memory optimized:</p>
    /// <ul>
    /// <li> <p>Current generation: </p> <p> <b>R6g node types</b> (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).</p> <p> <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> <note>
    /// <p>For region availability, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion">Supported Node Types</a> </p>
    /// </note> <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> <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>
    /// <li> <p>Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)</p> <p> <b>M2 node types:</b> <code>cache.m2.xlarge</code>, <code>cache.m2.2xlarge</code>, <code>cache.m2.4xlarge</code> </p> <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>
    /// </ul> </li>
    /// </ul>
    /// <p> <b>Additional node type info</b> </p>
    /// <ul>
    /// <li> <p>All current generation instance types are created in Amazon VPC by default.</p> </li>
    /// <li> <p>Redis append-only files (AOF) are not supported for T1 or T2 instances.</p> </li>
    /// <li> <p>Redis Multi-AZ with automatic failover is not supported on T1 instances.</p> </li>
    /// <li> <p>Redis configuration variables <code>appendonly</code> and <code>appendfsync</code> are not supported on Redis version 2.8.22 and later.</p> </li>
    /// </ul>
    pub fn cache_node_type(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.cache_node_type(input.into());
        self
    }
    /// <p>The compute and memory capacity of the nodes in the node group (shard).</p>
    /// <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>
    /// <ul>
    /// <li> <p>General purpose:</p>
    /// <ul>
    /// <li> <p>Current generation: </p> <p> <b>M6g node types</b> (available only for Redis 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> <note>
    /// <p>For region availability, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion">Supported Node Types</a> </p>
    /// </note> <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> <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> <p> <b>T4g node types</b> (available only for Redis 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> <p> <b>T3 node types:</b> <code>cache.t3.micro</code>, <code>cache.t3.small</code>, <code>cache.t3.medium</code> </p> <p> <b>T2 node types:</b> <code>cache.t2.micro</code>, <code>cache.t2.small</code>, <code>cache.t2.medium</code> </p> </li>
    /// <li> <p>Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)</p> <p> <b>T1 node types:</b> <code>cache.t1.micro</code> </p> <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> <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>
    /// </ul> </li>
    /// <li> <p>Compute optimized:</p>
    /// <ul>
    /// <li> <p>Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)</p> <p> <b>C1 node types:</b> <code>cache.c1.xlarge</code> </p> </li>
    /// </ul> </li>
    /// <li> <p>Memory optimized:</p>
    /// <ul>
    /// <li> <p>Current generation: </p> <p> <b>R6g node types</b> (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).</p> <p> <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> <note>
    /// <p>For region availability, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion">Supported Node Types</a> </p>
    /// </note> <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> <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>
    /// <li> <p>Previous generation: (not recommended. Existing clusters are still supported but creation of new clusters is not supported for these types.)</p> <p> <b>M2 node types:</b> <code>cache.m2.xlarge</code>, <code>cache.m2.2xlarge</code>, <code>cache.m2.4xlarge</code> </p> <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>
    /// </ul> </li>
    /// </ul>
    /// <p> <b>Additional node type info</b> </p>
    /// <ul>
    /// <li> <p>All current generation instance types are created in Amazon VPC by default.</p> </li>
    /// <li> <p>Redis append-only files (AOF) are not supported for T1 or T2 instances.</p> </li>
    /// <li> <p>Redis Multi-AZ with automatic failover is not supported on T1 instances.</p> </li>
    /// <li> <p>Redis configuration variables <code>appendonly</code> and <code>appendfsync</code> are not supported on Redis version 2.8.22 and later.</p> </li>
    /// </ul>
    pub fn set_cache_node_type(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_cache_node_type(input);
        self
    }
    /// <p>The name of the cache engine to be used for this cluster.</p>
    /// <p>Valid values for this parameter are: <code>memcached</code> | <code>redis</code> </p>
    pub fn engine(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.engine(input.into());
        self
    }
    /// <p>The name of the cache engine to be used for this cluster.</p>
    /// <p>Valid values for this parameter are: <code>memcached</code> | <code>redis</code> </p>
    pub fn set_engine(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_engine(input);
        self
    }
    /// <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>
    /// <p> <b>Important:</b> You can upgrade to a newer engine version (see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/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>
    pub fn engine_version(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.engine_version(input.into());
        self
    }
    /// <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>
    /// <p> <b>Important:</b> You can upgrade to a newer engine version (see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/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>
    pub fn set_engine_version(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_engine_version(input);
        self
    }
    /// <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>
    pub fn cache_parameter_group_name(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.cache_parameter_group_name(input.into());
        self
    }
    /// <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>
    pub fn set_cache_parameter_group_name(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.inner = self.inner.set_cache_parameter_group_name(input);
        self
    }
    /// <p>The name of the subnet group to be used for the cluster.</p>
    /// <p>Use this parameter only when you are creating a cluster in an Amazon Virtual Private Cloud (Amazon VPC).</p> <important>
    /// <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/red-ug/SubnetGroups.html">Subnets and Subnet Groups</a>.</p>
    /// </important>
    pub fn cache_subnet_group_name(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.cache_subnet_group_name(input.into());
        self
    }
    /// <p>The name of the subnet group to be used for the cluster.</p>
    /// <p>Use this parameter only when you are creating a cluster in an Amazon Virtual Private Cloud (Amazon VPC).</p> <important>
    /// <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/red-ug/SubnetGroups.html">Subnets and Subnet Groups</a>.</p>
    /// </important>
    pub fn set_cache_subnet_group_name(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.inner = self.inner.set_cache_subnet_group_name(input);
        self
    }
    /// Appends an item to `CacheSecurityGroupNames`.
    ///
    /// To override the contents of this collection use [`set_cache_security_group_names`](Self::set_cache_security_group_names).
    ///
    /// <p>A list of security group names to associate with this cluster.</p>
    /// <p>Use this parameter only when you are creating a cluster outside of an Amazon Virtual Private Cloud (Amazon VPC).</p>
    pub fn cache_security_group_names(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.cache_security_group_names(input.into());
        self
    }
    /// <p>A list of security group names to associate with this cluster.</p>
    /// <p>Use this parameter only when you are creating a cluster outside of an Amazon Virtual Private Cloud (Amazon VPC).</p>
    pub fn set_cache_security_group_names(
        mut self,
        input: std::option::Option<std::vec::Vec<std::string::String>>,
    ) -> Self {
        self.inner = self.inner.set_cache_security_group_names(input);
        self
    }
    /// Appends an item to `SecurityGroupIds`.
    ///
    /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
    ///
    /// <p>One or more VPC security groups associated with the cluster.</p>
    /// <p>Use this parameter only when you are creating a cluster in an Amazon Virtual Private Cloud (Amazon VPC).</p>
    pub fn security_group_ids(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.security_group_ids(input.into());
        self
    }
    /// <p>One or more VPC security groups associated with the cluster.</p>
    /// <p>Use this parameter only when you are creating a cluster in an Amazon Virtual Private Cloud (Amazon VPC).</p>
    pub fn set_security_group_ids(
        mut self,
        input: std::option::Option<std::vec::Vec<std::string::String>>,
    ) -> Self {
        self.inner = self.inner.set_security_group_ids(input);
        self
    }
    /// Appends an item to `Tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>A list of tags to be added to this resource.</p>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        self.inner = self.inner.tags(input);
        self
    }
    /// <p>A list of tags to be added to this resource.</p>
    pub fn set_tags(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::Tag>>,
    ) -> Self {
        self.inner = self.inner.set_tags(input);
        self
    }
    /// Appends an item to `SnapshotArns`.
    ///
    /// To override the contents of this collection use [`set_snapshot_arns`](Self::set_snapshot_arns).
    ///
    /// <p>A single-element string list containing an Amazon Resource Name (ARN) that uniquely identifies a Redis 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>
    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
    /// </note>
    /// <p>Example of an Amazon S3 ARN: <code>arn:aws:s3:::my_bucket/snapshot1.rdb</code> </p>
    pub fn snapshot_arns(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.snapshot_arns(input.into());
        self
    }
    /// <p>A single-element string list containing an Amazon Resource Name (ARN) that uniquely identifies a Redis 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>
    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
    /// </note>
    /// <p>Example of an Amazon S3 ARN: <code>arn:aws:s3:::my_bucket/snapshot1.rdb</code> </p>
    pub fn set_snapshot_arns(
        mut self,
        input: std::option::Option<std::vec::Vec<std::string::String>>,
    ) -> Self {
        self.inner = self.inner.set_snapshot_arns(input);
        self
    }
    /// <p>The name of a Redis 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>
    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
    /// </note>
    pub fn snapshot_name(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.snapshot_name(input.into());
        self
    }
    /// <p>The name of a Redis 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>
    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
    /// </note>
    pub fn set_snapshot_name(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_snapshot_name(input);
        self
    }
    /// <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>
    pub fn preferred_maintenance_window(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.preferred_maintenance_window(input.into());
        self
    }
    /// <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>
    pub fn set_preferred_maintenance_window(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.inner = self.inner.set_preferred_maintenance_window(input);
        self
    }
    /// <p>The port number on which each of the cache nodes accepts connections.</p>
    pub fn port(mut self, input: i32) -> Self {
        self.inner = self.inner.port(input);
        self
    }
    /// <p>The port number on which each of the cache nodes accepts connections.</p>
    pub fn set_port(mut self, input: std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_port(input);
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic to which notifications are sent.</p> <note>
    /// <p>The Amazon SNS topic owner must be the same as the cluster owner.</p>
    /// </note>
    pub fn notification_topic_arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.notification_topic_arn(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic to which notifications are sent.</p> <note>
    /// <p>The Amazon SNS topic owner must be the same as the cluster owner.</p>
    /// </note>
    pub fn set_notification_topic_arn(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.inner = self.inner.set_notification_topic_arn(input);
        self
    }
    /// <p>&nbsp;If you are running Redis 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.&nbsp; </p>
    pub fn auto_minor_version_upgrade(mut self, input: bool) -> Self {
        self.inner = self.inner.auto_minor_version_upgrade(input);
        self
    }
    /// <p>&nbsp;If you are running Redis 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.&nbsp; </p>
    pub fn set_auto_minor_version_upgrade(mut self, input: std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_auto_minor_version_upgrade(input);
        self
    }
    /// <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>
    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
    /// </note>
    /// <p>Default: 0 (i.e., automatic backups are disabled for this cache cluster).</p>
    pub fn snapshot_retention_limit(mut self, input: i32) -> Self {
        self.inner = self.inner.snapshot_retention_limit(input);
        self
    }
    /// <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>
    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
    /// </note>
    /// <p>Default: 0 (i.e., automatic backups are disabled for this cache cluster).</p>
    pub fn set_snapshot_retention_limit(mut self, input: std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_snapshot_retention_limit(input);
        self
    }
    /// <p>The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your node group (shard).</p>
    /// <p>Example: <code>05:00-09:00</code> </p>
    /// <p>If you do not specify this parameter, ElastiCache automatically chooses an appropriate time range.</p> <note>
    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
    /// </note>
    pub fn snapshot_window(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.snapshot_window(input.into());
        self
    }
    /// <p>The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your node group (shard).</p>
    /// <p>Example: <code>05:00-09:00</code> </p>
    /// <p>If you do not specify this parameter, ElastiCache automatically chooses an appropriate time range.</p> <note>
    /// <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p>
    /// </note>
    pub fn set_snapshot_window(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_snapshot_window(input);
        self
    }
    /// <p> <b>Reserved parameter.</b> The password used to access a password protected server.</p>
    /// <p>Password constraints:</p>
    /// <ul>
    /// <li> <p>Must be only printable ASCII characters.</p> </li>
    /// <li> <p>Must be at least 16 characters and no more than 128 characters in length.</p> </li>
    /// <li> <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>
    /// </ul>
    /// <p>For more information, see <a href="http://redis.io/commands/AUTH">AUTH password</a> at http://redis.io/commands/AUTH.</p>
    pub fn auth_token(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.auth_token(input.into());
        self
    }
    /// <p> <b>Reserved parameter.</b> The password used to access a password protected server.</p>
    /// <p>Password constraints:</p>
    /// <ul>
    /// <li> <p>Must be only printable ASCII characters.</p> </li>
    /// <li> <p>Must be at least 16 characters and no more than 128 characters in length.</p> </li>
    /// <li> <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>
    /// </ul>
    /// <p>For more information, see <a href="http://redis.io/commands/AUTH">AUTH password</a> at http://redis.io/commands/AUTH.</p>
    pub fn set_auth_token(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_auth_token(input);
        self
    }
    /// <p>Specifies whether the nodes in the cluster are created in a single outpost or across multiple outposts.</p>
    pub fn outpost_mode(mut self, input: crate::types::OutpostMode) -> Self {
        self.inner = self.inner.outpost_mode(input);
        self
    }
    /// <p>Specifies whether the nodes in the cluster are created in a single outpost or across multiple outposts.</p>
    pub fn set_outpost_mode(
        mut self,
        input: std::option::Option<crate::types::OutpostMode>,
    ) -> Self {
        self.inner = self.inner.set_outpost_mode(input);
        self
    }
    /// <p>The outpost ARN in which the cache cluster is created.</p>
    pub fn preferred_outpost_arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.preferred_outpost_arn(input.into());
        self
    }
    /// <p>The outpost ARN in which the cache cluster is created.</p>
    pub fn set_preferred_outpost_arn(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.inner = self.inner.set_preferred_outpost_arn(input);
        self
    }
    /// Appends an item to `PreferredOutpostArns`.
    ///
    /// To override the contents of this collection use [`set_preferred_outpost_arns`](Self::set_preferred_outpost_arns).
    ///
    /// <p>The outpost ARNs in which the cache cluster is created.</p>
    pub fn preferred_outpost_arns(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.preferred_outpost_arns(input.into());
        self
    }
    /// <p>The outpost ARNs in which the cache cluster is created.</p>
    pub fn set_preferred_outpost_arns(
        mut self,
        input: std::option::Option<std::vec::Vec<std::string::String>>,
    ) -> Self {
        self.inner = self.inner.set_preferred_outpost_arns(input);
        self
    }
    /// Appends an item to `LogDeliveryConfigurations`.
    ///
    /// To override the contents of this collection use [`set_log_delivery_configurations`](Self::set_log_delivery_configurations).
    ///
    /// <p>Specifies the destination, format and type of the logs. </p>
    pub fn log_delivery_configurations(
        mut self,
        input: crate::types::LogDeliveryConfigurationRequest,
    ) -> Self {
        self.inner = self.inner.log_delivery_configurations(input);
        self
    }
    /// <p>Specifies the destination, format and type of the logs. </p>
    pub fn set_log_delivery_configurations(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::LogDeliveryConfigurationRequest>>,
    ) -> Self {
        self.inner = self.inner.set_log_delivery_configurations(input);
        self
    }
    /// <p>A flag that enables in-transit encryption when set to true.</p>
    /// <p> Only available when creating a cache cluster in an Amazon VPC using Memcached version 1.6.12 or later.</p>
    pub fn transit_encryption_enabled(mut self, input: bool) -> Self {
        self.inner = self.inner.transit_encryption_enabled(input);
        self
    }
    /// <p>A flag that enables in-transit encryption when set to true.</p>
    /// <p> Only available when creating a cache cluster in an Amazon VPC using Memcached version 1.6.12 or later.</p>
    pub fn set_transit_encryption_enabled(mut self, input: std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_transit_encryption_enabled(input);
        self
    }
    /// <p>Must be either <code>ipv4</code> | <code>ipv6</code> | <code>dual_stack</code>. IPv6 is supported for workloads using Redis engine version 6.2 onward or Memcached engine version 1.6.6 on all instances built on the <a href="https://aws.amazon.com/ec2/nitro/">Nitro system</a>. </p>
    pub fn network_type(mut self, input: crate::types::NetworkType) -> Self {
        self.inner = self.inner.network_type(input);
        self
    }
    /// <p>Must be either <code>ipv4</code> | <code>ipv6</code> | <code>dual_stack</code>. IPv6 is supported for workloads using Redis engine version 6.2 onward or Memcached engine version 1.6.6 on all instances built on the <a href="https://aws.amazon.com/ec2/nitro/">Nitro system</a>. </p>
    pub fn set_network_type(
        mut self,
        input: std::option::Option<crate::types::NetworkType>,
    ) -> Self {
        self.inner = self.inner.set_network_type(input);
        self
    }
    /// <p>The network type you choose when modifying a cluster, either <code>ipv4</code> | <code>ipv6</code>. IPv6 is supported for workloads using Redis engine version 6.2 onward or Memcached engine version 1.6.6 on all instances built on the <a href="https://aws.amazon.com/ec2/nitro/">Nitro system</a>.</p>
    pub fn ip_discovery(mut self, input: crate::types::IpDiscovery) -> Self {
        self.inner = self.inner.ip_discovery(input);
        self
    }
    /// <p>The network type you choose when modifying a cluster, either <code>ipv4</code> | <code>ipv6</code>. IPv6 is supported for workloads using Redis engine version 6.2 onward or Memcached engine version 1.6.6 on all instances built on the <a href="https://aws.amazon.com/ec2/nitro/">Nitro system</a>.</p>
    pub fn set_ip_discovery(
        mut self,
        input: std::option::Option<crate::types::IpDiscovery>,
    ) -> Self {
        self.inner = self.inner.set_ip_discovery(input);
        self
    }
}