aws_sdk_docdb/operation/create_db_cluster/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_db_cluster::_create_db_cluster_output::CreateDbClusterOutputBuilder;
3
4pub use crate::operation::create_db_cluster::_create_db_cluster_input::CreateDbClusterInputBuilder;
5
6impl crate::operation::create_db_cluster::builders::CreateDbClusterInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::create_db_cluster::CreateDbClusterOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_db_cluster::CreateDBClusterError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_db_cluster();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateDBCluster`.
24///
25/// <p>Creates a new Amazon DocumentDB cluster.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateDBClusterFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::create_db_cluster::builders::CreateDbClusterInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::create_db_cluster::CreateDbClusterOutput,
35 crate::operation::create_db_cluster::CreateDBClusterError,
36 > for CreateDBClusterFluentBuilder
37{
38 fn send(
39 self,
40 config_override: crate::config::Builder,
41 ) -> crate::client::customize::internal::BoxFuture<
42 crate::client::customize::internal::SendResult<
43 crate::operation::create_db_cluster::CreateDbClusterOutput,
44 crate::operation::create_db_cluster::CreateDBClusterError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl CreateDBClusterFluentBuilder {
51 /// Creates a new `CreateDBClusterFluentBuilder`.
52 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53 Self {
54 handle,
55 inner: ::std::default::Default::default(),
56 config_override: ::std::option::Option::None,
57 }
58 }
59 /// Access the CreateDBCluster as a reference.
60 pub fn as_input(&self) -> &crate::operation::create_db_cluster::builders::CreateDbClusterInputBuilder {
61 &self.inner
62 }
63 /// Sends the request and returns the response.
64 ///
65 /// If an error occurs, an `SdkError` will be returned with additional details that
66 /// can be matched against.
67 ///
68 /// By default, any retryable failures will be retried twice. Retry behavior
69 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70 /// set when configuring the client.
71 pub async fn send(
72 self,
73 ) -> ::std::result::Result<
74 crate::operation::create_db_cluster::CreateDbClusterOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::create_db_cluster::CreateDBClusterError,
77 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78 >,
79 > {
80 let input = self
81 .inner
82 .build()
83 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84 let runtime_plugins = crate::operation::create_db_cluster::CreateDBCluster::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::create_db_cluster::CreateDBCluster::orchestrate(&runtime_plugins, input).await
90 }
91
92 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93 pub fn customize(
94 self,
95 ) -> crate::client::customize::CustomizableOperation<
96 crate::operation::create_db_cluster::CreateDbClusterOutput,
97 crate::operation::create_db_cluster::CreateDBClusterError,
98 Self,
99 > {
100 crate::client::customize::CustomizableOperation::new(self)
101 }
102 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103 self.set_config_override(::std::option::Option::Some(config_override.into()));
104 self
105 }
106
107 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108 self.config_override = config_override;
109 self
110 }
111 ///
112 /// Appends an item to `AvailabilityZones`.
113 ///
114 /// To override the contents of this collection use [`set_availability_zones`](Self::set_availability_zones).
115 ///
116 /// <p>A list of Amazon EC2 Availability Zones that instances in the cluster can be created in.</p>
117 pub fn availability_zones(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118 self.inner = self.inner.availability_zones(input.into());
119 self
120 }
121 /// <p>A list of Amazon EC2 Availability Zones that instances in the cluster can be created in.</p>
122 pub fn set_availability_zones(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
123 self.inner = self.inner.set_availability_zones(input);
124 self
125 }
126 /// <p>A list of Amazon EC2 Availability Zones that instances in the cluster can be created in.</p>
127 pub fn get_availability_zones(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
128 self.inner.get_availability_zones()
129 }
130 /// <p>The number of days for which automated backups are retained. You must specify a minimum value of 1.</p>
131 /// <p>Default: 1</p>
132 /// <p>Constraints:</p>
133 /// <ul>
134 /// <li>
135 /// <p>Must be a value from 1 to 35.</p></li>
136 /// </ul>
137 pub fn backup_retention_period(mut self, input: i32) -> Self {
138 self.inner = self.inner.backup_retention_period(input);
139 self
140 }
141 /// <p>The number of days for which automated backups are retained. You must specify a minimum value of 1.</p>
142 /// <p>Default: 1</p>
143 /// <p>Constraints:</p>
144 /// <ul>
145 /// <li>
146 /// <p>Must be a value from 1 to 35.</p></li>
147 /// </ul>
148 pub fn set_backup_retention_period(mut self, input: ::std::option::Option<i32>) -> Self {
149 self.inner = self.inner.set_backup_retention_period(input);
150 self
151 }
152 /// <p>The number of days for which automated backups are retained. You must specify a minimum value of 1.</p>
153 /// <p>Default: 1</p>
154 /// <p>Constraints:</p>
155 /// <ul>
156 /// <li>
157 /// <p>Must be a value from 1 to 35.</p></li>
158 /// </ul>
159 pub fn get_backup_retention_period(&self) -> &::std::option::Option<i32> {
160 self.inner.get_backup_retention_period()
161 }
162 /// <p>The cluster identifier. This parameter is stored as a lowercase string.</p>
163 /// <p>Constraints:</p>
164 /// <ul>
165 /// <li>
166 /// <p>Must contain from 1 to 63 letters, numbers, or hyphens.</p></li>
167 /// <li>
168 /// <p>The first character must be a letter.</p></li>
169 /// <li>
170 /// <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li>
171 /// </ul>
172 /// <p>Example: <code>my-cluster</code></p>
173 pub fn db_cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
174 self.inner = self.inner.db_cluster_identifier(input.into());
175 self
176 }
177 /// <p>The cluster identifier. This parameter is stored as a lowercase string.</p>
178 /// <p>Constraints:</p>
179 /// <ul>
180 /// <li>
181 /// <p>Must contain from 1 to 63 letters, numbers, or hyphens.</p></li>
182 /// <li>
183 /// <p>The first character must be a letter.</p></li>
184 /// <li>
185 /// <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li>
186 /// </ul>
187 /// <p>Example: <code>my-cluster</code></p>
188 pub fn set_db_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
189 self.inner = self.inner.set_db_cluster_identifier(input);
190 self
191 }
192 /// <p>The cluster identifier. This parameter is stored as a lowercase string.</p>
193 /// <p>Constraints:</p>
194 /// <ul>
195 /// <li>
196 /// <p>Must contain from 1 to 63 letters, numbers, or hyphens.</p></li>
197 /// <li>
198 /// <p>The first character must be a letter.</p></li>
199 /// <li>
200 /// <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li>
201 /// </ul>
202 /// <p>Example: <code>my-cluster</code></p>
203 pub fn get_db_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
204 self.inner.get_db_cluster_identifier()
205 }
206 /// <p>The name of the cluster parameter group to associate with this cluster.</p>
207 pub fn db_cluster_parameter_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
208 self.inner = self.inner.db_cluster_parameter_group_name(input.into());
209 self
210 }
211 /// <p>The name of the cluster parameter group to associate with this cluster.</p>
212 pub fn set_db_cluster_parameter_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
213 self.inner = self.inner.set_db_cluster_parameter_group_name(input);
214 self
215 }
216 /// <p>The name of the cluster parameter group to associate with this cluster.</p>
217 pub fn get_db_cluster_parameter_group_name(&self) -> &::std::option::Option<::std::string::String> {
218 self.inner.get_db_cluster_parameter_group_name()
219 }
220 ///
221 /// Appends an item to `VpcSecurityGroupIds`.
222 ///
223 /// To override the contents of this collection use [`set_vpc_security_group_ids`](Self::set_vpc_security_group_ids).
224 ///
225 /// <p>A list of EC2 VPC security groups to associate with this cluster.</p>
226 pub fn vpc_security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
227 self.inner = self.inner.vpc_security_group_ids(input.into());
228 self
229 }
230 /// <p>A list of EC2 VPC security groups to associate with this cluster.</p>
231 pub fn set_vpc_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
232 self.inner = self.inner.set_vpc_security_group_ids(input);
233 self
234 }
235 /// <p>A list of EC2 VPC security groups to associate with this cluster.</p>
236 pub fn get_vpc_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
237 self.inner.get_vpc_security_group_ids()
238 }
239 /// <p>A subnet group to associate with this cluster.</p>
240 /// <p>Constraints: Must match the name of an existing <code>DBSubnetGroup</code>. Must not be default.</p>
241 /// <p>Example: <code>mySubnetgroup</code></p>
242 pub fn db_subnet_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
243 self.inner = self.inner.db_subnet_group_name(input.into());
244 self
245 }
246 /// <p>A subnet group to associate with this cluster.</p>
247 /// <p>Constraints: Must match the name of an existing <code>DBSubnetGroup</code>. Must not be default.</p>
248 /// <p>Example: <code>mySubnetgroup</code></p>
249 pub fn set_db_subnet_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
250 self.inner = self.inner.set_db_subnet_group_name(input);
251 self
252 }
253 /// <p>A subnet group to associate with this cluster.</p>
254 /// <p>Constraints: Must match the name of an existing <code>DBSubnetGroup</code>. Must not be default.</p>
255 /// <p>Example: <code>mySubnetgroup</code></p>
256 pub fn get_db_subnet_group_name(&self) -> &::std::option::Option<::std::string::String> {
257 self.inner.get_db_subnet_group_name()
258 }
259 /// <p>The name of the database engine to be used for this cluster.</p>
260 /// <p>Valid values: <code>docdb</code></p>
261 pub fn engine(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
262 self.inner = self.inner.engine(input.into());
263 self
264 }
265 /// <p>The name of the database engine to be used for this cluster.</p>
266 /// <p>Valid values: <code>docdb</code></p>
267 pub fn set_engine(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
268 self.inner = self.inner.set_engine(input);
269 self
270 }
271 /// <p>The name of the database engine to be used for this cluster.</p>
272 /// <p>Valid values: <code>docdb</code></p>
273 pub fn get_engine(&self) -> &::std::option::Option<::std::string::String> {
274 self.inner.get_engine()
275 }
276 /// <p>The version number of the database engine to use. The <code>--engine-version</code> will default to the latest major engine version. For production workloads, we recommend explicitly declaring this parameter with the intended major engine version.</p>
277 pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
278 self.inner = self.inner.engine_version(input.into());
279 self
280 }
281 /// <p>The version number of the database engine to use. The <code>--engine-version</code> will default to the latest major engine version. For production workloads, we recommend explicitly declaring this parameter with the intended major engine version.</p>
282 pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
283 self.inner = self.inner.set_engine_version(input);
284 self
285 }
286 /// <p>The version number of the database engine to use. The <code>--engine-version</code> will default to the latest major engine version. For production workloads, we recommend explicitly declaring this parameter with the intended major engine version.</p>
287 pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
288 self.inner.get_engine_version()
289 }
290 /// <p>The port number on which the instances in the cluster accept connections.</p>
291 pub fn port(mut self, input: i32) -> Self {
292 self.inner = self.inner.port(input);
293 self
294 }
295 /// <p>The port number on which the instances in the cluster accept connections.</p>
296 pub fn set_port(mut self, input: ::std::option::Option<i32>) -> Self {
297 self.inner = self.inner.set_port(input);
298 self
299 }
300 /// <p>The port number on which the instances in the cluster accept connections.</p>
301 pub fn get_port(&self) -> &::std::option::Option<i32> {
302 self.inner.get_port()
303 }
304 /// <p>The name of the master user for the cluster.</p>
305 /// <p>Constraints:</p>
306 /// <ul>
307 /// <li>
308 /// <p>Must be from 1 to 63 letters or numbers.</p></li>
309 /// <li>
310 /// <p>The first character must be a letter.</p></li>
311 /// <li>
312 /// <p>Cannot be a reserved word for the chosen database engine.</p></li>
313 /// </ul>
314 pub fn master_username(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
315 self.inner = self.inner.master_username(input.into());
316 self
317 }
318 /// <p>The name of the master user for the cluster.</p>
319 /// <p>Constraints:</p>
320 /// <ul>
321 /// <li>
322 /// <p>Must be from 1 to 63 letters or numbers.</p></li>
323 /// <li>
324 /// <p>The first character must be a letter.</p></li>
325 /// <li>
326 /// <p>Cannot be a reserved word for the chosen database engine.</p></li>
327 /// </ul>
328 pub fn set_master_username(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
329 self.inner = self.inner.set_master_username(input);
330 self
331 }
332 /// <p>The name of the master user for the cluster.</p>
333 /// <p>Constraints:</p>
334 /// <ul>
335 /// <li>
336 /// <p>Must be from 1 to 63 letters or numbers.</p></li>
337 /// <li>
338 /// <p>The first character must be a letter.</p></li>
339 /// <li>
340 /// <p>Cannot be a reserved word for the chosen database engine.</p></li>
341 /// </ul>
342 pub fn get_master_username(&self) -> &::std::option::Option<::std::string::String> {
343 self.inner.get_master_username()
344 }
345 /// <p>The password for the master database user. This password can contain any printable ASCII character except forward slash (/), double quote ("), or the "at" symbol (@).</p>
346 /// <p>Constraints: Must contain from 8 to 100 characters.</p>
347 pub fn master_user_password(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
348 self.inner = self.inner.master_user_password(input.into());
349 self
350 }
351 /// <p>The password for the master database user. This password can contain any printable ASCII character except forward slash (/), double quote ("), or the "at" symbol (@).</p>
352 /// <p>Constraints: Must contain from 8 to 100 characters.</p>
353 pub fn set_master_user_password(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
354 self.inner = self.inner.set_master_user_password(input);
355 self
356 }
357 /// <p>The password for the master database user. This password can contain any printable ASCII character except forward slash (/), double quote ("), or the "at" symbol (@).</p>
358 /// <p>Constraints: Must contain from 8 to 100 characters.</p>
359 pub fn get_master_user_password(&self) -> &::std::option::Option<::std::string::String> {
360 self.inner.get_master_user_password()
361 }
362 /// <p>The daily time range during which automated backups are created if automated backups are enabled using the <code>BackupRetentionPeriod</code> parameter.</p>
363 /// <p>The default is a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services Region.</p>
364 /// <p>Constraints:</p>
365 /// <ul>
366 /// <li>
367 /// <p>Must be in the format <code>hh24:mi-hh24:mi</code>.</p></li>
368 /// <li>
369 /// <p>Must be in Universal Coordinated Time (UTC).</p></li>
370 /// <li>
371 /// <p>Must not conflict with the preferred maintenance window.</p></li>
372 /// <li>
373 /// <p>Must be at least 30 minutes.</p></li>
374 /// </ul>
375 pub fn preferred_backup_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
376 self.inner = self.inner.preferred_backup_window(input.into());
377 self
378 }
379 /// <p>The daily time range during which automated backups are created if automated backups are enabled using the <code>BackupRetentionPeriod</code> parameter.</p>
380 /// <p>The default is a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services Region.</p>
381 /// <p>Constraints:</p>
382 /// <ul>
383 /// <li>
384 /// <p>Must be in the format <code>hh24:mi-hh24:mi</code>.</p></li>
385 /// <li>
386 /// <p>Must be in Universal Coordinated Time (UTC).</p></li>
387 /// <li>
388 /// <p>Must not conflict with the preferred maintenance window.</p></li>
389 /// <li>
390 /// <p>Must be at least 30 minutes.</p></li>
391 /// </ul>
392 pub fn set_preferred_backup_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
393 self.inner = self.inner.set_preferred_backup_window(input);
394 self
395 }
396 /// <p>The daily time range during which automated backups are created if automated backups are enabled using the <code>BackupRetentionPeriod</code> parameter.</p>
397 /// <p>The default is a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services Region.</p>
398 /// <p>Constraints:</p>
399 /// <ul>
400 /// <li>
401 /// <p>Must be in the format <code>hh24:mi-hh24:mi</code>.</p></li>
402 /// <li>
403 /// <p>Must be in Universal Coordinated Time (UTC).</p></li>
404 /// <li>
405 /// <p>Must not conflict with the preferred maintenance window.</p></li>
406 /// <li>
407 /// <p>Must be at least 30 minutes.</p></li>
408 /// </ul>
409 pub fn get_preferred_backup_window(&self) -> &::std::option::Option<::std::string::String> {
410 self.inner.get_preferred_backup_window()
411 }
412 /// <p>The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).</p>
413 /// <p>Format: <code>ddd:hh24:mi-ddd:hh24:mi</code></p>
414 /// <p>The default is 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>
415 /// <p>Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun</p>
416 /// <p>Constraints: Minimum 30-minute window.</p>
417 pub fn preferred_maintenance_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
418 self.inner = self.inner.preferred_maintenance_window(input.into());
419 self
420 }
421 /// <p>The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).</p>
422 /// <p>Format: <code>ddd:hh24:mi-ddd:hh24:mi</code></p>
423 /// <p>The default is 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>
424 /// <p>Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun</p>
425 /// <p>Constraints: Minimum 30-minute window.</p>
426 pub fn set_preferred_maintenance_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
427 self.inner = self.inner.set_preferred_maintenance_window(input);
428 self
429 }
430 /// <p>The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).</p>
431 /// <p>Format: <code>ddd:hh24:mi-ddd:hh24:mi</code></p>
432 /// <p>The default is 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>
433 /// <p>Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun</p>
434 /// <p>Constraints: Minimum 30-minute window.</p>
435 pub fn get_preferred_maintenance_window(&self) -> &::std::option::Option<::std::string::String> {
436 self.inner.get_preferred_maintenance_window()
437 }
438 ///
439 /// Appends an item to `Tags`.
440 ///
441 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
442 ///
443 /// <p>The tags to be assigned to the cluster.</p>
444 pub fn tags(mut self, input: crate::types::Tag) -> Self {
445 self.inner = self.inner.tags(input);
446 self
447 }
448 /// <p>The tags to be assigned to the cluster.</p>
449 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
450 self.inner = self.inner.set_tags(input);
451 self
452 }
453 /// <p>The tags to be assigned to the cluster.</p>
454 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
455 self.inner.get_tags()
456 }
457 /// <p>Specifies whether the cluster is encrypted.</p>
458 pub fn storage_encrypted(mut self, input: bool) -> Self {
459 self.inner = self.inner.storage_encrypted(input);
460 self
461 }
462 /// <p>Specifies whether the cluster is encrypted.</p>
463 pub fn set_storage_encrypted(mut self, input: ::std::option::Option<bool>) -> Self {
464 self.inner = self.inner.set_storage_encrypted(input);
465 self
466 }
467 /// <p>Specifies whether the cluster is encrypted.</p>
468 pub fn get_storage_encrypted(&self) -> &::std::option::Option<bool> {
469 self.inner.get_storage_encrypted()
470 }
471 /// <p>The KMS key identifier for an encrypted cluster.</p>
472 /// <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 Web Services account that owns the KMS encryption key that is used to encrypt the new cluster, you can use the KMS key alias instead of the ARN for the KMS encryption key.</p>
473 /// <p>If an encryption key is not specified in <code>KmsKeyId</code>:</p>
474 /// <ul>
475 /// <li>
476 /// <p>If the <code>StorageEncrypted</code> parameter is <code>true</code>, Amazon DocumentDB uses your default encryption key.</p></li>
477 /// </ul>
478 /// <p>KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services account has a different default encryption key for each Amazon Web Services Regions.</p>
479 pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
480 self.inner = self.inner.kms_key_id(input.into());
481 self
482 }
483 /// <p>The KMS key identifier for an encrypted cluster.</p>
484 /// <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 Web Services account that owns the KMS encryption key that is used to encrypt the new cluster, you can use the KMS key alias instead of the ARN for the KMS encryption key.</p>
485 /// <p>If an encryption key is not specified in <code>KmsKeyId</code>:</p>
486 /// <ul>
487 /// <li>
488 /// <p>If the <code>StorageEncrypted</code> parameter is <code>true</code>, Amazon DocumentDB uses your default encryption key.</p></li>
489 /// </ul>
490 /// <p>KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services account has a different default encryption key for each Amazon Web Services Regions.</p>
491 pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
492 self.inner = self.inner.set_kms_key_id(input);
493 self
494 }
495 /// <p>The KMS key identifier for an encrypted cluster.</p>
496 /// <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 Web Services account that owns the KMS encryption key that is used to encrypt the new cluster, you can use the KMS key alias instead of the ARN for the KMS encryption key.</p>
497 /// <p>If an encryption key is not specified in <code>KmsKeyId</code>:</p>
498 /// <ul>
499 /// <li>
500 /// <p>If the <code>StorageEncrypted</code> parameter is <code>true</code>, Amazon DocumentDB uses your default encryption key.</p></li>
501 /// </ul>
502 /// <p>KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services account has a different default encryption key for each Amazon Web Services Regions.</p>
503 pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
504 self.inner.get_kms_key_id()
505 }
506 /// <p>Not currently supported.</p>
507 pub fn pre_signed_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
508 self.inner = self.inner.pre_signed_url(input.into());
509 self
510 }
511 /// <p>Not currently supported.</p>
512 pub fn set_pre_signed_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
513 self.inner = self.inner.set_pre_signed_url(input);
514 self
515 }
516 /// <p>Not currently supported.</p>
517 pub fn get_pre_signed_url(&self) -> &::std::option::Option<::std::string::String> {
518 self.inner.get_pre_signed_url()
519 }
520 ///
521 /// Appends an item to `EnableCloudwatchLogsExports`.
522 ///
523 /// To override the contents of this collection use [`set_enable_cloudwatch_logs_exports`](Self::set_enable_cloudwatch_logs_exports).
524 ///
525 /// <p>A list of log types that need to be enabled for exporting to Amazon CloudWatch Logs. You can enable audit logs or profiler logs. For more information, see <a href="https://docs.aws.amazon.com/documentdb/latest/developerguide/event-auditing.html"> Auditing Amazon DocumentDB Events</a> and <a href="https://docs.aws.amazon.com/documentdb/latest/developerguide/profiling.html"> Profiling Amazon DocumentDB Operations</a>.</p>
526 pub fn enable_cloudwatch_logs_exports(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
527 self.inner = self.inner.enable_cloudwatch_logs_exports(input.into());
528 self
529 }
530 /// <p>A list of log types that need to be enabled for exporting to Amazon CloudWatch Logs. You can enable audit logs or profiler logs. For more information, see <a href="https://docs.aws.amazon.com/documentdb/latest/developerguide/event-auditing.html"> Auditing Amazon DocumentDB Events</a> and <a href="https://docs.aws.amazon.com/documentdb/latest/developerguide/profiling.html"> Profiling Amazon DocumentDB Operations</a>.</p>
531 pub fn set_enable_cloudwatch_logs_exports(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
532 self.inner = self.inner.set_enable_cloudwatch_logs_exports(input);
533 self
534 }
535 /// <p>A list of log types that need to be enabled for exporting to Amazon CloudWatch Logs. You can enable audit logs or profiler logs. For more information, see <a href="https://docs.aws.amazon.com/documentdb/latest/developerguide/event-auditing.html"> Auditing Amazon DocumentDB Events</a> and <a href="https://docs.aws.amazon.com/documentdb/latest/developerguide/profiling.html"> Profiling Amazon DocumentDB Operations</a>.</p>
536 pub fn get_enable_cloudwatch_logs_exports(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
537 self.inner.get_enable_cloudwatch_logs_exports()
538 }
539 /// <p>Specifies whether this cluster can be deleted. If <code>DeletionProtection</code> is enabled, the cluster cannot be deleted unless it is modified and <code>DeletionProtection</code> is disabled. <code>DeletionProtection</code> protects clusters from being accidentally deleted.</p>
540 pub fn deletion_protection(mut self, input: bool) -> Self {
541 self.inner = self.inner.deletion_protection(input);
542 self
543 }
544 /// <p>Specifies whether this cluster can be deleted. If <code>DeletionProtection</code> is enabled, the cluster cannot be deleted unless it is modified and <code>DeletionProtection</code> is disabled. <code>DeletionProtection</code> protects clusters from being accidentally deleted.</p>
545 pub fn set_deletion_protection(mut self, input: ::std::option::Option<bool>) -> Self {
546 self.inner = self.inner.set_deletion_protection(input);
547 self
548 }
549 /// <p>Specifies whether this cluster can be deleted. If <code>DeletionProtection</code> is enabled, the cluster cannot be deleted unless it is modified and <code>DeletionProtection</code> is disabled. <code>DeletionProtection</code> protects clusters from being accidentally deleted.</p>
550 pub fn get_deletion_protection(&self) -> &::std::option::Option<bool> {
551 self.inner.get_deletion_protection()
552 }
553 /// <p>The cluster identifier of the new global cluster.</p>
554 pub fn global_cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
555 self.inner = self.inner.global_cluster_identifier(input.into());
556 self
557 }
558 /// <p>The cluster identifier of the new global cluster.</p>
559 pub fn set_global_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
560 self.inner = self.inner.set_global_cluster_identifier(input);
561 self
562 }
563 /// <p>The cluster identifier of the new global cluster.</p>
564 pub fn get_global_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
565 self.inner.get_global_cluster_identifier()
566 }
567 /// <p>The storage type to associate with the DB cluster.</p>
568 /// <p>For information on storage types for Amazon DocumentDB clusters, see Cluster storage configurations in the <i>Amazon DocumentDB Developer Guide</i>.</p>
569 /// <p>Valid values for storage type - <code>standard | iopt1</code></p>
570 /// <p>Default value is <code>standard </code></p><note>
571 /// <p>When you create an Amazon DocumentDB cluster with the storage type set to <code>iopt1</code>, the storage type is returned in the response. The storage type isn't returned when you set it to <code>standard</code>.</p>
572 /// </note>
573 pub fn storage_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
574 self.inner = self.inner.storage_type(input.into());
575 self
576 }
577 /// <p>The storage type to associate with the DB cluster.</p>
578 /// <p>For information on storage types for Amazon DocumentDB clusters, see Cluster storage configurations in the <i>Amazon DocumentDB Developer Guide</i>.</p>
579 /// <p>Valid values for storage type - <code>standard | iopt1</code></p>
580 /// <p>Default value is <code>standard </code></p><note>
581 /// <p>When you create an Amazon DocumentDB cluster with the storage type set to <code>iopt1</code>, the storage type is returned in the response. The storage type isn't returned when you set it to <code>standard</code>.</p>
582 /// </note>
583 pub fn set_storage_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
584 self.inner = self.inner.set_storage_type(input);
585 self
586 }
587 /// <p>The storage type to associate with the DB cluster.</p>
588 /// <p>For information on storage types for Amazon DocumentDB clusters, see Cluster storage configurations in the <i>Amazon DocumentDB Developer Guide</i>.</p>
589 /// <p>Valid values for storage type - <code>standard | iopt1</code></p>
590 /// <p>Default value is <code>standard </code></p><note>
591 /// <p>When you create an Amazon DocumentDB cluster with the storage type set to <code>iopt1</code>, the storage type is returned in the response. The storage type isn't returned when you set it to <code>standard</code>.</p>
592 /// </note>
593 pub fn get_storage_type(&self) -> &::std::option::Option<::std::string::String> {
594 self.inner.get_storage_type()
595 }
596 /// <p>Contains the scaling configuration of an Amazon DocumentDB Serverless cluster.</p>
597 pub fn serverless_v2_scaling_configuration(mut self, input: crate::types::ServerlessV2ScalingConfiguration) -> Self {
598 self.inner = self.inner.serverless_v2_scaling_configuration(input);
599 self
600 }
601 /// <p>Contains the scaling configuration of an Amazon DocumentDB Serverless cluster.</p>
602 pub fn set_serverless_v2_scaling_configuration(mut self, input: ::std::option::Option<crate::types::ServerlessV2ScalingConfiguration>) -> Self {
603 self.inner = self.inner.set_serverless_v2_scaling_configuration(input);
604 self
605 }
606 /// <p>Contains the scaling configuration of an Amazon DocumentDB Serverless cluster.</p>
607 pub fn get_serverless_v2_scaling_configuration(&self) -> &::std::option::Option<crate::types::ServerlessV2ScalingConfiguration> {
608 self.inner.get_serverless_v2_scaling_configuration()
609 }
610 /// <p>Specifies whether to manage the master user password with Amazon Web Services Secrets Manager.</p>
611 /// <p>Constraint: You can't manage the master user password with Amazon Web Services Secrets Manager if <code>MasterUserPassword</code> is specified.</p>
612 pub fn manage_master_user_password(mut self, input: bool) -> Self {
613 self.inner = self.inner.manage_master_user_password(input);
614 self
615 }
616 /// <p>Specifies whether to manage the master user password with Amazon Web Services Secrets Manager.</p>
617 /// <p>Constraint: You can't manage the master user password with Amazon Web Services Secrets Manager if <code>MasterUserPassword</code> is specified.</p>
618 pub fn set_manage_master_user_password(mut self, input: ::std::option::Option<bool>) -> Self {
619 self.inner = self.inner.set_manage_master_user_password(input);
620 self
621 }
622 /// <p>Specifies whether to manage the master user password with Amazon Web Services Secrets Manager.</p>
623 /// <p>Constraint: You can't manage the master user password with Amazon Web Services Secrets Manager if <code>MasterUserPassword</code> is specified.</p>
624 pub fn get_manage_master_user_password(&self) -> &::std::option::Option<bool> {
625 self.inner.get_manage_master_user_password()
626 }
627 /// <p>The Amazon Web Services KMS key identifier to encrypt a secret that is automatically generated and managed in Amazon Web Services Secrets Manager. This setting is valid only if the master user password is managed by Amazon DocumentDB in Amazon Web Services Secrets Manager for the DB cluster.</p>
628 /// <p>The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.</p>
629 /// <p>If you don't specify <code>MasterUserSecretKmsKeyId</code>, then the <code>aws/secretsmanager</code> KMS key is used to encrypt the secret. If the secret is in a different Amazon Web Services account, then you can't use the <code>aws/secretsmanager</code> KMS key to encrypt the secret, and you must use a customer managed KMS key.</p>
630 /// <p>There is a default KMS key for your Amazon Web Services account. Your Amazon Web Services account has a different default KMS key for each Amazon Web Services Region.</p>
631 pub fn master_user_secret_kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
632 self.inner = self.inner.master_user_secret_kms_key_id(input.into());
633 self
634 }
635 /// <p>The Amazon Web Services KMS key identifier to encrypt a secret that is automatically generated and managed in Amazon Web Services Secrets Manager. This setting is valid only if the master user password is managed by Amazon DocumentDB in Amazon Web Services Secrets Manager for the DB cluster.</p>
636 /// <p>The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.</p>
637 /// <p>If you don't specify <code>MasterUserSecretKmsKeyId</code>, then the <code>aws/secretsmanager</code> KMS key is used to encrypt the secret. If the secret is in a different Amazon Web Services account, then you can't use the <code>aws/secretsmanager</code> KMS key to encrypt the secret, and you must use a customer managed KMS key.</p>
638 /// <p>There is a default KMS key for your Amazon Web Services account. Your Amazon Web Services account has a different default KMS key for each Amazon Web Services Region.</p>
639 pub fn set_master_user_secret_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
640 self.inner = self.inner.set_master_user_secret_kms_key_id(input);
641 self
642 }
643 /// <p>The Amazon Web Services KMS key identifier to encrypt a secret that is automatically generated and managed in Amazon Web Services Secrets Manager. This setting is valid only if the master user password is managed by Amazon DocumentDB in Amazon Web Services Secrets Manager for the DB cluster.</p>
644 /// <p>The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.</p>
645 /// <p>If you don't specify <code>MasterUserSecretKmsKeyId</code>, then the <code>aws/secretsmanager</code> KMS key is used to encrypt the secret. If the secret is in a different Amazon Web Services account, then you can't use the <code>aws/secretsmanager</code> KMS key to encrypt the secret, and you must use a customer managed KMS key.</p>
646 /// <p>There is a default KMS key for your Amazon Web Services account. Your Amazon Web Services account has a different default KMS key for each Amazon Web Services Region.</p>
647 pub fn get_master_user_secret_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
648 self.inner.get_master_user_secret_kms_key_id()
649 }
650 /// <p>The network type of the cluster.</p>
651 /// <p>The network type is determined by the <code>DBSubnetGroup</code> specified for the cluster. A <code>DBSubnetGroup</code> can support only the IPv4 protocol or the IPv4 and the IPv6 protocols (<code>DUAL</code>).</p>
652 /// <p>For more information, see <a href="https://docs.aws.amazon.com/documentdb/latest/developerguide/vpc-clusters.html">DocumentDB clusters in a VPC</a> in the Amazon DocumentDB Developer Guide.</p>
653 /// <p>Valid Values: <code>IPV4</code> | <code>DUAL</code></p>
654 pub fn network_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
655 self.inner = self.inner.network_type(input.into());
656 self
657 }
658 /// <p>The network type of the cluster.</p>
659 /// <p>The network type is determined by the <code>DBSubnetGroup</code> specified for the cluster. A <code>DBSubnetGroup</code> can support only the IPv4 protocol or the IPv4 and the IPv6 protocols (<code>DUAL</code>).</p>
660 /// <p>For more information, see <a href="https://docs.aws.amazon.com/documentdb/latest/developerguide/vpc-clusters.html">DocumentDB clusters in a VPC</a> in the Amazon DocumentDB Developer Guide.</p>
661 /// <p>Valid Values: <code>IPV4</code> | <code>DUAL</code></p>
662 pub fn set_network_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
663 self.inner = self.inner.set_network_type(input);
664 self
665 }
666 /// <p>The network type of the cluster.</p>
667 /// <p>The network type is determined by the <code>DBSubnetGroup</code> specified for the cluster. A <code>DBSubnetGroup</code> can support only the IPv4 protocol or the IPv4 and the IPv6 protocols (<code>DUAL</code>).</p>
668 /// <p>For more information, see <a href="https://docs.aws.amazon.com/documentdb/latest/developerguide/vpc-clusters.html">DocumentDB clusters in a VPC</a> in the Amazon DocumentDB Developer Guide.</p>
669 /// <p>Valid Values: <code>IPV4</code> | <code>DUAL</code></p>
670 pub fn get_network_type(&self) -> &::std::option::Option<::std::string::String> {
671 self.inner.get_network_type()
672 }
673}