aws_sdk_cloudhsmv2/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    ///   - [`backup_retention_policy(BackupRetentionPolicy)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::backup_retention_policy) / [`set_backup_retention_policy(Option<BackupRetentionPolicy>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::set_backup_retention_policy):<br>required: **false**<br><p>A policy that defines how the service retains backups.</p><br>
7    ///   - [`hsm_type(impl Into<String>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::hsm_type) / [`set_hsm_type(Option<String>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::set_hsm_type):<br>required: **true**<br><p>The type of HSM to use in the cluster. The allowed values are <code>hsm1.medium</code> and <code>hsm2m.medium</code>.</p><br>
8    ///   - [`source_backup_id(impl Into<String>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::source_backup_id) / [`set_source_backup_id(Option<String>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::set_source_backup_id):<br>required: **false**<br><p>The identifier (ID) or the Amazon Resource Name (ARN) of the cluster backup to restore. Use this value to restore the cluster from a backup instead of creating a new cluster. To find the backup ID or ARN, use <code>DescribeBackups</code>. <i>If using a backup in another account, the full ARN must be supplied.</i></p><br>
9    ///   - [`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: **true**<br><p>The identifiers (IDs) of the subnets where you are creating the cluster. You must specify at least one subnet. If you specify multiple subnets, they must meet the following criteria:</p> <ul>  <li>   <p>All subnets must be in the same virtual private cloud (VPC).</p></li>  <li>   <p>You can specify only one subnet per Availability Zone.</p></li> </ul><br>
10    ///   - [`network_type(NetworkType)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::network_type) / [`set_network_type(Option<NetworkType>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::set_network_type):<br>required: **false**<br><p>The NetworkType to create a cluster with. The allowed values are <code>IPV4</code> and <code>DUALSTACK</code>.</p><br>
11    ///   - [`tag_list(Tag)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::tag_list) / [`set_tag_list(Option<Vec::<Tag>>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::set_tag_list):<br>required: **false**<br><p>Tags to apply to the CloudHSM cluster during creation.</p><br>
12    ///   - [`mode(ClusterMode)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::mode) / [`set_mode(Option<ClusterMode>)`](crate::operation::create_cluster::builders::CreateClusterFluentBuilder::set_mode):<br>required: **false**<br><p>The mode to use in the cluster. The allowed values are <code>FIPS</code> and <code>NON_FIPS</code>.</p><br>
13    /// - On success, responds with [`CreateClusterOutput`](crate::operation::create_cluster::CreateClusterOutput) with field(s):
14    ///   - [`cluster(Option<Cluster>)`](crate::operation::create_cluster::CreateClusterOutput::cluster): <p>Information about the cluster that was created.</p>
15    /// - On failure, responds with [`SdkError<CreateClusterError>`](crate::operation::create_cluster::CreateClusterError)
16    pub fn create_cluster(&self) -> crate::operation::create_cluster::builders::CreateClusterFluentBuilder {
17        crate::operation::create_cluster::builders::CreateClusterFluentBuilder::new(self.handle.clone())
18    }
19}