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>Amazon Web Services 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 /// <p>Specifies the IP protocol(s) the cluster uses for network communications. Values are:</p>
76 /// <ul>
77 /// <li>
78 /// <p><code>ipv4</code> - The cluster is accessible only through IPv4 addresses</p></li>
79 /// <li>
80 /// <p><code>ipv6</code> - The cluster is accessible only through IPv6 addresses</p></li>
81 /// <li>
82 /// <p><code>dual_stack</code> - The cluster is accessible through both IPv4 and IPv6 addresses.</p></li>
83 /// </ul><note>
84 /// <p>If no explicit <code>NetworkType</code> is provided, the network type is derived based on the subnet group's configuration.</p>
85 /// </note>
86 pub network_type: ::std::option::Option<crate::types::NetworkType>,
87}
88impl CreateClusterInput {
89 /// <p>The cluster identifier. This parameter is stored as a lowercase string.</p>
90 /// <p><b>Constraints:</b></p>
91 /// <ul>
92 /// <li>
93 /// <p>A name must contain from 1 to 20 alphanumeric characters or hyphens.</p></li>
94 /// <li>
95 /// <p>The first character must be a letter.</p></li>
96 /// <li>
97 /// <p>A name cannot end with a hyphen or contain two consecutive hyphens.</p></li>
98 /// </ul>
99 pub fn cluster_name(&self) -> ::std::option::Option<&str> {
100 self.cluster_name.as_deref()
101 }
102 /// <p>The compute and memory capacity of the nodes in the cluster.</p>
103 pub fn node_type(&self) -> ::std::option::Option<&str> {
104 self.node_type.as_deref()
105 }
106 /// <p>A description of the cluster.</p>
107 pub fn description(&self) -> ::std::option::Option<&str> {
108 self.description.as_deref()
109 }
110 /// <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>
111 /// <p>Amazon Web Services recommends that you have at least two read replicas per cluster.</p>
112 /// </note>
113 pub fn replication_factor(&self) -> ::std::option::Option<i32> {
114 self.replication_factor
115 }
116 /// <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>
117 ///
118 /// 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()`.
119 pub fn availability_zones(&self) -> &[::std::string::String] {
120 self.availability_zones.as_deref().unwrap_or_default()
121 }
122 /// <p>The name of the subnet group to be used for the replication group.</p><important>
123 /// <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>
124 /// </important>
125 pub fn subnet_group_name(&self) -> ::std::option::Option<&str> {
126 self.subnet_group_name.as_deref()
127 }
128 /// <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>
129 /// <p>If this parameter is not specified, DAX assigns the default VPC security group to each node.</p>
130 ///
131 /// 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()`.
132 pub fn security_group_ids(&self) -> &[::std::string::String] {
133 self.security_group_ids.as_deref().unwrap_or_default()
134 }
135 /// <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>
136 /// <ul>
137 /// <li>
138 /// <p><code>sun</code></p></li>
139 /// <li>
140 /// <p><code>mon</code></p></li>
141 /// <li>
142 /// <p><code>tue</code></p></li>
143 /// <li>
144 /// <p><code>wed</code></p></li>
145 /// <li>
146 /// <p><code>thu</code></p></li>
147 /// <li>
148 /// <p><code>fri</code></p></li>
149 /// <li>
150 /// <p><code>sat</code></p></li>
151 /// </ul>
152 /// <p>Example: <code>sun:05:00-sun:09:00</code></p><note>
153 /// <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>
154 /// </note>
155 pub fn preferred_maintenance_window(&self) -> ::std::option::Option<&str> {
156 self.preferred_maintenance_window.as_deref()
157 }
158 /// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications will be sent.</p><note>
159 /// <p>The Amazon SNS topic owner must be same as the DAX cluster owner.</p>
160 /// </note>
161 pub fn notification_topic_arn(&self) -> ::std::option::Option<&str> {
162 self.notification_topic_arn.as_deref()
163 }
164 /// <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>
165 pub fn iam_role_arn(&self) -> ::std::option::Option<&str> {
166 self.iam_role_arn.as_deref()
167 }
168 /// <p>The parameter group to be associated with the DAX cluster.</p>
169 pub fn parameter_group_name(&self) -> ::std::option::Option<&str> {
170 self.parameter_group_name.as_deref()
171 }
172 /// <p>A set of tags to associate with the DAX cluster.</p>
173 ///
174 /// 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()`.
175 pub fn tags(&self) -> &[crate::types::Tag] {
176 self.tags.as_deref().unwrap_or_default()
177 }
178 /// <p>Represents the settings used to enable server-side encryption on the cluster.</p>
179 pub fn sse_specification(&self) -> ::std::option::Option<&crate::types::SseSpecification> {
180 self.sse_specification.as_ref()
181 }
182 /// <p>The type of encryption the cluster's endpoint should support. Values are:</p>
183 /// <ul>
184 /// <li>
185 /// <p><code>NONE</code> for no encryption</p></li>
186 /// <li>
187 /// <p><code>TLS</code> for Transport Layer Security</p></li>
188 /// </ul>
189 pub fn cluster_endpoint_encryption_type(&self) -> ::std::option::Option<&crate::types::ClusterEndpointEncryptionType> {
190 self.cluster_endpoint_encryption_type.as_ref()
191 }
192 /// <p>Specifies the IP protocol(s) the cluster uses for network communications. Values are:</p>
193 /// <ul>
194 /// <li>
195 /// <p><code>ipv4</code> - The cluster is accessible only through IPv4 addresses</p></li>
196 /// <li>
197 /// <p><code>ipv6</code> - The cluster is accessible only through IPv6 addresses</p></li>
198 /// <li>
199 /// <p><code>dual_stack</code> - The cluster is accessible through both IPv4 and IPv6 addresses.</p></li>
200 /// </ul><note>
201 /// <p>If no explicit <code>NetworkType</code> is provided, the network type is derived based on the subnet group's configuration.</p>
202 /// </note>
203 pub fn network_type(&self) -> ::std::option::Option<&crate::types::NetworkType> {
204 self.network_type.as_ref()
205 }
206}
207impl CreateClusterInput {
208 /// Creates a new builder-style object to manufacture [`CreateClusterInput`](crate::operation::create_cluster::CreateClusterInput).
209 pub fn builder() -> crate::operation::create_cluster::builders::CreateClusterInputBuilder {
210 crate::operation::create_cluster::builders::CreateClusterInputBuilder::default()
211 }
212}
213
214/// A builder for [`CreateClusterInput`](crate::operation::create_cluster::CreateClusterInput).
215#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
216#[non_exhaustive]
217pub struct CreateClusterInputBuilder {
218 pub(crate) cluster_name: ::std::option::Option<::std::string::String>,
219 pub(crate) node_type: ::std::option::Option<::std::string::String>,
220 pub(crate) description: ::std::option::Option<::std::string::String>,
221 pub(crate) replication_factor: ::std::option::Option<i32>,
222 pub(crate) availability_zones: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
223 pub(crate) subnet_group_name: ::std::option::Option<::std::string::String>,
224 pub(crate) security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
225 pub(crate) preferred_maintenance_window: ::std::option::Option<::std::string::String>,
226 pub(crate) notification_topic_arn: ::std::option::Option<::std::string::String>,
227 pub(crate) iam_role_arn: ::std::option::Option<::std::string::String>,
228 pub(crate) parameter_group_name: ::std::option::Option<::std::string::String>,
229 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
230 pub(crate) sse_specification: ::std::option::Option<crate::types::SseSpecification>,
231 pub(crate) cluster_endpoint_encryption_type: ::std::option::Option<crate::types::ClusterEndpointEncryptionType>,
232 pub(crate) network_type: ::std::option::Option<crate::types::NetworkType>,
233}
234impl CreateClusterInputBuilder {
235 /// <p>The cluster identifier. This parameter is stored as a lowercase string.</p>
236 /// <p><b>Constraints:</b></p>
237 /// <ul>
238 /// <li>
239 /// <p>A name must contain from 1 to 20 alphanumeric characters or hyphens.</p></li>
240 /// <li>
241 /// <p>The first character must be a letter.</p></li>
242 /// <li>
243 /// <p>A name cannot end with a hyphen or contain two consecutive hyphens.</p></li>
244 /// </ul>
245 /// This field is required.
246 pub fn cluster_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
247 self.cluster_name = ::std::option::Option::Some(input.into());
248 self
249 }
250 /// <p>The cluster identifier. This parameter is stored as a lowercase string.</p>
251 /// <p><b>Constraints:</b></p>
252 /// <ul>
253 /// <li>
254 /// <p>A name must contain from 1 to 20 alphanumeric characters or hyphens.</p></li>
255 /// <li>
256 /// <p>The first character must be a letter.</p></li>
257 /// <li>
258 /// <p>A name cannot end with a hyphen or contain two consecutive hyphens.</p></li>
259 /// </ul>
260 pub fn set_cluster_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
261 self.cluster_name = input;
262 self
263 }
264 /// <p>The cluster identifier. This parameter is stored as a lowercase string.</p>
265 /// <p><b>Constraints:</b></p>
266 /// <ul>
267 /// <li>
268 /// <p>A name must contain from 1 to 20 alphanumeric characters or hyphens.</p></li>
269 /// <li>
270 /// <p>The first character must be a letter.</p></li>
271 /// <li>
272 /// <p>A name cannot end with a hyphen or contain two consecutive hyphens.</p></li>
273 /// </ul>
274 pub fn get_cluster_name(&self) -> &::std::option::Option<::std::string::String> {
275 &self.cluster_name
276 }
277 /// <p>The compute and memory capacity of the nodes in the cluster.</p>
278 /// This field is required.
279 pub fn node_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
280 self.node_type = ::std::option::Option::Some(input.into());
281 self
282 }
283 /// <p>The compute and memory capacity of the nodes in the cluster.</p>
284 pub fn set_node_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
285 self.node_type = input;
286 self
287 }
288 /// <p>The compute and memory capacity of the nodes in the cluster.</p>
289 pub fn get_node_type(&self) -> &::std::option::Option<::std::string::String> {
290 &self.node_type
291 }
292 /// <p>A description of the cluster.</p>
293 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
294 self.description = ::std::option::Option::Some(input.into());
295 self
296 }
297 /// <p>A description of the cluster.</p>
298 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
299 self.description = input;
300 self
301 }
302 /// <p>A description of the cluster.</p>
303 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
304 &self.description
305 }
306 /// <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>
307 /// <p>Amazon Web Services recommends that you have at least two read replicas per cluster.</p>
308 /// </note>
309 /// This field is required.
310 pub fn replication_factor(mut self, input: i32) -> Self {
311 self.replication_factor = ::std::option::Option::Some(input);
312 self
313 }
314 /// <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>
315 /// <p>Amazon Web Services recommends that you have at least two read replicas per cluster.</p>
316 /// </note>
317 pub fn set_replication_factor(mut self, input: ::std::option::Option<i32>) -> Self {
318 self.replication_factor = input;
319 self
320 }
321 /// <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>
322 /// <p>Amazon Web Services recommends that you have at least two read replicas per cluster.</p>
323 /// </note>
324 pub fn get_replication_factor(&self) -> &::std::option::Option<i32> {
325 &self.replication_factor
326 }
327 /// Appends an item to `availability_zones`.
328 ///
329 /// To override the contents of this collection use [`set_availability_zones`](Self::set_availability_zones).
330 ///
331 /// <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>
332 pub fn availability_zones(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
333 let mut v = self.availability_zones.unwrap_or_default();
334 v.push(input.into());
335 self.availability_zones = ::std::option::Option::Some(v);
336 self
337 }
338 /// <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>
339 pub fn set_availability_zones(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
340 self.availability_zones = input;
341 self
342 }
343 /// <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>
344 pub fn get_availability_zones(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
345 &self.availability_zones
346 }
347 /// <p>The name of the subnet group to be used for the replication group.</p><important>
348 /// <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>
349 /// </important>
350 pub fn subnet_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
351 self.subnet_group_name = ::std::option::Option::Some(input.into());
352 self
353 }
354 /// <p>The name of the subnet group to be used for the replication group.</p><important>
355 /// <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>
356 /// </important>
357 pub fn set_subnet_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
358 self.subnet_group_name = input;
359 self
360 }
361 /// <p>The name of the subnet group to be used for the replication group.</p><important>
362 /// <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>
363 /// </important>
364 pub fn get_subnet_group_name(&self) -> &::std::option::Option<::std::string::String> {
365 &self.subnet_group_name
366 }
367 /// Appends an item to `security_group_ids`.
368 ///
369 /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
370 ///
371 /// <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>
372 /// <p>If this parameter is not specified, DAX assigns the default VPC security group to each node.</p>
373 pub fn security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
374 let mut v = self.security_group_ids.unwrap_or_default();
375 v.push(input.into());
376 self.security_group_ids = ::std::option::Option::Some(v);
377 self
378 }
379 /// <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>
380 /// <p>If this parameter is not specified, DAX assigns the default VPC security group to each node.</p>
381 pub fn set_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
382 self.security_group_ids = input;
383 self
384 }
385 /// <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>
386 /// <p>If this parameter is not specified, DAX assigns the default VPC security group to each node.</p>
387 pub fn get_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
388 &self.security_group_ids
389 }
390 /// <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>
391 /// <ul>
392 /// <li>
393 /// <p><code>sun</code></p></li>
394 /// <li>
395 /// <p><code>mon</code></p></li>
396 /// <li>
397 /// <p><code>tue</code></p></li>
398 /// <li>
399 /// <p><code>wed</code></p></li>
400 /// <li>
401 /// <p><code>thu</code></p></li>
402 /// <li>
403 /// <p><code>fri</code></p></li>
404 /// <li>
405 /// <p><code>sat</code></p></li>
406 /// </ul>
407 /// <p>Example: <code>sun:05:00-sun:09:00</code></p><note>
408 /// <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>
409 /// </note>
410 pub fn preferred_maintenance_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
411 self.preferred_maintenance_window = ::std::option::Option::Some(input.into());
412 self
413 }
414 /// <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>
415 /// <ul>
416 /// <li>
417 /// <p><code>sun</code></p></li>
418 /// <li>
419 /// <p><code>mon</code></p></li>
420 /// <li>
421 /// <p><code>tue</code></p></li>
422 /// <li>
423 /// <p><code>wed</code></p></li>
424 /// <li>
425 /// <p><code>thu</code></p></li>
426 /// <li>
427 /// <p><code>fri</code></p></li>
428 /// <li>
429 /// <p><code>sat</code></p></li>
430 /// </ul>
431 /// <p>Example: <code>sun:05:00-sun:09:00</code></p><note>
432 /// <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>
433 /// </note>
434 pub fn set_preferred_maintenance_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
435 self.preferred_maintenance_window = input;
436 self
437 }
438 /// <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>
439 /// <ul>
440 /// <li>
441 /// <p><code>sun</code></p></li>
442 /// <li>
443 /// <p><code>mon</code></p></li>
444 /// <li>
445 /// <p><code>tue</code></p></li>
446 /// <li>
447 /// <p><code>wed</code></p></li>
448 /// <li>
449 /// <p><code>thu</code></p></li>
450 /// <li>
451 /// <p><code>fri</code></p></li>
452 /// <li>
453 /// <p><code>sat</code></p></li>
454 /// </ul>
455 /// <p>Example: <code>sun:05:00-sun:09:00</code></p><note>
456 /// <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>
457 /// </note>
458 pub fn get_preferred_maintenance_window(&self) -> &::std::option::Option<::std::string::String> {
459 &self.preferred_maintenance_window
460 }
461 /// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications will be sent.</p><note>
462 /// <p>The Amazon SNS topic owner must be same as the DAX cluster owner.</p>
463 /// </note>
464 pub fn notification_topic_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
465 self.notification_topic_arn = ::std::option::Option::Some(input.into());
466 self
467 }
468 /// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications will be sent.</p><note>
469 /// <p>The Amazon SNS topic owner must be same as the DAX cluster owner.</p>
470 /// </note>
471 pub fn set_notification_topic_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
472 self.notification_topic_arn = input;
473 self
474 }
475 /// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications will be sent.</p><note>
476 /// <p>The Amazon SNS topic owner must be same as the DAX cluster owner.</p>
477 /// </note>
478 pub fn get_notification_topic_arn(&self) -> &::std::option::Option<::std::string::String> {
479 &self.notification_topic_arn
480 }
481 /// <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>
482 /// This field is required.
483 pub fn iam_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
484 self.iam_role_arn = ::std::option::Option::Some(input.into());
485 self
486 }
487 /// <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>
488 pub fn set_iam_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
489 self.iam_role_arn = input;
490 self
491 }
492 /// <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>
493 pub fn get_iam_role_arn(&self) -> &::std::option::Option<::std::string::String> {
494 &self.iam_role_arn
495 }
496 /// <p>The parameter group to be associated with the DAX cluster.</p>
497 pub fn parameter_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
498 self.parameter_group_name = ::std::option::Option::Some(input.into());
499 self
500 }
501 /// <p>The parameter group to be associated with the DAX cluster.</p>
502 pub fn set_parameter_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
503 self.parameter_group_name = input;
504 self
505 }
506 /// <p>The parameter group to be associated with the DAX cluster.</p>
507 pub fn get_parameter_group_name(&self) -> &::std::option::Option<::std::string::String> {
508 &self.parameter_group_name
509 }
510 /// Appends an item to `tags`.
511 ///
512 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
513 ///
514 /// <p>A set of tags to associate with the DAX cluster.</p>
515 pub fn tags(mut self, input: crate::types::Tag) -> Self {
516 let mut v = self.tags.unwrap_or_default();
517 v.push(input);
518 self.tags = ::std::option::Option::Some(v);
519 self
520 }
521 /// <p>A set of tags to associate with the DAX cluster.</p>
522 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
523 self.tags = input;
524 self
525 }
526 /// <p>A set of tags to associate with the DAX cluster.</p>
527 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
528 &self.tags
529 }
530 /// <p>Represents the settings used to enable server-side encryption on the cluster.</p>
531 pub fn sse_specification(mut self, input: crate::types::SseSpecification) -> Self {
532 self.sse_specification = ::std::option::Option::Some(input);
533 self
534 }
535 /// <p>Represents the settings used to enable server-side encryption on the cluster.</p>
536 pub fn set_sse_specification(mut self, input: ::std::option::Option<crate::types::SseSpecification>) -> Self {
537 self.sse_specification = input;
538 self
539 }
540 /// <p>Represents the settings used to enable server-side encryption on the cluster.</p>
541 pub fn get_sse_specification(&self) -> &::std::option::Option<crate::types::SseSpecification> {
542 &self.sse_specification
543 }
544 /// <p>The type of encryption the cluster's endpoint should support. Values are:</p>
545 /// <ul>
546 /// <li>
547 /// <p><code>NONE</code> for no encryption</p></li>
548 /// <li>
549 /// <p><code>TLS</code> for Transport Layer Security</p></li>
550 /// </ul>
551 pub fn cluster_endpoint_encryption_type(mut self, input: crate::types::ClusterEndpointEncryptionType) -> Self {
552 self.cluster_endpoint_encryption_type = ::std::option::Option::Some(input);
553 self
554 }
555 /// <p>The type of encryption the cluster's endpoint should support. Values are:</p>
556 /// <ul>
557 /// <li>
558 /// <p><code>NONE</code> for no encryption</p></li>
559 /// <li>
560 /// <p><code>TLS</code> for Transport Layer Security</p></li>
561 /// </ul>
562 pub fn set_cluster_endpoint_encryption_type(mut self, input: ::std::option::Option<crate::types::ClusterEndpointEncryptionType>) -> Self {
563 self.cluster_endpoint_encryption_type = input;
564 self
565 }
566 /// <p>The type of encryption the cluster's endpoint should support. Values are:</p>
567 /// <ul>
568 /// <li>
569 /// <p><code>NONE</code> for no encryption</p></li>
570 /// <li>
571 /// <p><code>TLS</code> for Transport Layer Security</p></li>
572 /// </ul>
573 pub fn get_cluster_endpoint_encryption_type(&self) -> &::std::option::Option<crate::types::ClusterEndpointEncryptionType> {
574 &self.cluster_endpoint_encryption_type
575 }
576 /// <p>Specifies the IP protocol(s) the cluster uses for network communications. Values are:</p>
577 /// <ul>
578 /// <li>
579 /// <p><code>ipv4</code> - The cluster is accessible only through IPv4 addresses</p></li>
580 /// <li>
581 /// <p><code>ipv6</code> - The cluster is accessible only through IPv6 addresses</p></li>
582 /// <li>
583 /// <p><code>dual_stack</code> - The cluster is accessible through both IPv4 and IPv6 addresses.</p></li>
584 /// </ul><note>
585 /// <p>If no explicit <code>NetworkType</code> is provided, the network type is derived based on the subnet group's configuration.</p>
586 /// </note>
587 pub fn network_type(mut self, input: crate::types::NetworkType) -> Self {
588 self.network_type = ::std::option::Option::Some(input);
589 self
590 }
591 /// <p>Specifies the IP protocol(s) the cluster uses for network communications. Values are:</p>
592 /// <ul>
593 /// <li>
594 /// <p><code>ipv4</code> - The cluster is accessible only through IPv4 addresses</p></li>
595 /// <li>
596 /// <p><code>ipv6</code> - The cluster is accessible only through IPv6 addresses</p></li>
597 /// <li>
598 /// <p><code>dual_stack</code> - The cluster is accessible through both IPv4 and IPv6 addresses.</p></li>
599 /// </ul><note>
600 /// <p>If no explicit <code>NetworkType</code> is provided, the network type is derived based on the subnet group's configuration.</p>
601 /// </note>
602 pub fn set_network_type(mut self, input: ::std::option::Option<crate::types::NetworkType>) -> Self {
603 self.network_type = input;
604 self
605 }
606 /// <p>Specifies the IP protocol(s) the cluster uses for network communications. Values are:</p>
607 /// <ul>
608 /// <li>
609 /// <p><code>ipv4</code> - The cluster is accessible only through IPv4 addresses</p></li>
610 /// <li>
611 /// <p><code>ipv6</code> - The cluster is accessible only through IPv6 addresses</p></li>
612 /// <li>
613 /// <p><code>dual_stack</code> - The cluster is accessible through both IPv4 and IPv6 addresses.</p></li>
614 /// </ul><note>
615 /// <p>If no explicit <code>NetworkType</code> is provided, the network type is derived based on the subnet group's configuration.</p>
616 /// </note>
617 pub fn get_network_type(&self) -> &::std::option::Option<crate::types::NetworkType> {
618 &self.network_type
619 }
620 /// Consumes the builder and constructs a [`CreateClusterInput`](crate::operation::create_cluster::CreateClusterInput).
621 pub fn build(
622 self,
623 ) -> ::std::result::Result<crate::operation::create_cluster::CreateClusterInput, ::aws_smithy_types::error::operation::BuildError> {
624 ::std::result::Result::Ok(crate::operation::create_cluster::CreateClusterInput {
625 cluster_name: self.cluster_name,
626 node_type: self.node_type,
627 description: self.description,
628 replication_factor: self.replication_factor,
629 availability_zones: self.availability_zones,
630 subnet_group_name: self.subnet_group_name,
631 security_group_ids: self.security_group_ids,
632 preferred_maintenance_window: self.preferred_maintenance_window,
633 notification_topic_arn: self.notification_topic_arn,
634 iam_role_arn: self.iam_role_arn,
635 parameter_group_name: self.parameter_group_name,
636 tags: self.tags,
637 sse_specification: self.sse_specification,
638 cluster_endpoint_encryption_type: self.cluster_endpoint_encryption_type,
639 network_type: self.network_type,
640 })
641 }
642}