aws_sdk_efs/client/
create_file_system.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 [`CreateFileSystem`](crate::operation::create_file_system::builders::CreateFileSystemFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`creation_token(impl Into<String>)`](crate::operation::create_file_system::builders::CreateFileSystemFluentBuilder::creation_token) / [`set_creation_token(Option<String>)`](crate::operation::create_file_system::builders::CreateFileSystemFluentBuilder::set_creation_token):<br>required: **true**<br><p>A string of up to 64 ASCII characters. Amazon EFS uses this to ensure idempotent creation.</p><br>
7    ///   - [`performance_mode(PerformanceMode)`](crate::operation::create_file_system::builders::CreateFileSystemFluentBuilder::performance_mode) / [`set_performance_mode(Option<PerformanceMode>)`](crate::operation::create_file_system::builders::CreateFileSystemFluentBuilder::set_performance_mode):<br>required: **false**<br><p>The performance mode of the file system. We recommend <code>generalPurpose</code> performance mode for all file systems. File systems using the <code>maxIO</code> performance mode can scale to higher levels of aggregate throughput and operations per second with a tradeoff of slightly higher latencies for most file operations. The performance mode can't be changed after the file system has been created. The <code>maxIO</code> mode is not supported on One Zone file systems.</p><important>  <p>Due to the higher per-operation latencies with Max I/O, we recommend using General Purpose performance mode for all file systems.</p> </important> <p>Default is <code>generalPurpose</code>.</p><br>
8    ///   - [`encrypted(bool)`](crate::operation::create_file_system::builders::CreateFileSystemFluentBuilder::encrypted) / [`set_encrypted(Option<bool>)`](crate::operation::create_file_system::builders::CreateFileSystemFluentBuilder::set_encrypted):<br>required: **false**<br><p>A Boolean value that, if true, creates an encrypted file system. When creating an encrypted file system, you have the option of specifying an existing Key Management Service key (KMS key). If you don't specify a KMS key, then the default KMS key for Amazon EFS, <code>/aws/elasticfilesystem</code>, is used to protect the encrypted file system.</p><br>
9    ///   - [`kms_key_id(impl Into<String>)`](crate::operation::create_file_system::builders::CreateFileSystemFluentBuilder::kms_key_id) / [`set_kms_key_id(Option<String>)`](crate::operation::create_file_system::builders::CreateFileSystemFluentBuilder::set_kms_key_id):<br>required: **false**<br><p>The ID of the KMS key that you want to use to protect the encrypted file system. This parameter is required only if you want to use a non-default KMS key. If this parameter is not specified, the default KMS key for Amazon EFS is used. You can specify a KMS key ID using the following formats:</p> <ul>  <li>   <p>Key ID - A unique identifier of the key, for example <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>.</p></li>  <li>   <p>ARN - An Amazon Resource Name (ARN) for the key, for example <code>arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>.</p></li>  <li>   <p>Key alias - A previously created display name for a key, for example <code>alias/projectKey1</code>.</p></li>  <li>   <p>Key alias ARN - An ARN for a key alias, for example <code>arn:aws:kms:us-west-2:444455556666:alias/projectKey1</code>.</p></li> </ul> <p>If you use <code>KmsKeyId</code>, you must set the <code>CreateFileSystemRequest$Encrypted</code> parameter to true.</p><important>  <p>EFS accepts only symmetric KMS keys. You cannot use asymmetric KMS keys with Amazon EFS file systems.</p> </important><br>
10    ///   - [`throughput_mode(ThroughputMode)`](crate::operation::create_file_system::builders::CreateFileSystemFluentBuilder::throughput_mode) / [`set_throughput_mode(Option<ThroughputMode>)`](crate::operation::create_file_system::builders::CreateFileSystemFluentBuilder::set_throughput_mode):<br>required: **false**<br><p>Specifies the throughput mode for the file system. The mode can be <code>bursting</code>, <code>provisioned</code>, or <code>elastic</code>. If you set <code>ThroughputMode</code> to <code>provisioned</code>, you must also set a value for <code>ProvisionedThroughputInMibps</code>. After you create the file system, you can decrease your file system's Provisioned throughput or change between the throughput modes, with certain time restrictions. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/performance.html#provisioned-throughput">Specifying throughput with provisioned mode</a> in the <i>Amazon EFS User Guide</i>.</p> <p>Default is <code>bursting</code>.</p><br>
11    ///   - [`provisioned_throughput_in_mibps(f64)`](crate::operation::create_file_system::builders::CreateFileSystemFluentBuilder::provisioned_throughput_in_mibps) / [`set_provisioned_throughput_in_mibps(Option<f64>)`](crate::operation::create_file_system::builders::CreateFileSystemFluentBuilder::set_provisioned_throughput_in_mibps):<br>required: **false**<br><p>The throughput, measured in mebibytes per second (MiBps), that you want to provision for a file system that you're creating. Required if <code>ThroughputMode</code> is set to <code>provisioned</code>. Valid values are 1-3414 MiBps, with the upper limit depending on Region. To increase this limit, contact Amazon Web ServicesSupport. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits">Amazon EFS quotas that you can increase</a> in the <i>Amazon EFS User Guide</i>.</p><br>
12    ///   - [`availability_zone_name(impl Into<String>)`](crate::operation::create_file_system::builders::CreateFileSystemFluentBuilder::availability_zone_name) / [`set_availability_zone_name(Option<String>)`](crate::operation::create_file_system::builders::CreateFileSystemFluentBuilder::set_availability_zone_name):<br>required: **false**<br><p>For One Zone file systems, specify the Amazon Web Services Availability Zone in which to create the file system. Use the format <code>us-east-1a</code> to specify the Availability Zone. For more information about One Zone file systems, see <a href="https://docs.aws.amazon.com/efs/latest/ug/availability-durability.html#file-system-type">EFS file system types</a> in the <i>Amazon EFS User Guide</i>.</p><note>  <p>One Zone file systems are not available in all Availability Zones in Amazon Web Services Regions where Amazon EFS is available.</p> </note><br>
13    ///   - [`backup(bool)`](crate::operation::create_file_system::builders::CreateFileSystemFluentBuilder::backup) / [`set_backup(Option<bool>)`](crate::operation::create_file_system::builders::CreateFileSystemFluentBuilder::set_backup):<br>required: **false**<br><p>Specifies whether automatic backups are enabled on the file system that you are creating. Set the value to <code>true</code> to enable automatic backups. If you are creating a One Zone file system, automatic backups are enabled by default. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#automatic-backups">Automatic backups</a> in the <i>Amazon EFS User Guide</i>.</p> <p>Default is <code>false</code>. However, if you specify an <code>AvailabilityZoneName</code>, the default is <code>true</code>.</p><note>  <p>Backup is not available in all Amazon Web Services Regions where Amazon EFS is available.</p> </note><br>
14    ///   - [`tags(Tag)`](crate::operation::create_file_system::builders::CreateFileSystemFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_file_system::builders::CreateFileSystemFluentBuilder::set_tags):<br>required: **false**<br><p>Use to create one or more tags associated with the file system. Each tag is a user-defined key-value pair. Name your file system on creation by including a <code>"Key":"Name","Value":"{value}"</code> key-value pair. Each key must be unique. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon Web Services General Reference Guide</i>.</p><br>
15    /// - On success, responds with [`CreateFileSystemOutput`](crate::operation::create_file_system::CreateFileSystemOutput) with field(s):
16    ///   - [`owner_id(String)`](crate::operation::create_file_system::CreateFileSystemOutput::owner_id): <p>The Amazon Web Services account that created the file system.</p>
17    ///   - [`creation_token(String)`](crate::operation::create_file_system::CreateFileSystemOutput::creation_token): <p>The opaque string specified in the request.</p>
18    ///   - [`file_system_id(String)`](crate::operation::create_file_system::CreateFileSystemOutput::file_system_id): <p>The ID of the file system, assigned by Amazon EFS.</p>
19    ///   - [`file_system_arn(Option<String>)`](crate::operation::create_file_system::CreateFileSystemOutput::file_system_arn): <p>The Amazon Resource Name (ARN) for the EFS file system, in the format <code>arn:aws:elasticfilesystem:<i>region</i>:<i>account-id</i>:file-system/<i>file-system-id</i> </code>. Example with sample data: <code>arn:aws:elasticfilesystem:us-west-2:1111333322228888:file-system/fs-01234567</code></p>
20    ///   - [`creation_time(DateTime)`](crate::operation::create_file_system::CreateFileSystemOutput::creation_time): <p>The time that the file system was created, in seconds (since 1970-01-01T00:00:00Z).</p>
21    ///   - [`life_cycle_state(LifeCycleState)`](crate::operation::create_file_system::CreateFileSystemOutput::life_cycle_state): <p>The lifecycle phase of the file system.</p>
22    ///   - [`name(Option<String>)`](crate::operation::create_file_system::CreateFileSystemOutput::name): <p>You can add tags to a file system, including a <code>Name</code> tag. For more information, see <code>CreateFileSystem</code>. If the file system has a <code>Name</code> tag, Amazon EFS returns the value in this field.</p>
23    ///   - [`number_of_mount_targets(i32)`](crate::operation::create_file_system::CreateFileSystemOutput::number_of_mount_targets): <p>The current number of mount targets that the file system has. For more information, see <code>CreateMountTarget</code>.</p>
24    ///   - [`size_in_bytes(Option<FileSystemSize>)`](crate::operation::create_file_system::CreateFileSystemOutput::size_in_bytes): <p>The latest known metered size (in bytes) of data stored in the file system, in its <code>Value</code> field, and the time at which that size was determined in its <code>Timestamp</code> field. The <code>Timestamp</code> value is the integer number of seconds since 1970-01-01T00:00:00Z. The <code>SizeInBytes</code> value doesn't represent the size of a consistent snapshot of the file system, but it is eventually consistent when there are no writes to the file system. That is, <code>SizeInBytes</code> represents actual size only if the file system is not modified for a period longer than a couple of hours. Otherwise, the value is not the exact size that the file system was at any point in time.</p>
25    ///   - [`performance_mode(PerformanceMode)`](crate::operation::create_file_system::CreateFileSystemOutput::performance_mode): <p>The performance mode of the file system.</p>
26    ///   - [`encrypted(Option<bool>)`](crate::operation::create_file_system::CreateFileSystemOutput::encrypted): <p>A Boolean value that, if true, indicates that the file system is encrypted.</p>
27    ///   - [`kms_key_id(Option<String>)`](crate::operation::create_file_system::CreateFileSystemOutput::kms_key_id): <p>The ID of an KMS key used to protect the encrypted file system.</p>
28    ///   - [`throughput_mode(Option<ThroughputMode>)`](crate::operation::create_file_system::CreateFileSystemOutput::throughput_mode): <p>Displays the file system's throughput mode. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/performance.html#throughput-modes">Throughput modes</a> in the <i>Amazon EFS User Guide</i>.</p>
29    ///   - [`provisioned_throughput_in_mibps(Option<f64>)`](crate::operation::create_file_system::CreateFileSystemOutput::provisioned_throughput_in_mibps): <p>The amount of provisioned throughput, measured in MiBps, for the file system. Valid for file systems using <code>ThroughputMode</code> set to <code>provisioned</code>.</p>
30    ///   - [`availability_zone_name(Option<String>)`](crate::operation::create_file_system::CreateFileSystemOutput::availability_zone_name): <p>Describes the Amazon Web Services Availability Zone in which the file system is located, and is valid only for One Zone file systems. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/storage-classes.html">Using EFS storage classes</a> in the <i>Amazon EFS User Guide</i>.</p>
31    ///   - [`availability_zone_id(Option<String>)`](crate::operation::create_file_system::CreateFileSystemOutput::availability_zone_id): <p>The unique and consistent identifier of the Availability Zone in which the file system is located, and is valid only for One Zone file systems. For example, <code>use1-az1</code> is an Availability Zone ID for the us-east-1 Amazon Web Services Region, and it has the same location in every Amazon Web Services account.</p>
32    ///   - [`tags(Vec::<Tag>)`](crate::operation::create_file_system::CreateFileSystemOutput::tags): <p>The tags associated with the file system, presented as an array of <code>Tag</code> objects.</p>
33    ///   - [`file_system_protection(Option<FileSystemProtectionDescription>)`](crate::operation::create_file_system::CreateFileSystemOutput::file_system_protection): <p>Describes the protection on the file system.</p>
34    /// - On failure, responds with [`SdkError<CreateFileSystemError>`](crate::operation::create_file_system::CreateFileSystemError)
35    pub fn create_file_system(&self) -> crate::operation::create_file_system::builders::CreateFileSystemFluentBuilder {
36        crate::operation::create_file_system::builders::CreateFileSystemFluentBuilder::new(self.handle.clone())
37    }
38}