aws-sdk-efs 0.27.0

AWS SDK for Amazon Elastic File System
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A description of the file system.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateFileSystemOutput {
    /// <p>The Amazon Web Services account that created the file system.</p>
    #[doc(hidden)]
    pub owner_id: std::option::Option<std::string::String>,
    /// <p>The opaque string specified in the request.</p>
    #[doc(hidden)]
    pub creation_token: std::option::Option<std::string::String>,
    /// <p>The ID of the file system, assigned by Amazon EFS.</p>
    #[doc(hidden)]
    pub file_system_id: std::option::Option<std::string::String>,
    /// <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>
    #[doc(hidden)]
    pub file_system_arn: std::option::Option<std::string::String>,
    /// <p>The time that the file system was created, in seconds (since 1970-01-01T00:00:00Z).</p>
    #[doc(hidden)]
    pub creation_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The lifecycle phase of the file system.</p>
    #[doc(hidden)]
    pub life_cycle_state: std::option::Option<crate::types::LifeCycleState>,
    /// <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>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>The current number of mount targets that the file system has. For more information, see <code>CreateMountTarget</code>.</p>
    #[doc(hidden)]
    pub number_of_mount_targets: i32,
    /// <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>
    #[doc(hidden)]
    pub size_in_bytes: std::option::Option<crate::types::FileSystemSize>,
    /// <p>The performance mode of the file system.</p>
    #[doc(hidden)]
    pub performance_mode: std::option::Option<crate::types::PerformanceMode>,
    /// <p>A Boolean value that, if true, indicates that the file system is encrypted.</p>
    #[doc(hidden)]
    pub encrypted: std::option::Option<bool>,
    /// <p>The ID of an KMS key used to protect the encrypted file system.</p>
    #[doc(hidden)]
    pub kms_key_id: std::option::Option<std::string::String>,
    /// <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>
    #[doc(hidden)]
    pub throughput_mode: std::option::Option<crate::types::ThroughputMode>,
    /// <p>The amount of provisioned throughput, measured in MiB/s, for the file system. Valid for file systems using <code>ThroughputMode</code> set to <code>provisioned</code>.</p>
    #[doc(hidden)]
    pub provisioned_throughput_in_mibps: std::option::Option<f64>,
    /// <p>Describes the Amazon Web Services Availability Zone in which the file system is located, and is valid only for file systems using One Zone storage classes. 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>
    #[doc(hidden)]
    pub availability_zone_name: std::option::Option<std::string::String>,
    /// <p>The unique and consistent identifier of the Availability Zone in which the file system's One Zone storage classes exist. 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>
    #[doc(hidden)]
    pub availability_zone_id: std::option::Option<std::string::String>,
    /// <p>The tags associated with the file system, presented as an array of <code>Tag</code> objects.</p>
    #[doc(hidden)]
    pub tags: std::option::Option<std::vec::Vec<crate::types::Tag>>,
    _request_id: Option<String>,
}
impl CreateFileSystemOutput {
    /// <p>The Amazon Web Services account that created the file system.</p>
    pub fn owner_id(&self) -> std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The opaque string specified in the request.</p>
    pub fn creation_token(&self) -> std::option::Option<&str> {
        self.creation_token.as_deref()
    }
    /// <p>The ID of the file system, assigned by Amazon EFS.</p>
    pub fn file_system_id(&self) -> std::option::Option<&str> {
        self.file_system_id.as_deref()
    }
    /// <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>
    pub fn file_system_arn(&self) -> std::option::Option<&str> {
        self.file_system_arn.as_deref()
    }
    /// <p>The time that the file system was created, in seconds (since 1970-01-01T00:00:00Z).</p>
    pub fn creation_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.creation_time.as_ref()
    }
    /// <p>The lifecycle phase of the file system.</p>
    pub fn life_cycle_state(&self) -> std::option::Option<&crate::types::LifeCycleState> {
        self.life_cycle_state.as_ref()
    }
    /// <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>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The current number of mount targets that the file system has. For more information, see <code>CreateMountTarget</code>.</p>
    pub fn number_of_mount_targets(&self) -> i32 {
        self.number_of_mount_targets
    }
    /// <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>
    pub fn size_in_bytes(&self) -> std::option::Option<&crate::types::FileSystemSize> {
        self.size_in_bytes.as_ref()
    }
    /// <p>The performance mode of the file system.</p>
    pub fn performance_mode(&self) -> std::option::Option<&crate::types::PerformanceMode> {
        self.performance_mode.as_ref()
    }
    /// <p>A Boolean value that, if true, indicates that the file system is encrypted.</p>
    pub fn encrypted(&self) -> std::option::Option<bool> {
        self.encrypted
    }
    /// <p>The ID of an KMS key used to protect the encrypted file system.</p>
    pub fn kms_key_id(&self) -> std::option::Option<&str> {
        self.kms_key_id.as_deref()
    }
    /// <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>
    pub fn throughput_mode(&self) -> std::option::Option<&crate::types::ThroughputMode> {
        self.throughput_mode.as_ref()
    }
    /// <p>The amount of provisioned throughput, measured in MiB/s, for the file system. Valid for file systems using <code>ThroughputMode</code> set to <code>provisioned</code>.</p>
    pub fn provisioned_throughput_in_mibps(&self) -> std::option::Option<f64> {
        self.provisioned_throughput_in_mibps
    }
    /// <p>Describes the Amazon Web Services Availability Zone in which the file system is located, and is valid only for file systems using One Zone storage classes. 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>
    pub fn availability_zone_name(&self) -> std::option::Option<&str> {
        self.availability_zone_name.as_deref()
    }
    /// <p>The unique and consistent identifier of the Availability Zone in which the file system's One Zone storage classes exist. 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>
    pub fn availability_zone_id(&self) -> std::option::Option<&str> {
        self.availability_zone_id.as_deref()
    }
    /// <p>The tags associated with the file system, presented as an array of <code>Tag</code> objects.</p>
    pub fn tags(&self) -> std::option::Option<&[crate::types::Tag]> {
        self.tags.as_deref()
    }
}
impl aws_http::request_id::RequestId for CreateFileSystemOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateFileSystemOutput {
    /// Creates a new builder-style object to manufacture [`CreateFileSystemOutput`](crate::operation::create_file_system::CreateFileSystemOutput).
    pub fn builder() -> crate::operation::create_file_system::builders::CreateFileSystemOutputBuilder
    {
        crate::operation::create_file_system::builders::CreateFileSystemOutputBuilder::default()
    }
}

/// A builder for [`CreateFileSystemOutput`](crate::operation::create_file_system::CreateFileSystemOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct CreateFileSystemOutputBuilder {
    pub(crate) owner_id: std::option::Option<std::string::String>,
    pub(crate) creation_token: std::option::Option<std::string::String>,
    pub(crate) file_system_id: std::option::Option<std::string::String>,
    pub(crate) file_system_arn: std::option::Option<std::string::String>,
    pub(crate) creation_time: std::option::Option<aws_smithy_types::DateTime>,
    pub(crate) life_cycle_state: std::option::Option<crate::types::LifeCycleState>,
    pub(crate) name: std::option::Option<std::string::String>,
    pub(crate) number_of_mount_targets: std::option::Option<i32>,
    pub(crate) size_in_bytes: std::option::Option<crate::types::FileSystemSize>,
    pub(crate) performance_mode: std::option::Option<crate::types::PerformanceMode>,
    pub(crate) encrypted: std::option::Option<bool>,
    pub(crate) kms_key_id: std::option::Option<std::string::String>,
    pub(crate) throughput_mode: std::option::Option<crate::types::ThroughputMode>,
    pub(crate) provisioned_throughput_in_mibps: std::option::Option<f64>,
    pub(crate) availability_zone_name: std::option::Option<std::string::String>,
    pub(crate) availability_zone_id: std::option::Option<std::string::String>,
    pub(crate) tags: std::option::Option<std::vec::Vec<crate::types::Tag>>,
    _request_id: Option<String>,
}
impl CreateFileSystemOutputBuilder {
    /// <p>The Amazon Web Services account that created the file system.</p>
    pub fn owner_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.owner_id = Some(input.into());
        self
    }
    /// <p>The Amazon Web Services account that created the file system.</p>
    pub fn set_owner_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.owner_id = input;
        self
    }
    /// <p>The opaque string specified in the request.</p>
    pub fn creation_token(mut self, input: impl Into<std::string::String>) -> Self {
        self.creation_token = Some(input.into());
        self
    }
    /// <p>The opaque string specified in the request.</p>
    pub fn set_creation_token(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.creation_token = input;
        self
    }
    /// <p>The ID of the file system, assigned by Amazon EFS.</p>
    pub fn file_system_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.file_system_id = Some(input.into());
        self
    }
    /// <p>The ID of the file system, assigned by Amazon EFS.</p>
    pub fn set_file_system_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.file_system_id = input;
        self
    }
    /// <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>
    pub fn file_system_arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.file_system_arn = Some(input.into());
        self
    }
    /// <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>
    pub fn set_file_system_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.file_system_arn = input;
        self
    }
    /// <p>The time that the file system was created, in seconds (since 1970-01-01T00:00:00Z).</p>
    pub fn creation_time(mut self, input: aws_smithy_types::DateTime) -> Self {
        self.creation_time = Some(input);
        self
    }
    /// <p>The time that the file system was created, in seconds (since 1970-01-01T00:00:00Z).</p>
    pub fn set_creation_time(
        mut self,
        input: std::option::Option<aws_smithy_types::DateTime>,
    ) -> Self {
        self.creation_time = input;
        self
    }
    /// <p>The lifecycle phase of the file system.</p>
    pub fn life_cycle_state(mut self, input: crate::types::LifeCycleState) -> Self {
        self.life_cycle_state = Some(input);
        self
    }
    /// <p>The lifecycle phase of the file system.</p>
    pub fn set_life_cycle_state(
        mut self,
        input: std::option::Option<crate::types::LifeCycleState>,
    ) -> Self {
        self.life_cycle_state = input;
        self
    }
    /// <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>
    pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
        self.name = Some(input.into());
        self
    }
    /// <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>
    pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The current number of mount targets that the file system has. For more information, see <code>CreateMountTarget</code>.</p>
    pub fn number_of_mount_targets(mut self, input: i32) -> Self {
        self.number_of_mount_targets = Some(input);
        self
    }
    /// <p>The current number of mount targets that the file system has. For more information, see <code>CreateMountTarget</code>.</p>
    pub fn set_number_of_mount_targets(mut self, input: std::option::Option<i32>) -> Self {
        self.number_of_mount_targets = input;
        self
    }
    /// <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>
    pub fn size_in_bytes(mut self, input: crate::types::FileSystemSize) -> Self {
        self.size_in_bytes = Some(input);
        self
    }
    /// <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>
    pub fn set_size_in_bytes(
        mut self,
        input: std::option::Option<crate::types::FileSystemSize>,
    ) -> Self {
        self.size_in_bytes = input;
        self
    }
    /// <p>The performance mode of the file system.</p>
    pub fn performance_mode(mut self, input: crate::types::PerformanceMode) -> Self {
        self.performance_mode = Some(input);
        self
    }
    /// <p>The performance mode of the file system.</p>
    pub fn set_performance_mode(
        mut self,
        input: std::option::Option<crate::types::PerformanceMode>,
    ) -> Self {
        self.performance_mode = input;
        self
    }
    /// <p>A Boolean value that, if true, indicates that the file system is encrypted.</p>
    pub fn encrypted(mut self, input: bool) -> Self {
        self.encrypted = Some(input);
        self
    }
    /// <p>A Boolean value that, if true, indicates that the file system is encrypted.</p>
    pub fn set_encrypted(mut self, input: std::option::Option<bool>) -> Self {
        self.encrypted = input;
        self
    }
    /// <p>The ID of an KMS key used to protect the encrypted file system.</p>
    pub fn kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.kms_key_id = Some(input.into());
        self
    }
    /// <p>The ID of an KMS key used to protect the encrypted file system.</p>
    pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.kms_key_id = input;
        self
    }
    /// <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>
    pub fn throughput_mode(mut self, input: crate::types::ThroughputMode) -> Self {
        self.throughput_mode = Some(input);
        self
    }
    /// <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>
    pub fn set_throughput_mode(
        mut self,
        input: std::option::Option<crate::types::ThroughputMode>,
    ) -> Self {
        self.throughput_mode = input;
        self
    }
    /// <p>The amount of provisioned throughput, measured in MiB/s, for the file system. Valid for file systems using <code>ThroughputMode</code> set to <code>provisioned</code>.</p>
    pub fn provisioned_throughput_in_mibps(mut self, input: f64) -> Self {
        self.provisioned_throughput_in_mibps = Some(input);
        self
    }
    /// <p>The amount of provisioned throughput, measured in MiB/s, for the file system. Valid for file systems using <code>ThroughputMode</code> set to <code>provisioned</code>.</p>
    pub fn set_provisioned_throughput_in_mibps(mut self, input: std::option::Option<f64>) -> Self {
        self.provisioned_throughput_in_mibps = input;
        self
    }
    /// <p>Describes the Amazon Web Services Availability Zone in which the file system is located, and is valid only for file systems using One Zone storage classes. 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>
    pub fn availability_zone_name(mut self, input: impl Into<std::string::String>) -> Self {
        self.availability_zone_name = Some(input.into());
        self
    }
    /// <p>Describes the Amazon Web Services Availability Zone in which the file system is located, and is valid only for file systems using One Zone storage classes. 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>
    pub fn set_availability_zone_name(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.availability_zone_name = input;
        self
    }
    /// <p>The unique and consistent identifier of the Availability Zone in which the file system's One Zone storage classes exist. 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>
    pub fn availability_zone_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.availability_zone_id = Some(input.into());
        self
    }
    /// <p>The unique and consistent identifier of the Availability Zone in which the file system's One Zone storage classes exist. 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>
    pub fn set_availability_zone_id(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.availability_zone_id = input;
        self
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags associated with the file system, presented as an array of <code>Tag</code> objects.</p>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = Some(v);
        self
    }
    /// <p>The tags associated with the file system, presented as an array of <code>Tag</code> objects.</p>
    pub fn set_tags(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::Tag>>,
    ) -> Self {
        self.tags = input;
        self
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`CreateFileSystemOutput`](crate::operation::create_file_system::CreateFileSystemOutput).
    pub fn build(self) -> crate::operation::create_file_system::CreateFileSystemOutput {
        crate::operation::create_file_system::CreateFileSystemOutput {
            owner_id: self.owner_id,
            creation_token: self.creation_token,
            file_system_id: self.file_system_id,
            file_system_arn: self.file_system_arn,
            creation_time: self.creation_time,
            life_cycle_state: self.life_cycle_state,
            name: self.name,
            number_of_mount_targets: self.number_of_mount_targets.unwrap_or_default(),
            size_in_bytes: self.size_in_bytes,
            performance_mode: self.performance_mode,
            encrypted: self.encrypted,
            kms_key_id: self.kms_key_id,
            throughput_mode: self.throughput_mode,
            provisioned_throughput_in_mibps: self.provisioned_throughput_in_mibps,
            availability_zone_name: self.availability_zone_name,
            availability_zone_id: self.availability_zone_id,
            tags: self.tags,
            _request_id: self._request_id,
        }
    }
}