aws_sdk_docdbelastic/client/create_cluster.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`CreateCluster`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`cluster_name(impl Into<String>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::cluster_name) / [`set_cluster_name(Option<String>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::set_cluster_name):<br>required: **true**<br><p>The name of the new elastic cluster. This parameter is stored as a lowercase string.</p> <p><i>Constraints</i>:</p> <ul> <li> <p>Must contain from 1 to 63 letters, numbers, or hyphens.</p></li> <li> <p>The first character must be a letter.</p></li> <li> <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li> </ul> <p><i>Example</i>: <code>my-cluster</code></p><br>
7 /// - [`auth_type(Auth)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::auth_type) / [`set_auth_type(Option<Auth>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::set_auth_type):<br>required: **true**<br><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><br>
8 /// - [`admin_user_name(impl Into<String>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::admin_user_name) / [`set_admin_user_name(Option<String>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::set_admin_user_name):<br>required: **true**<br><p>The name of the Amazon DocumentDB elastic clusters administrator.</p> <p><i>Constraints</i>:</p> <ul> <li> <p>Must be from 1 to 63 letters or numbers.</p></li> <li> <p>The first character must be a letter.</p></li> <li> <p>Cannot be a reserved word.</p></li> </ul><br>
9 /// - [`admin_user_password(impl Into<String>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::admin_user_password) / [`set_admin_user_password(Option<String>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::set_admin_user_password):<br>required: **true**<br><p>The password for the Amazon DocumentDB elastic clusters administrator. The password can contain any printable ASCII characters.</p> <p><i>Constraints</i>:</p> <ul> <li> <p>Must contain from 8 to 100 characters.</p></li> <li> <p>Cannot contain a forward slash (/), double quote ("), or the "at" symbol (@).</p></li> </ul><br>
10 /// - [`shard_capacity(i32)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::shard_capacity) / [`set_shard_capacity(Option<i32>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::set_shard_capacity):<br>required: **true**<br><p>The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32, 64.</p><br>
11 /// - [`shard_count(i32)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::shard_count) / [`set_shard_count(Option<i32>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::set_shard_count):<br>required: **true**<br><p>The number of shards assigned to the elastic cluster. Maximum is 32.</p><br>
12 /// - [`vpc_security_group_ids(impl Into<String>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::vpc_security_group_ids) / [`set_vpc_security_group_ids(Option<Vec::<String>>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::set_vpc_security_group_ids):<br>required: **false**<br><p>A list of EC2 VPC security groups to associate with the new elastic cluster.</p><br>
13 /// - [`subnet_ids(impl Into<String>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::subnet_ids) / [`set_subnet_ids(Option<Vec::<String>>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::set_subnet_ids):<br>required: **false**<br><p>The Amazon EC2 subnet IDs for the new elastic cluster.</p><br>
14 /// - [`kms_key_id(impl Into<String>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::kms_key_id) / [`set_kms_key_id(Option<String>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::set_kms_key_id):<br>required: **false**<br><p>The KMS key identifier to use to encrypt the new elastic cluster.</p> <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> <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><br>
15 /// - [`client_token(impl Into<String>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::set_client_token):<br>required: **false**<br><p>The client token for the elastic cluster.</p><br>
16 /// - [`preferred_maintenance_window(impl Into<String>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::preferred_maintenance_window) / [`set_preferred_maintenance_window(Option<String>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::set_preferred_maintenance_window):<br>required: **false**<br><p>The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).</p> <p><i>Format</i>: <code>ddd:hh24:mi-ddd:hh24:mi</code></p> <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> <p><i>Valid days</i>: Mon, Tue, Wed, Thu, Fri, Sat, Sun</p> <p><i>Constraints</i>: Minimum 30-minute window.</p><br>
17 /// - [`tags(impl Into<String>, impl Into<String>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::tags) / [`set_tags(Option<HashMap::<String, String>>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::set_tags):<br>required: **false**<br><p>The tags to be assigned to the new elastic cluster.</p><br>
18 /// - [`backup_retention_period(i32)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::backup_retention_period) / [`set_backup_retention_period(Option<i32>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::set_backup_retention_period):<br>required: **false**<br><p>The number of days for which automatic snapshots are retained.</p><br>
19 /// - [`preferred_backup_window(impl Into<String>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::preferred_backup_window) / [`set_preferred_backup_window(Option<String>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::set_preferred_backup_window):<br>required: **false**<br><p>The daily time range during which automated backups are created if automated backups are enabled, as determined by the <code>backupRetentionPeriod</code>.</p><br>
20 /// - [`shard_instance_count(i32)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::shard_instance_count) / [`set_shard_instance_count(Option<i32>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::set_shard_instance_count):<br>required: **false**<br><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><br>
21 /// - On success, responds with [`CreateClusterOutput`](crate::operation::create_cluster::CreateClusterOutput) with field(s):
22 /// - [`cluster(Option<Cluster>)`](crate::operation::create_cluster::CreateClusterOutput::cluster): <p>The new elastic cluster that has been created.</p>
23 /// - On failure, responds with [`SdkError<CreateClusterError>`](crate::operation::create_cluster::CreateClusterError)
24 pub fn create_cluster(&self) -> crate::operation::create_cluster::builders::CreateClusterFluentBuilder {
25 crate::operation::create_cluster::builders::CreateClusterFluentBuilder::new(self.handle.clone())
26 }
27}