aws_sdk_dax/operation/create_cluster/_create_cluster_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateClusterInput {
6 /// <p>The cluster identifier. This parameter is stored as a lowercase string.</p>
7 /// <p><b>Constraints:</b></p>
8 /// <ul>
9 /// <li>
10 /// <p>A name must contain from 1 to 20 alphanumeric characters or hyphens.</p></li>
11 /// <li>
12 /// <p>The first character must be a letter.</p></li>
13 /// <li>
14 /// <p>A name cannot end with a hyphen or contain two consecutive hyphens.</p></li>
15 /// </ul>
16 pub cluster_name: ::std::option::Option<::std::string::String>,
17 /// <p>The compute and memory capacity of the nodes in the cluster.</p>
18 pub node_type: ::std::option::Option<::std::string::String>,
19 /// <p>A description of the cluster.</p>
20 pub description: ::std::option::Option<::std::string::String>,
21 /// <p>The number of nodes in the DAX cluster. A replication factor of 1 will create a single-node cluster, without any read replicas. For additional fault tolerance, you can create a multiple node cluster with one or more read replicas. To do this, set <code>ReplicationFactor</code> to a number between 3 (one primary and two read replicas) and 10 (one primary and nine read replicas). <code>If the AvailabilityZones</code> parameter is provided, its length must equal the <code>ReplicationFactor</code>.</p><note>
22 /// <p>AWS recommends that you have at least two read replicas per cluster.</p>
23 /// </note>
24 pub replication_factor: ::std::option::Option<i32>,
25 /// <p>The Availability Zones (AZs) in which the cluster nodes will reside after the cluster has been created or updated. If provided, the length of this list must equal the <code>ReplicationFactor</code> parameter. If you omit this parameter, DAX will spread the nodes across Availability Zones for the highest availability.</p>
26 pub availability_zones: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
27 /// <p>The name of the subnet group to be used for the replication group.</p><important>
28 /// <p>DAX clusters can only run in an Amazon VPC environment. All of the subnets that you specify in a subnet group must exist in the same VPC.</p>
29 /// </important>
30 pub subnet_group_name: ::std::option::Option<::std::string::String>,
31 /// <p>A list of security group IDs to be assigned to each node in the DAX cluster. (Each of the security group ID is system-generated.)</p>
32 /// <p>If this parameter is not specified, DAX assigns the default VPC security group to each node.</p>
33 pub security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
34 /// <p>Specifies the weekly time range during which maintenance on the DAX 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. Valid values for <code>ddd</code> are:</p>
35 /// <ul>
36 /// <li>
37 /// <p><code>sun</code></p></li>
38 /// <li>
39 /// <p><code>mon</code></p></li>
40 /// <li>
41 /// <p><code>tue</code></p></li>
42 /// <li>
43 /// <p><code>wed</code></p></li>
44 /// <li>
45 /// <p><code>thu</code></p></li>
46 /// <li>
47 /// <p><code>fri</code></p></li>
48 /// <li>
49 /// <p><code>sat</code></p></li>
50 /// </ul>
51 /// <p>Example: <code>sun:05:00-sun:09:00</code></p><note>
52 /// <p>If you don't specify a preferred maintenance window when you create or modify a cache cluster, DAX assigns a 60-minute maintenance window on a randomly selected day of the week.</p>
53 /// </note>
54 pub preferred_maintenance_window: ::std::option::Option<::std::string::String>,
55 /// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications will be sent.</p><note>
56 /// <p>The Amazon SNS topic owner must be same as the DAX cluster owner.</p>
57 /// </note>
58 pub notification_topic_arn: ::std::option::Option<::std::string::String>,
59 /// <p>A valid Amazon Resource Name (ARN) that identifies an IAM role. At runtime, DAX will assume this role and use the role's permissions to access DynamoDB on your behalf.</p>
60 pub iam_role_arn: ::std::option::Option<::std::string::String>,
61 /// <p>The parameter group to be associated with the DAX cluster.</p>
62 pub parameter_group_name: ::std::option::Option<::std::string::String>,
63 /// <p>A set of tags to associate with the DAX cluster.</p>
64 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
65 /// <p>Represents the settings used to enable server-side encryption on the cluster.</p>
66 pub sse_specification: ::std::option::Option<crate::types::SseSpecification>,
67 /// <p>The type of encryption the cluster's endpoint should support. Values are:</p>
68 /// <ul>
69 /// <li>
70 /// <p><code>NONE</code> for no encryption</p></li>
71 /// <li>
72 /// <p><code>TLS</code> for Transport Layer Security</p></li>
73 /// </ul>
74 pub cluster_endpoint_encryption_type: ::std::option::Option<crate::types::ClusterEndpointEncryptionType>,
75}
76impl CreateClusterInput {
77 /// <p>The cluster identifier. This parameter is stored as a lowercase string.</p>
78 /// <p><b>Constraints:</b></p>
79 /// <ul>
80 /// <li>
81 /// <p>A name must contain from 1 to 20 alphanumeric characters or hyphens.</p></li>
82 /// <li>
83 /// <p>The first character must be a letter.</p></li>
84 /// <li>
85 /// <p>A name cannot end with a hyphen or contain two consecutive hyphens.</p></li>
86 /// </ul>
87 pub fn cluster_name(&self) -> ::std::option::Option<&str> {
88 self.cluster_name.as_deref()
89 }
90 /// <p>The compute and memory capacity of the nodes in the cluster.</p>
91 pub fn node_type(&self) -> ::std::option::Option<&str> {
92 self.node_type.as_deref()
93 }
94 /// <p>A description of the cluster.</p>
95 pub fn description(&self) -> ::std::option::Option<&str> {
96 self.description.as_deref()
97 }
98 /// <p>The number of nodes in the DAX cluster. A replication factor of 1 will create a single-node cluster, without any read replicas. For additional fault tolerance, you can create a multiple node cluster with one or more read replicas. To do this, set <code>ReplicationFactor</code> to a number between 3 (one primary and two read replicas) and 10 (one primary and nine read replicas). <code>If the AvailabilityZones</code> parameter is provided, its length must equal the <code>ReplicationFactor</code>.</p><note>
99 /// <p>AWS recommends that you have at least two read replicas per cluster.</p>
100 /// </note>
101 pub fn replication_factor(&self) -> ::std::option::Option<i32> {
102 self.replication_factor
103 }
104 /// <p>The Availability Zones (AZs) in which the cluster nodes will reside after the cluster has been created or updated. If provided, the length of this list must equal the <code>ReplicationFactor</code> parameter. If you omit this parameter, DAX will spread the nodes across Availability Zones for the highest availability.</p>
105 ///
106 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.availability_zones.is_none()`.
107 pub fn availability_zones(&self) -> &[::std::string::String] {
108 self.availability_zones.as_deref().unwrap_or_default()
109 }
110 /// <p>The name of the subnet group to be used for the replication group.</p><important>
111 /// <p>DAX clusters can only run in an Amazon VPC environment. All of the subnets that you specify in a subnet group must exist in the same VPC.</p>
112 /// </important>
113 pub fn subnet_group_name(&self) -> ::std::option::Option<&str> {
114 self.subnet_group_name.as_deref()
115 }
116 /// <p>A list of security group IDs to be assigned to each node in the DAX cluster. (Each of the security group ID is system-generated.)</p>
117 /// <p>If this parameter is not specified, DAX assigns the default VPC security group to each node.</p>
118 ///
119 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.security_group_ids.is_none()`.
120 pub fn security_group_ids(&self) -> &[::std::string::String] {
121 self.security_group_ids.as_deref().unwrap_or_default()
122 }
123 /// <p>Specifies the weekly time range during which maintenance on the DAX 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. Valid values for <code>ddd</code> are:</p>
124 /// <ul>
125 /// <li>
126 /// <p><code>sun</code></p></li>
127 /// <li>
128 /// <p><code>mon</code></p></li>
129 /// <li>
130 /// <p><code>tue</code></p></li>
131 /// <li>
132 /// <p><code>wed</code></p></li>
133 /// <li>
134 /// <p><code>thu</code></p></li>
135 /// <li>
136 /// <p><code>fri</code></p></li>
137 /// <li>
138 /// <p><code>sat</code></p></li>
139 /// </ul>
140 /// <p>Example: <code>sun:05:00-sun:09:00</code></p><note>
141 /// <p>If you don't specify a preferred maintenance window when you create or modify a cache cluster, DAX assigns a 60-minute maintenance window on a randomly selected day of the week.</p>
142 /// </note>
143 pub fn preferred_maintenance_window(&self) -> ::std::option::Option<&str> {
144 self.preferred_maintenance_window.as_deref()
145 }
146 /// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications will be sent.</p><note>
147 /// <p>The Amazon SNS topic owner must be same as the DAX cluster owner.</p>
148 /// </note>
149 pub fn notification_topic_arn(&self) -> ::std::option::Option<&str> {
150 self.notification_topic_arn.as_deref()
151 }
152 /// <p>A valid Amazon Resource Name (ARN) that identifies an IAM role. At runtime, DAX will assume this role and use the role's permissions to access DynamoDB on your behalf.</p>
153 pub fn iam_role_arn(&self) -> ::std::option::Option<&str> {
154 self.iam_role_arn.as_deref()
155 }
156 /// <p>The parameter group to be associated with the DAX cluster.</p>
157 pub fn parameter_group_name(&self) -> ::std::option::Option<&str> {
158 self.parameter_group_name.as_deref()
159 }
160 /// <p>A set of tags to associate with the DAX cluster.</p>
161 ///
162 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
163 pub fn tags(&self) -> &[crate::types::Tag] {
164 self.tags.as_deref().unwrap_or_default()
165 }
166 /// <p>Represents the settings used to enable server-side encryption on the cluster.</p>
167 pub fn sse_specification(&self) -> ::std::option::Option<&crate::types::SseSpecification> {
168 self.sse_specification.as_ref()
169 }
170 /// <p>The type of encryption the cluster's endpoint should support. Values are:</p>
171 /// <ul>
172 /// <li>
173 /// <p><code>NONE</code> for no encryption</p></li>
174 /// <li>
175 /// <p><code>TLS</code> for Transport Layer Security</p></li>
176 /// </ul>
177 pub fn cluster_endpoint_encryption_type(&self) -> ::std::option::Option<&crate::types::ClusterEndpointEncryptionType> {
178 self.cluster_endpoint_encryption_type.as_ref()
179 }
180}
181impl CreateClusterInput {
182 /// Creates a new builder-style object to manufacture [`CreateClusterInput`](crate::operation::create_cluster::CreateClusterInput).
183 pub fn builder() -> crate::operation::create_cluster::builders::CreateClusterInputBuilder {
184 crate::operation::create_cluster::builders::CreateClusterInputBuilder::default()
185 }
186}
187
188/// A builder for [`CreateClusterInput`](crate::operation::create_cluster::CreateClusterInput).
189#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
190#[non_exhaustive]
191pub struct CreateClusterInputBuilder {
192 pub(crate) cluster_name: ::std::option::Option<::std::string::String>,
193 pub(crate) node_type: ::std::option::Option<::std::string::String>,
194 pub(crate) description: ::std::option::Option<::std::string::String>,
195 pub(crate) replication_factor: ::std::option::Option<i32>,
196 pub(crate) availability_zones: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
197 pub(crate) subnet_group_name: ::std::option::Option<::std::string::String>,
198 pub(crate) security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
199 pub(crate) preferred_maintenance_window: ::std::option::Option<::std::string::String>,
200 pub(crate) notification_topic_arn: ::std::option::Option<::std::string::String>,
201 pub(crate) iam_role_arn: ::std::option::Option<::std::string::String>,
202 pub(crate) parameter_group_name: ::std::option::Option<::std::string::String>,
203 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
204 pub(crate) sse_specification: ::std::option::Option<crate::types::SseSpecification>,
205 pub(crate) cluster_endpoint_encryption_type: ::std::option::Option<crate::types::ClusterEndpointEncryptionType>,
206}
207impl CreateClusterInputBuilder {
208 /// <p>The cluster identifier. This parameter is stored as a lowercase string.</p>
209 /// <p><b>Constraints:</b></p>
210 /// <ul>
211 /// <li>
212 /// <p>A name must contain from 1 to 20 alphanumeric characters or hyphens.</p></li>
213 /// <li>
214 /// <p>The first character must be a letter.</p></li>
215 /// <li>
216 /// <p>A name cannot end with a hyphen or contain two consecutive hyphens.</p></li>
217 /// </ul>
218 /// This field is required.
219 pub fn cluster_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
220 self.cluster_name = ::std::option::Option::Some(input.into());
221 self
222 }
223 /// <p>The cluster identifier. This parameter is stored as a lowercase string.</p>
224 /// <p><b>Constraints:</b></p>
225 /// <ul>
226 /// <li>
227 /// <p>A name must contain from 1 to 20 alphanumeric characters or hyphens.</p></li>
228 /// <li>
229 /// <p>The first character must be a letter.</p></li>
230 /// <li>
231 /// <p>A name cannot end with a hyphen or contain two consecutive hyphens.</p></li>
232 /// </ul>
233 pub fn set_cluster_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
234 self.cluster_name = input;
235 self
236 }
237 /// <p>The cluster identifier. This parameter is stored as a lowercase string.</p>
238 /// <p><b>Constraints:</b></p>
239 /// <ul>
240 /// <li>
241 /// <p>A name must contain from 1 to 20 alphanumeric characters or hyphens.</p></li>
242 /// <li>
243 /// <p>The first character must be a letter.</p></li>
244 /// <li>
245 /// <p>A name cannot end with a hyphen or contain two consecutive hyphens.</p></li>
246 /// </ul>
247 pub fn get_cluster_name(&self) -> &::std::option::Option<::std::string::String> {
248 &self.cluster_name
249 }
250 /// <p>The compute and memory capacity of the nodes in the cluster.</p>
251 /// This field is required.
252 pub fn node_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
253 self.node_type = ::std::option::Option::Some(input.into());
254 self
255 }
256 /// <p>The compute and memory capacity of the nodes in the cluster.</p>
257 pub fn set_node_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
258 self.node_type = input;
259 self
260 }
261 /// <p>The compute and memory capacity of the nodes in the cluster.</p>
262 pub fn get_node_type(&self) -> &::std::option::Option<::std::string::String> {
263 &self.node_type
264 }
265 /// <p>A description of the cluster.</p>
266 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
267 self.description = ::std::option::Option::Some(input.into());
268 self
269 }
270 /// <p>A description of the cluster.</p>
271 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
272 self.description = input;
273 self
274 }
275 /// <p>A description of the cluster.</p>
276 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
277 &self.description
278 }
279 /// <p>The number of nodes in the DAX cluster. A replication factor of 1 will create a single-node cluster, without any read replicas. For additional fault tolerance, you can create a multiple node cluster with one or more read replicas. To do this, set <code>ReplicationFactor</code> to a number between 3 (one primary and two read replicas) and 10 (one primary and nine read replicas). <code>If the AvailabilityZones</code> parameter is provided, its length must equal the <code>ReplicationFactor</code>.</p><note>
280 /// <p>AWS recommends that you have at least two read replicas per cluster.</p>
281 /// </note>
282 /// This field is required.
283 pub fn replication_factor(mut self, input: i32) -> Self {
284 self.replication_factor = ::std::option::Option::Some(input);
285 self
286 }
287 /// <p>The number of nodes in the DAX cluster. A replication factor of 1 will create a single-node cluster, without any read replicas. For additional fault tolerance, you can create a multiple node cluster with one or more read replicas. To do this, set <code>ReplicationFactor</code> to a number between 3 (one primary and two read replicas) and 10 (one primary and nine read replicas). <code>If the AvailabilityZones</code> parameter is provided, its length must equal the <code>ReplicationFactor</code>.</p><note>
288 /// <p>AWS recommends that you have at least two read replicas per cluster.</p>
289 /// </note>
290 pub fn set_replication_factor(mut self, input: ::std::option::Option<i32>) -> Self {
291 self.replication_factor = input;
292 self
293 }
294 /// <p>The number of nodes in the DAX cluster. A replication factor of 1 will create a single-node cluster, without any read replicas. For additional fault tolerance, you can create a multiple node cluster with one or more read replicas. To do this, set <code>ReplicationFactor</code> to a number between 3 (one primary and two read replicas) and 10 (one primary and nine read replicas). <code>If the AvailabilityZones</code> parameter is provided, its length must equal the <code>ReplicationFactor</code>.</p><note>
295 /// <p>AWS recommends that you have at least two read replicas per cluster.</p>
296 /// </note>
297 pub fn get_replication_factor(&self) -> &::std::option::Option<i32> {
298 &self.replication_factor
299 }
300 /// Appends an item to `availability_zones`.
301 ///
302 /// To override the contents of this collection use [`set_availability_zones`](Self::set_availability_zones).
303 ///
304 /// <p>The Availability Zones (AZs) in which the cluster nodes will reside after the cluster has been created or updated. If provided, the length of this list must equal the <code>ReplicationFactor</code> parameter. If you omit this parameter, DAX will spread the nodes across Availability Zones for the highest availability.</p>
305 pub fn availability_zones(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
306 let mut v = self.availability_zones.unwrap_or_default();
307 v.push(input.into());
308 self.availability_zones = ::std::option::Option::Some(v);
309 self
310 }
311 /// <p>The Availability Zones (AZs) in which the cluster nodes will reside after the cluster has been created or updated. If provided, the length of this list must equal the <code>ReplicationFactor</code> parameter. If you omit this parameter, DAX will spread the nodes across Availability Zones for the highest availability.</p>
312 pub fn set_availability_zones(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
313 self.availability_zones = input;
314 self
315 }
316 /// <p>The Availability Zones (AZs) in which the cluster nodes will reside after the cluster has been created or updated. If provided, the length of this list must equal the <code>ReplicationFactor</code> parameter. If you omit this parameter, DAX will spread the nodes across Availability Zones for the highest availability.</p>
317 pub fn get_availability_zones(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
318 &self.availability_zones
319 }
320 /// <p>The name of the subnet group to be used for the replication group.</p><important>
321 /// <p>DAX clusters can only run in an Amazon VPC environment. All of the subnets that you specify in a subnet group must exist in the same VPC.</p>
322 /// </important>
323 pub fn subnet_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
324 self.subnet_group_name = ::std::option::Option::Some(input.into());
325 self
326 }
327 /// <p>The name of the subnet group to be used for the replication group.</p><important>
328 /// <p>DAX clusters can only run in an Amazon VPC environment. All of the subnets that you specify in a subnet group must exist in the same VPC.</p>
329 /// </important>
330 pub fn set_subnet_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
331 self.subnet_group_name = input;
332 self
333 }
334 /// <p>The name of the subnet group to be used for the replication group.</p><important>
335 /// <p>DAX clusters can only run in an Amazon VPC environment. All of the subnets that you specify in a subnet group must exist in the same VPC.</p>
336 /// </important>
337 pub fn get_subnet_group_name(&self) -> &::std::option::Option<::std::string::String> {
338 &self.subnet_group_name
339 }
340 /// Appends an item to `security_group_ids`.
341 ///
342 /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
343 ///
344 /// <p>A list of security group IDs to be assigned to each node in the DAX cluster. (Each of the security group ID is system-generated.)</p>
345 /// <p>If this parameter is not specified, DAX assigns the default VPC security group to each node.</p>
346 pub fn security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
347 let mut v = self.security_group_ids.unwrap_or_default();
348 v.push(input.into());
349 self.security_group_ids = ::std::option::Option::Some(v);
350 self
351 }
352 /// <p>A list of security group IDs to be assigned to each node in the DAX cluster. (Each of the security group ID is system-generated.)</p>
353 /// <p>If this parameter is not specified, DAX assigns the default VPC security group to each node.</p>
354 pub fn set_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
355 self.security_group_ids = input;
356 self
357 }
358 /// <p>A list of security group IDs to be assigned to each node in the DAX cluster. (Each of the security group ID is system-generated.)</p>
359 /// <p>If this parameter is not specified, DAX assigns the default VPC security group to each node.</p>
360 pub fn get_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
361 &self.security_group_ids
362 }
363 /// <p>Specifies the weekly time range during which maintenance on the DAX 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. Valid values for <code>ddd</code> are:</p>
364 /// <ul>
365 /// <li>
366 /// <p><code>sun</code></p></li>
367 /// <li>
368 /// <p><code>mon</code></p></li>
369 /// <li>
370 /// <p><code>tue</code></p></li>
371 /// <li>
372 /// <p><code>wed</code></p></li>
373 /// <li>
374 /// <p><code>thu</code></p></li>
375 /// <li>
376 /// <p><code>fri</code></p></li>
377 /// <li>
378 /// <p><code>sat</code></p></li>
379 /// </ul>
380 /// <p>Example: <code>sun:05:00-sun:09:00</code></p><note>
381 /// <p>If you don't specify a preferred maintenance window when you create or modify a cache cluster, DAX assigns a 60-minute maintenance window on a randomly selected day of the week.</p>
382 /// </note>
383 pub fn preferred_maintenance_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
384 self.preferred_maintenance_window = ::std::option::Option::Some(input.into());
385 self
386 }
387 /// <p>Specifies the weekly time range during which maintenance on the DAX 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. Valid values for <code>ddd</code> are:</p>
388 /// <ul>
389 /// <li>
390 /// <p><code>sun</code></p></li>
391 /// <li>
392 /// <p><code>mon</code></p></li>
393 /// <li>
394 /// <p><code>tue</code></p></li>
395 /// <li>
396 /// <p><code>wed</code></p></li>
397 /// <li>
398 /// <p><code>thu</code></p></li>
399 /// <li>
400 /// <p><code>fri</code></p></li>
401 /// <li>
402 /// <p><code>sat</code></p></li>
403 /// </ul>
404 /// <p>Example: <code>sun:05:00-sun:09:00</code></p><note>
405 /// <p>If you don't specify a preferred maintenance window when you create or modify a cache cluster, DAX assigns a 60-minute maintenance window on a randomly selected day of the week.</p>
406 /// </note>
407 pub fn set_preferred_maintenance_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
408 self.preferred_maintenance_window = input;
409 self
410 }
411 /// <p>Specifies the weekly time range during which maintenance on the DAX 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. Valid values for <code>ddd</code> are:</p>
412 /// <ul>
413 /// <li>
414 /// <p><code>sun</code></p></li>
415 /// <li>
416 /// <p><code>mon</code></p></li>
417 /// <li>
418 /// <p><code>tue</code></p></li>
419 /// <li>
420 /// <p><code>wed</code></p></li>
421 /// <li>
422 /// <p><code>thu</code></p></li>
423 /// <li>
424 /// <p><code>fri</code></p></li>
425 /// <li>
426 /// <p><code>sat</code></p></li>
427 /// </ul>
428 /// <p>Example: <code>sun:05:00-sun:09:00</code></p><note>
429 /// <p>If you don't specify a preferred maintenance window when you create or modify a cache cluster, DAX assigns a 60-minute maintenance window on a randomly selected day of the week.</p>
430 /// </note>
431 pub fn get_preferred_maintenance_window(&self) -> &::std::option::Option<::std::string::String> {
432 &self.preferred_maintenance_window
433 }
434 /// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications will be sent.</p><note>
435 /// <p>The Amazon SNS topic owner must be same as the DAX cluster owner.</p>
436 /// </note>
437 pub fn notification_topic_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
438 self.notification_topic_arn = ::std::option::Option::Some(input.into());
439 self
440 }
441 /// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications will be sent.</p><note>
442 /// <p>The Amazon SNS topic owner must be same as the DAX cluster owner.</p>
443 /// </note>
444 pub fn set_notification_topic_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
445 self.notification_topic_arn = input;
446 self
447 }
448 /// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications will be sent.</p><note>
449 /// <p>The Amazon SNS topic owner must be same as the DAX cluster owner.</p>
450 /// </note>
451 pub fn get_notification_topic_arn(&self) -> &::std::option::Option<::std::string::String> {
452 &self.notification_topic_arn
453 }
454 /// <p>A valid Amazon Resource Name (ARN) that identifies an IAM role. At runtime, DAX will assume this role and use the role's permissions to access DynamoDB on your behalf.</p>
455 /// This field is required.
456 pub fn iam_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
457 self.iam_role_arn = ::std::option::Option::Some(input.into());
458 self
459 }
460 /// <p>A valid Amazon Resource Name (ARN) that identifies an IAM role. At runtime, DAX will assume this role and use the role's permissions to access DynamoDB on your behalf.</p>
461 pub fn set_iam_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
462 self.iam_role_arn = input;
463 self
464 }
465 /// <p>A valid Amazon Resource Name (ARN) that identifies an IAM role. At runtime, DAX will assume this role and use the role's permissions to access DynamoDB on your behalf.</p>
466 pub fn get_iam_role_arn(&self) -> &::std::option::Option<::std::string::String> {
467 &self.iam_role_arn
468 }
469 /// <p>The parameter group to be associated with the DAX cluster.</p>
470 pub fn parameter_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
471 self.parameter_group_name = ::std::option::Option::Some(input.into());
472 self
473 }
474 /// <p>The parameter group to be associated with the DAX cluster.</p>
475 pub fn set_parameter_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
476 self.parameter_group_name = input;
477 self
478 }
479 /// <p>The parameter group to be associated with the DAX cluster.</p>
480 pub fn get_parameter_group_name(&self) -> &::std::option::Option<::std::string::String> {
481 &self.parameter_group_name
482 }
483 /// Appends an item to `tags`.
484 ///
485 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
486 ///
487 /// <p>A set of tags to associate with the DAX cluster.</p>
488 pub fn tags(mut self, input: crate::types::Tag) -> Self {
489 let mut v = self.tags.unwrap_or_default();
490 v.push(input);
491 self.tags = ::std::option::Option::Some(v);
492 self
493 }
494 /// <p>A set of tags to associate with the DAX cluster.</p>
495 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
496 self.tags = input;
497 self
498 }
499 /// <p>A set of tags to associate with the DAX cluster.</p>
500 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
501 &self.tags
502 }
503 /// <p>Represents the settings used to enable server-side encryption on the cluster.</p>
504 pub fn sse_specification(mut self, input: crate::types::SseSpecification) -> Self {
505 self.sse_specification = ::std::option::Option::Some(input);
506 self
507 }
508 /// <p>Represents the settings used to enable server-side encryption on the cluster.</p>
509 pub fn set_sse_specification(mut self, input: ::std::option::Option<crate::types::SseSpecification>) -> Self {
510 self.sse_specification = input;
511 self
512 }
513 /// <p>Represents the settings used to enable server-side encryption on the cluster.</p>
514 pub fn get_sse_specification(&self) -> &::std::option::Option<crate::types::SseSpecification> {
515 &self.sse_specification
516 }
517 /// <p>The type of encryption the cluster's endpoint should support. Values are:</p>
518 /// <ul>
519 /// <li>
520 /// <p><code>NONE</code> for no encryption</p></li>
521 /// <li>
522 /// <p><code>TLS</code> for Transport Layer Security</p></li>
523 /// </ul>
524 pub fn cluster_endpoint_encryption_type(mut self, input: crate::types::ClusterEndpointEncryptionType) -> Self {
525 self.cluster_endpoint_encryption_type = ::std::option::Option::Some(input);
526 self
527 }
528 /// <p>The type of encryption the cluster's endpoint should support. Values are:</p>
529 /// <ul>
530 /// <li>
531 /// <p><code>NONE</code> for no encryption</p></li>
532 /// <li>
533 /// <p><code>TLS</code> for Transport Layer Security</p></li>
534 /// </ul>
535 pub fn set_cluster_endpoint_encryption_type(mut self, input: ::std::option::Option<crate::types::ClusterEndpointEncryptionType>) -> Self {
536 self.cluster_endpoint_encryption_type = input;
537 self
538 }
539 /// <p>The type of encryption the cluster's endpoint should support. Values are:</p>
540 /// <ul>
541 /// <li>
542 /// <p><code>NONE</code> for no encryption</p></li>
543 /// <li>
544 /// <p><code>TLS</code> for Transport Layer Security</p></li>
545 /// </ul>
546 pub fn get_cluster_endpoint_encryption_type(&self) -> &::std::option::Option<crate::types::ClusterEndpointEncryptionType> {
547 &self.cluster_endpoint_encryption_type
548 }
549 /// Consumes the builder and constructs a [`CreateClusterInput`](crate::operation::create_cluster::CreateClusterInput).
550 pub fn build(
551 self,
552 ) -> ::std::result::Result<crate::operation::create_cluster::CreateClusterInput, ::aws_smithy_types::error::operation::BuildError> {
553 ::std::result::Result::Ok(crate::operation::create_cluster::CreateClusterInput {
554 cluster_name: self.cluster_name,
555 node_type: self.node_type,
556 description: self.description,
557 replication_factor: self.replication_factor,
558 availability_zones: self.availability_zones,
559 subnet_group_name: self.subnet_group_name,
560 security_group_ids: self.security_group_ids,
561 preferred_maintenance_window: self.preferred_maintenance_window,
562 notification_topic_arn: self.notification_topic_arn,
563 iam_role_arn: self.iam_role_arn,
564 parameter_group_name: self.parameter_group_name,
565 tags: self.tags,
566 sse_specification: self.sse_specification,
567 cluster_endpoint_encryption_type: self.cluster_endpoint_encryption_type,
568 })
569 }
570}