aws_sdk_docdbelastic/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)]
5pub struct CreateClusterInput {
6    /// <p>The name of the new elastic cluster. This parameter is stored as a lowercase string.</p>
7    /// <p><i>Constraints</i>:</p>
8    /// <ul>
9    /// <li>
10    /// <p>Must contain from 1 to 63 letters, numbers, or hyphens.</p></li>
11    /// <li>
12    /// <p>The first character must be a letter.</p></li>
13    /// <li>
14    /// <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li>
15    /// </ul>
16    /// <p><i>Example</i>: <code>my-cluster</code></p>
17    pub cluster_name: ::std::option::Option<::std::string::String>,
18    /// <p>The authentication type used to determine where to fetch the password used for accessing the elastic cluster. Valid types are <code>PLAIN_TEXT</code> or <code>SECRET_ARN</code>.</p>
19    pub auth_type: ::std::option::Option<crate::types::Auth>,
20    /// <p>The name of the Amazon DocumentDB elastic clusters administrator.</p>
21    /// <p><i>Constraints</i>:</p>
22    /// <ul>
23    /// <li>
24    /// <p>Must be from 1 to 63 letters or numbers.</p></li>
25    /// <li>
26    /// <p>The first character must be a letter.</p></li>
27    /// <li>
28    /// <p>Cannot be a reserved word.</p></li>
29    /// </ul>
30    pub admin_user_name: ::std::option::Option<::std::string::String>,
31    /// <p>The password for the Amazon DocumentDB elastic clusters administrator. The password can contain any printable ASCII characters.</p>
32    /// <p><i>Constraints</i>:</p>
33    /// <ul>
34    /// <li>
35    /// <p>Must contain from 8 to 100 characters.</p></li>
36    /// <li>
37    /// <p>Cannot contain a forward slash (/), double quote ("), or the "at" symbol (@).</p></li>
38    /// </ul>
39    pub admin_user_password: ::std::option::Option<::std::string::String>,
40    /// <p>The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32, 64.</p>
41    pub shard_capacity: ::std::option::Option<i32>,
42    /// <p>The number of shards assigned to the elastic cluster. Maximum is 32.</p>
43    pub shard_count: ::std::option::Option<i32>,
44    /// <p>A list of EC2 VPC security groups to associate with the new elastic cluster.</p>
45    pub vpc_security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
46    /// <p>The Amazon EC2 subnet IDs for the new elastic cluster.</p>
47    pub subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
48    /// <p>The KMS key identifier to use to encrypt the new elastic cluster.</p>
49    /// <p>The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of the ARN as the KMS encryption key.</p>
50    /// <p>If an encryption key is not specified, Amazon DocumentDB uses the default encryption key that KMS creates for your account. Your account has a different default encryption key for each Amazon Region.</p>
51    pub kms_key_id: ::std::option::Option<::std::string::String>,
52    /// <p>The client token for the elastic cluster.</p>
53    pub client_token: ::std::option::Option<::std::string::String>,
54    /// <p>The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).</p>
55    /// <p><i>Format</i>: <code>ddd:hh24:mi-ddd:hh24:mi</code></p>
56    /// <p><i>Default</i>: a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services Region, occurring on a random day of the week.</p>
57    /// <p><i>Valid days</i>: Mon, Tue, Wed, Thu, Fri, Sat, Sun</p>
58    /// <p><i>Constraints</i>: Minimum 30-minute window.</p>
59    pub preferred_maintenance_window: ::std::option::Option<::std::string::String>,
60    /// <p>The tags to be assigned to the new elastic cluster.</p>
61    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
62    /// <p>The number of days for which automatic snapshots are retained.</p>
63    pub backup_retention_period: ::std::option::Option<i32>,
64    /// <p>The daily time range during which automated backups are created if automated backups are enabled, as determined by the <code>backupRetentionPeriod</code>.</p>
65    pub preferred_backup_window: ::std::option::Option<::std::string::String>,
66    /// <p>The number of replica instances applying to all shards in the elastic cluster. A <code>shardInstanceCount</code> value of 1 means there is one writer instance, and any additional instances are replicas that can be used for reads and to improve availability.</p>
67    pub shard_instance_count: ::std::option::Option<i32>,
68}
69impl CreateClusterInput {
70    /// <p>The name of the new elastic cluster. This parameter is stored as a lowercase string.</p>
71    /// <p><i>Constraints</i>:</p>
72    /// <ul>
73    /// <li>
74    /// <p>Must contain from 1 to 63 letters, numbers, or hyphens.</p></li>
75    /// <li>
76    /// <p>The first character must be a letter.</p></li>
77    /// <li>
78    /// <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li>
79    /// </ul>
80    /// <p><i>Example</i>: <code>my-cluster</code></p>
81    pub fn cluster_name(&self) -> ::std::option::Option<&str> {
82        self.cluster_name.as_deref()
83    }
84    /// <p>The authentication type used to determine where to fetch the password used for accessing the elastic cluster. Valid types are <code>PLAIN_TEXT</code> or <code>SECRET_ARN</code>.</p>
85    pub fn auth_type(&self) -> ::std::option::Option<&crate::types::Auth> {
86        self.auth_type.as_ref()
87    }
88    /// <p>The name of the Amazon DocumentDB elastic clusters administrator.</p>
89    /// <p><i>Constraints</i>:</p>
90    /// <ul>
91    /// <li>
92    /// <p>Must be from 1 to 63 letters or numbers.</p></li>
93    /// <li>
94    /// <p>The first character must be a letter.</p></li>
95    /// <li>
96    /// <p>Cannot be a reserved word.</p></li>
97    /// </ul>
98    pub fn admin_user_name(&self) -> ::std::option::Option<&str> {
99        self.admin_user_name.as_deref()
100    }
101    /// <p>The password for the Amazon DocumentDB elastic clusters administrator. The password can contain any printable ASCII characters.</p>
102    /// <p><i>Constraints</i>:</p>
103    /// <ul>
104    /// <li>
105    /// <p>Must contain from 8 to 100 characters.</p></li>
106    /// <li>
107    /// <p>Cannot contain a forward slash (/), double quote ("), or the "at" symbol (@).</p></li>
108    /// </ul>
109    pub fn admin_user_password(&self) -> ::std::option::Option<&str> {
110        self.admin_user_password.as_deref()
111    }
112    /// <p>The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32, 64.</p>
113    pub fn shard_capacity(&self) -> ::std::option::Option<i32> {
114        self.shard_capacity
115    }
116    /// <p>The number of shards assigned to the elastic cluster. Maximum is 32.</p>
117    pub fn shard_count(&self) -> ::std::option::Option<i32> {
118        self.shard_count
119    }
120    /// <p>A list of EC2 VPC security groups to associate with the new elastic cluster.</p>
121    ///
122    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.vpc_security_group_ids.is_none()`.
123    pub fn vpc_security_group_ids(&self) -> &[::std::string::String] {
124        self.vpc_security_group_ids.as_deref().unwrap_or_default()
125    }
126    /// <p>The Amazon EC2 subnet IDs for the new elastic cluster.</p>
127    ///
128    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.subnet_ids.is_none()`.
129    pub fn subnet_ids(&self) -> &[::std::string::String] {
130        self.subnet_ids.as_deref().unwrap_or_default()
131    }
132    /// <p>The KMS key identifier to use to encrypt the new elastic cluster.</p>
133    /// <p>The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of the ARN as the KMS encryption key.</p>
134    /// <p>If an encryption key is not specified, Amazon DocumentDB uses the default encryption key that KMS creates for your account. Your account has a different default encryption key for each Amazon Region.</p>
135    pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
136        self.kms_key_id.as_deref()
137    }
138    /// <p>The client token for the elastic cluster.</p>
139    pub fn client_token(&self) -> ::std::option::Option<&str> {
140        self.client_token.as_deref()
141    }
142    /// <p>The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).</p>
143    /// <p><i>Format</i>: <code>ddd:hh24:mi-ddd:hh24:mi</code></p>
144    /// <p><i>Default</i>: a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services Region, occurring on a random day of the week.</p>
145    /// <p><i>Valid days</i>: Mon, Tue, Wed, Thu, Fri, Sat, Sun</p>
146    /// <p><i>Constraints</i>: Minimum 30-minute window.</p>
147    pub fn preferred_maintenance_window(&self) -> ::std::option::Option<&str> {
148        self.preferred_maintenance_window.as_deref()
149    }
150    /// <p>The tags to be assigned to the new elastic cluster.</p>
151    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
152        self.tags.as_ref()
153    }
154    /// <p>The number of days for which automatic snapshots are retained.</p>
155    pub fn backup_retention_period(&self) -> ::std::option::Option<i32> {
156        self.backup_retention_period
157    }
158    /// <p>The daily time range during which automated backups are created if automated backups are enabled, as determined by the <code>backupRetentionPeriod</code>.</p>
159    pub fn preferred_backup_window(&self) -> ::std::option::Option<&str> {
160        self.preferred_backup_window.as_deref()
161    }
162    /// <p>The number of replica instances applying to all shards in the elastic cluster. A <code>shardInstanceCount</code> value of 1 means there is one writer instance, and any additional instances are replicas that can be used for reads and to improve availability.</p>
163    pub fn shard_instance_count(&self) -> ::std::option::Option<i32> {
164        self.shard_instance_count
165    }
166}
167impl ::std::fmt::Debug for CreateClusterInput {
168    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
169        let mut formatter = f.debug_struct("CreateClusterInput");
170        formatter.field("cluster_name", &self.cluster_name);
171        formatter.field("auth_type", &self.auth_type);
172        formatter.field("admin_user_name", &self.admin_user_name);
173        formatter.field("admin_user_password", &"*** Sensitive Data Redacted ***");
174        formatter.field("shard_capacity", &self.shard_capacity);
175        formatter.field("shard_count", &self.shard_count);
176        formatter.field("vpc_security_group_ids", &self.vpc_security_group_ids);
177        formatter.field("subnet_ids", &self.subnet_ids);
178        formatter.field("kms_key_id", &self.kms_key_id);
179        formatter.field("client_token", &self.client_token);
180        formatter.field("preferred_maintenance_window", &self.preferred_maintenance_window);
181        formatter.field("tags", &self.tags);
182        formatter.field("backup_retention_period", &self.backup_retention_period);
183        formatter.field("preferred_backup_window", &self.preferred_backup_window);
184        formatter.field("shard_instance_count", &self.shard_instance_count);
185        formatter.finish()
186    }
187}
188impl CreateClusterInput {
189    /// Creates a new builder-style object to manufacture [`CreateClusterInput`](crate::operation::create_cluster::CreateClusterInput).
190    pub fn builder() -> crate::operation::create_cluster::builders::CreateClusterInputBuilder {
191        crate::operation::create_cluster::builders::CreateClusterInputBuilder::default()
192    }
193}
194
195/// A builder for [`CreateClusterInput`](crate::operation::create_cluster::CreateClusterInput).
196#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
197#[non_exhaustive]
198pub struct CreateClusterInputBuilder {
199    pub(crate) cluster_name: ::std::option::Option<::std::string::String>,
200    pub(crate) auth_type: ::std::option::Option<crate::types::Auth>,
201    pub(crate) admin_user_name: ::std::option::Option<::std::string::String>,
202    pub(crate) admin_user_password: ::std::option::Option<::std::string::String>,
203    pub(crate) shard_capacity: ::std::option::Option<i32>,
204    pub(crate) shard_count: ::std::option::Option<i32>,
205    pub(crate) vpc_security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
206    pub(crate) subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
207    pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
208    pub(crate) client_token: ::std::option::Option<::std::string::String>,
209    pub(crate) preferred_maintenance_window: ::std::option::Option<::std::string::String>,
210    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
211    pub(crate) backup_retention_period: ::std::option::Option<i32>,
212    pub(crate) preferred_backup_window: ::std::option::Option<::std::string::String>,
213    pub(crate) shard_instance_count: ::std::option::Option<i32>,
214}
215impl CreateClusterInputBuilder {
216    /// <p>The name of the new elastic cluster. This parameter is stored as a lowercase string.</p>
217    /// <p><i>Constraints</i>:</p>
218    /// <ul>
219    /// <li>
220    /// <p>Must contain from 1 to 63 letters, numbers, or hyphens.</p></li>
221    /// <li>
222    /// <p>The first character must be a letter.</p></li>
223    /// <li>
224    /// <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li>
225    /// </ul>
226    /// <p><i>Example</i>: <code>my-cluster</code></p>
227    /// This field is required.
228    pub fn cluster_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
229        self.cluster_name = ::std::option::Option::Some(input.into());
230        self
231    }
232    /// <p>The name of the new elastic cluster. This parameter is stored as a lowercase string.</p>
233    /// <p><i>Constraints</i>:</p>
234    /// <ul>
235    /// <li>
236    /// <p>Must contain from 1 to 63 letters, numbers, or hyphens.</p></li>
237    /// <li>
238    /// <p>The first character must be a letter.</p></li>
239    /// <li>
240    /// <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li>
241    /// </ul>
242    /// <p><i>Example</i>: <code>my-cluster</code></p>
243    pub fn set_cluster_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
244        self.cluster_name = input;
245        self
246    }
247    /// <p>The name of the new elastic cluster. This parameter is stored as a lowercase string.</p>
248    /// <p><i>Constraints</i>:</p>
249    /// <ul>
250    /// <li>
251    /// <p>Must contain from 1 to 63 letters, numbers, or hyphens.</p></li>
252    /// <li>
253    /// <p>The first character must be a letter.</p></li>
254    /// <li>
255    /// <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li>
256    /// </ul>
257    /// <p><i>Example</i>: <code>my-cluster</code></p>
258    pub fn get_cluster_name(&self) -> &::std::option::Option<::std::string::String> {
259        &self.cluster_name
260    }
261    /// <p>The authentication type used to determine where to fetch the password used for accessing the elastic cluster. Valid types are <code>PLAIN_TEXT</code> or <code>SECRET_ARN</code>.</p>
262    /// This field is required.
263    pub fn auth_type(mut self, input: crate::types::Auth) -> Self {
264        self.auth_type = ::std::option::Option::Some(input);
265        self
266    }
267    /// <p>The authentication type used to determine where to fetch the password used for accessing the elastic cluster. Valid types are <code>PLAIN_TEXT</code> or <code>SECRET_ARN</code>.</p>
268    pub fn set_auth_type(mut self, input: ::std::option::Option<crate::types::Auth>) -> Self {
269        self.auth_type = input;
270        self
271    }
272    /// <p>The authentication type used to determine where to fetch the password used for accessing the elastic cluster. Valid types are <code>PLAIN_TEXT</code> or <code>SECRET_ARN</code>.</p>
273    pub fn get_auth_type(&self) -> &::std::option::Option<crate::types::Auth> {
274        &self.auth_type
275    }
276    /// <p>The name of the Amazon DocumentDB elastic clusters administrator.</p>
277    /// <p><i>Constraints</i>:</p>
278    /// <ul>
279    /// <li>
280    /// <p>Must be from 1 to 63 letters or numbers.</p></li>
281    /// <li>
282    /// <p>The first character must be a letter.</p></li>
283    /// <li>
284    /// <p>Cannot be a reserved word.</p></li>
285    /// </ul>
286    /// This field is required.
287    pub fn admin_user_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
288        self.admin_user_name = ::std::option::Option::Some(input.into());
289        self
290    }
291    /// <p>The name of the Amazon DocumentDB elastic clusters administrator.</p>
292    /// <p><i>Constraints</i>:</p>
293    /// <ul>
294    /// <li>
295    /// <p>Must be from 1 to 63 letters or numbers.</p></li>
296    /// <li>
297    /// <p>The first character must be a letter.</p></li>
298    /// <li>
299    /// <p>Cannot be a reserved word.</p></li>
300    /// </ul>
301    pub fn set_admin_user_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
302        self.admin_user_name = input;
303        self
304    }
305    /// <p>The name of the Amazon DocumentDB elastic clusters administrator.</p>
306    /// <p><i>Constraints</i>:</p>
307    /// <ul>
308    /// <li>
309    /// <p>Must be from 1 to 63 letters or numbers.</p></li>
310    /// <li>
311    /// <p>The first character must be a letter.</p></li>
312    /// <li>
313    /// <p>Cannot be a reserved word.</p></li>
314    /// </ul>
315    pub fn get_admin_user_name(&self) -> &::std::option::Option<::std::string::String> {
316        &self.admin_user_name
317    }
318    /// <p>The password for the Amazon DocumentDB elastic clusters administrator. The password can contain any printable ASCII characters.</p>
319    /// <p><i>Constraints</i>:</p>
320    /// <ul>
321    /// <li>
322    /// <p>Must contain from 8 to 100 characters.</p></li>
323    /// <li>
324    /// <p>Cannot contain a forward slash (/), double quote ("), or the "at" symbol (@).</p></li>
325    /// </ul>
326    /// This field is required.
327    pub fn admin_user_password(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
328        self.admin_user_password = ::std::option::Option::Some(input.into());
329        self
330    }
331    /// <p>The password for the Amazon DocumentDB elastic clusters administrator. The password can contain any printable ASCII characters.</p>
332    /// <p><i>Constraints</i>:</p>
333    /// <ul>
334    /// <li>
335    /// <p>Must contain from 8 to 100 characters.</p></li>
336    /// <li>
337    /// <p>Cannot contain a forward slash (/), double quote ("), or the "at" symbol (@).</p></li>
338    /// </ul>
339    pub fn set_admin_user_password(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
340        self.admin_user_password = input;
341        self
342    }
343    /// <p>The password for the Amazon DocumentDB elastic clusters administrator. The password can contain any printable ASCII characters.</p>
344    /// <p><i>Constraints</i>:</p>
345    /// <ul>
346    /// <li>
347    /// <p>Must contain from 8 to 100 characters.</p></li>
348    /// <li>
349    /// <p>Cannot contain a forward slash (/), double quote ("), or the "at" symbol (@).</p></li>
350    /// </ul>
351    pub fn get_admin_user_password(&self) -> &::std::option::Option<::std::string::String> {
352        &self.admin_user_password
353    }
354    /// <p>The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32, 64.</p>
355    /// This field is required.
356    pub fn shard_capacity(mut self, input: i32) -> Self {
357        self.shard_capacity = ::std::option::Option::Some(input);
358        self
359    }
360    /// <p>The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32, 64.</p>
361    pub fn set_shard_capacity(mut self, input: ::std::option::Option<i32>) -> Self {
362        self.shard_capacity = input;
363        self
364    }
365    /// <p>The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32, 64.</p>
366    pub fn get_shard_capacity(&self) -> &::std::option::Option<i32> {
367        &self.shard_capacity
368    }
369    /// <p>The number of shards assigned to the elastic cluster. Maximum is 32.</p>
370    /// This field is required.
371    pub fn shard_count(mut self, input: i32) -> Self {
372        self.shard_count = ::std::option::Option::Some(input);
373        self
374    }
375    /// <p>The number of shards assigned to the elastic cluster. Maximum is 32.</p>
376    pub fn set_shard_count(mut self, input: ::std::option::Option<i32>) -> Self {
377        self.shard_count = input;
378        self
379    }
380    /// <p>The number of shards assigned to the elastic cluster. Maximum is 32.</p>
381    pub fn get_shard_count(&self) -> &::std::option::Option<i32> {
382        &self.shard_count
383    }
384    /// Appends an item to `vpc_security_group_ids`.
385    ///
386    /// To override the contents of this collection use [`set_vpc_security_group_ids`](Self::set_vpc_security_group_ids).
387    ///
388    /// <p>A list of EC2 VPC security groups to associate with the new elastic cluster.</p>
389    pub fn vpc_security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
390        let mut v = self.vpc_security_group_ids.unwrap_or_default();
391        v.push(input.into());
392        self.vpc_security_group_ids = ::std::option::Option::Some(v);
393        self
394    }
395    /// <p>A list of EC2 VPC security groups to associate with the new elastic cluster.</p>
396    pub fn set_vpc_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
397        self.vpc_security_group_ids = input;
398        self
399    }
400    /// <p>A list of EC2 VPC security groups to associate with the new elastic cluster.</p>
401    pub fn get_vpc_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
402        &self.vpc_security_group_ids
403    }
404    /// Appends an item to `subnet_ids`.
405    ///
406    /// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
407    ///
408    /// <p>The Amazon EC2 subnet IDs for the new elastic cluster.</p>
409    pub fn subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
410        let mut v = self.subnet_ids.unwrap_or_default();
411        v.push(input.into());
412        self.subnet_ids = ::std::option::Option::Some(v);
413        self
414    }
415    /// <p>The Amazon EC2 subnet IDs for the new elastic cluster.</p>
416    pub fn set_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
417        self.subnet_ids = input;
418        self
419    }
420    /// <p>The Amazon EC2 subnet IDs for the new elastic cluster.</p>
421    pub fn get_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
422        &self.subnet_ids
423    }
424    /// <p>The KMS key identifier to use to encrypt the new elastic cluster.</p>
425    /// <p>The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of the ARN as the KMS encryption key.</p>
426    /// <p>If an encryption key is not specified, Amazon DocumentDB uses the default encryption key that KMS creates for your account. Your account has a different default encryption key for each Amazon Region.</p>
427    pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
428        self.kms_key_id = ::std::option::Option::Some(input.into());
429        self
430    }
431    /// <p>The KMS key identifier to use to encrypt the new elastic cluster.</p>
432    /// <p>The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of the ARN as the KMS encryption key.</p>
433    /// <p>If an encryption key is not specified, Amazon DocumentDB uses the default encryption key that KMS creates for your account. Your account has a different default encryption key for each Amazon Region.</p>
434    pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
435        self.kms_key_id = input;
436        self
437    }
438    /// <p>The KMS key identifier to use to encrypt the new elastic cluster.</p>
439    /// <p>The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of the ARN as the KMS encryption key.</p>
440    /// <p>If an encryption key is not specified, Amazon DocumentDB uses the default encryption key that KMS creates for your account. Your account has a different default encryption key for each Amazon Region.</p>
441    pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
442        &self.kms_key_id
443    }
444    /// <p>The client token for the elastic cluster.</p>
445    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
446        self.client_token = ::std::option::Option::Some(input.into());
447        self
448    }
449    /// <p>The client token for the elastic cluster.</p>
450    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
451        self.client_token = input;
452        self
453    }
454    /// <p>The client token for the elastic cluster.</p>
455    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
456        &self.client_token
457    }
458    /// <p>The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).</p>
459    /// <p><i>Format</i>: <code>ddd:hh24:mi-ddd:hh24:mi</code></p>
460    /// <p><i>Default</i>: a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services Region, occurring on a random day of the week.</p>
461    /// <p><i>Valid days</i>: Mon, Tue, Wed, Thu, Fri, Sat, Sun</p>
462    /// <p><i>Constraints</i>: Minimum 30-minute window.</p>
463    pub fn preferred_maintenance_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
464        self.preferred_maintenance_window = ::std::option::Option::Some(input.into());
465        self
466    }
467    /// <p>The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).</p>
468    /// <p><i>Format</i>: <code>ddd:hh24:mi-ddd:hh24:mi</code></p>
469    /// <p><i>Default</i>: a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services Region, occurring on a random day of the week.</p>
470    /// <p><i>Valid days</i>: Mon, Tue, Wed, Thu, Fri, Sat, Sun</p>
471    /// <p><i>Constraints</i>: Minimum 30-minute window.</p>
472    pub fn set_preferred_maintenance_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
473        self.preferred_maintenance_window = input;
474        self
475    }
476    /// <p>The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).</p>
477    /// <p><i>Format</i>: <code>ddd:hh24:mi-ddd:hh24:mi</code></p>
478    /// <p><i>Default</i>: a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services Region, occurring on a random day of the week.</p>
479    /// <p><i>Valid days</i>: Mon, Tue, Wed, Thu, Fri, Sat, Sun</p>
480    /// <p><i>Constraints</i>: Minimum 30-minute window.</p>
481    pub fn get_preferred_maintenance_window(&self) -> &::std::option::Option<::std::string::String> {
482        &self.preferred_maintenance_window
483    }
484    /// Adds a key-value pair to `tags`.
485    ///
486    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
487    ///
488    /// <p>The tags to be assigned to the new elastic cluster.</p>
489    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
490        let mut hash_map = self.tags.unwrap_or_default();
491        hash_map.insert(k.into(), v.into());
492        self.tags = ::std::option::Option::Some(hash_map);
493        self
494    }
495    /// <p>The tags to be assigned to the new elastic cluster.</p>
496    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
497        self.tags = input;
498        self
499    }
500    /// <p>The tags to be assigned to the new elastic cluster.</p>
501    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
502        &self.tags
503    }
504    /// <p>The number of days for which automatic snapshots are retained.</p>
505    pub fn backup_retention_period(mut self, input: i32) -> Self {
506        self.backup_retention_period = ::std::option::Option::Some(input);
507        self
508    }
509    /// <p>The number of days for which automatic snapshots are retained.</p>
510    pub fn set_backup_retention_period(mut self, input: ::std::option::Option<i32>) -> Self {
511        self.backup_retention_period = input;
512        self
513    }
514    /// <p>The number of days for which automatic snapshots are retained.</p>
515    pub fn get_backup_retention_period(&self) -> &::std::option::Option<i32> {
516        &self.backup_retention_period
517    }
518    /// <p>The daily time range during which automated backups are created if automated backups are enabled, as determined by the <code>backupRetentionPeriod</code>.</p>
519    pub fn preferred_backup_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
520        self.preferred_backup_window = ::std::option::Option::Some(input.into());
521        self
522    }
523    /// <p>The daily time range during which automated backups are created if automated backups are enabled, as determined by the <code>backupRetentionPeriod</code>.</p>
524    pub fn set_preferred_backup_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
525        self.preferred_backup_window = input;
526        self
527    }
528    /// <p>The daily time range during which automated backups are created if automated backups are enabled, as determined by the <code>backupRetentionPeriod</code>.</p>
529    pub fn get_preferred_backup_window(&self) -> &::std::option::Option<::std::string::String> {
530        &self.preferred_backup_window
531    }
532    /// <p>The number of replica instances applying to all shards in the elastic cluster. A <code>shardInstanceCount</code> value of 1 means there is one writer instance, and any additional instances are replicas that can be used for reads and to improve availability.</p>
533    pub fn shard_instance_count(mut self, input: i32) -> Self {
534        self.shard_instance_count = ::std::option::Option::Some(input);
535        self
536    }
537    /// <p>The number of replica instances applying to all shards in the elastic cluster. A <code>shardInstanceCount</code> value of 1 means there is one writer instance, and any additional instances are replicas that can be used for reads and to improve availability.</p>
538    pub fn set_shard_instance_count(mut self, input: ::std::option::Option<i32>) -> Self {
539        self.shard_instance_count = input;
540        self
541    }
542    /// <p>The number of replica instances applying to all shards in the elastic cluster. A <code>shardInstanceCount</code> value of 1 means there is one writer instance, and any additional instances are replicas that can be used for reads and to improve availability.</p>
543    pub fn get_shard_instance_count(&self) -> &::std::option::Option<i32> {
544        &self.shard_instance_count
545    }
546    /// Consumes the builder and constructs a [`CreateClusterInput`](crate::operation::create_cluster::CreateClusterInput).
547    pub fn build(
548        self,
549    ) -> ::std::result::Result<crate::operation::create_cluster::CreateClusterInput, ::aws_smithy_types::error::operation::BuildError> {
550        ::std::result::Result::Ok(crate::operation::create_cluster::CreateClusterInput {
551            cluster_name: self.cluster_name,
552            auth_type: self.auth_type,
553            admin_user_name: self.admin_user_name,
554            admin_user_password: self.admin_user_password,
555            shard_capacity: self.shard_capacity,
556            shard_count: self.shard_count,
557            vpc_security_group_ids: self.vpc_security_group_ids,
558            subnet_ids: self.subnet_ids,
559            kms_key_id: self.kms_key_id,
560            client_token: self.client_token,
561            preferred_maintenance_window: self.preferred_maintenance_window,
562            tags: self.tags,
563            backup_retention_period: self.backup_retention_period,
564            preferred_backup_window: self.preferred_backup_window,
565            shard_instance_count: self.shard_instance_count,
566        })
567    }
568}
569impl ::std::fmt::Debug for CreateClusterInputBuilder {
570    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
571        let mut formatter = f.debug_struct("CreateClusterInputBuilder");
572        formatter.field("cluster_name", &self.cluster_name);
573        formatter.field("auth_type", &self.auth_type);
574        formatter.field("admin_user_name", &self.admin_user_name);
575        formatter.field("admin_user_password", &"*** Sensitive Data Redacted ***");
576        formatter.field("shard_capacity", &self.shard_capacity);
577        formatter.field("shard_count", &self.shard_count);
578        formatter.field("vpc_security_group_ids", &self.vpc_security_group_ids);
579        formatter.field("subnet_ids", &self.subnet_ids);
580        formatter.field("kms_key_id", &self.kms_key_id);
581        formatter.field("client_token", &self.client_token);
582        formatter.field("preferred_maintenance_window", &self.preferred_maintenance_window);
583        formatter.field("tags", &self.tags);
584        formatter.field("backup_retention_period", &self.backup_retention_period);
585        formatter.field("preferred_backup_window", &self.preferred_backup_window);
586        formatter.field("shard_instance_count", &self.shard_instance_count);
587        formatter.finish()
588    }
589}