1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreateFileCache`](crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`client_request_token(impl Into<String>)`](crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder::client_request_token) / [`set_client_request_token(Option<String>)`](crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder::set_client_request_token):<br>required: **false**<br><p>An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.</p> <p>By using the idempotent operation, you can retry a <code>CreateFileCache</code> operation without the risk of creating an extra cache. This approach can be useful when an initial call fails in a way that makes it unclear whether a cache was created. Examples are if a transport level timeout occurred, or your connection was reset. If you use the same client request token and the initial call created a cache, the client receives success as long as the parameters are the same.</p><br>
    ///   - [`file_cache_type(FileCacheType)`](crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder::file_cache_type) / [`set_file_cache_type(Option<FileCacheType>)`](crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder::set_file_cache_type):<br>required: **true**<br><p>The type of cache that you're creating, which must be <code>LUSTRE</code>.</p><br>
    ///   - [`file_cache_type_version(impl Into<String>)`](crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder::file_cache_type_version) / [`set_file_cache_type_version(Option<String>)`](crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder::set_file_cache_type_version):<br>required: **true**<br><p>Sets the Lustre version for the cache that you're creating, which must be <code>2.12</code>.</p><br>
    ///   - [`storage_capacity(i32)`](crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder::storage_capacity) / [`set_storage_capacity(Option<i32>)`](crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder::set_storage_capacity):<br>required: **true**<br><p>The storage capacity of the cache in gibibytes (GiB). Valid values are 1200 GiB, 2400 GiB, and increments of 2400 GiB.</p><br>
    ///   - [`subnet_ids(impl Into<String>)`](crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder::subnet_ids) / [`set_subnet_ids(Option<Vec::<String>>)`](crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder::set_subnet_ids):<br>required: **true**<br><p>A list of subnet IDs that the cache will be accessible from. You can specify only one subnet ID in a call to the <code>CreateFileCache</code> operation.</p><br>
    ///   - [`security_group_ids(impl Into<String>)`](crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder::security_group_ids) / [`set_security_group_ids(Option<Vec::<String>>)`](crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder::set_security_group_ids):<br>required: **false**<br><p>A list of IDs specifying the security groups to apply to all network interfaces created for Amazon File Cache access. This list isn't returned in later requests to describe the cache.</p><br>
    ///   - [`tags(Tag)`](crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder::set_tags):<br>required: **false**<br><p>A list of <code>Tag</code> values, with a maximum of 50 elements.</p><br>
    ///   - [`copy_tags_to_data_repository_associations(bool)`](crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder::copy_tags_to_data_repository_associations) / [`set_copy_tags_to_data_repository_associations(Option<bool>)`](crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder::set_copy_tags_to_data_repository_associations):<br>required: **false**<br><p>A boolean flag indicating whether tags for the cache should be copied to data repository associations. This value defaults to false.</p><br>
    ///   - [`kms_key_id(impl Into<String>)`](crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder::kms_key_id) / [`set_kms_key_id(Option<String>)`](crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder::set_kms_key_id):<br>required: **false**<br><p>Specifies the ID of the Key Management Service (KMS) key to use for encrypting data on an Amazon File Cache. If a <code>KmsKeyId</code> isn't specified, the Amazon FSx-managed KMS key for your account is used. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html">Encrypt</a> in the <i>Key Management Service API Reference</i>.</p><br>
    ///   - [`lustre_configuration(CreateFileCacheLustreConfiguration)`](crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder::lustre_configuration) / [`set_lustre_configuration(Option<CreateFileCacheLustreConfiguration>)`](crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder::set_lustre_configuration):<br>required: **false**<br><p>The configuration for the Amazon File Cache resource being created.</p><br>
    ///   - [`data_repository_associations(FileCacheDataRepositoryAssociation)`](crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder::data_repository_associations) / [`set_data_repository_associations(Option<Vec::<FileCacheDataRepositoryAssociation>>)`](crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder::set_data_repository_associations):<br>required: **false**<br><p>A list of up to 8 configurations for data repository associations (DRAs) to be created during the cache creation. The DRAs link the cache to either an Amazon S3 data repository or a Network File System (NFS) data repository that supports the NFSv3 protocol.</p> <p>The DRA configurations must meet the following requirements:</p> <ul>  <li>   <p>All configurations on the list must be of the same data repository type, either all S3 or all NFS. A cache can't link to different data repository types at the same time.</p></li>  <li>   <p>An NFS DRA must link to an NFS file system that supports the NFSv3 protocol.</p></li> </ul> <p>DRA automatic import and automatic export is not supported.</p><br>
    /// - On success, responds with [`CreateFileCacheOutput`](crate::operation::create_file_cache::CreateFileCacheOutput) with field(s):
    ///   - [`file_cache(Option<FileCacheCreating>)`](crate::operation::create_file_cache::CreateFileCacheOutput::file_cache): <p>A description of the cache that was created.</p>
    /// - On failure, responds with [`SdkError<CreateFileCacheError>`](crate::operation::create_file_cache::CreateFileCacheError)
    pub fn create_file_cache(&self) -> crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder {
        crate::operation::create_file_cache::builders::CreateFileCacheFluentBuilder::new(self.handle.clone())
    }
}