aws-sdk-fsx 1.111.0

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

/// <p>A DNS alias that is associated with the file system. You can use a DNS alias to access a file system using user-defined DNS names, in addition to the default DNS name that Amazon FSx assigns to the file system. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/WindowsGuide/managing-dns-aliases.html">DNS aliases</a> in the <i>FSx for Windows File Server User Guide</i>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Alias {
    /// <p>The name of the DNS alias. The alias name has to meet the following requirements:</p>
    /// <ul>
    /// <li>
    /// <p>Formatted as a fully-qualified domain name (FQDN), <code>hostname.domain</code>, for example, <code>accounting.example.com</code>.</p></li>
    /// <li>
    /// <p>Can contain alphanumeric characters, the underscore (_), and the hyphen (-).</p></li>
    /// <li>
    /// <p>Cannot start or end with a hyphen.</p></li>
    /// <li>
    /// <p>Can start with a numeric.</p></li>
    /// </ul>
    /// <p>For DNS names, Amazon FSx stores alphabetic characters as lowercase letters (a-z), regardless of how you specify them: as uppercase letters, lowercase letters, or the corresponding letters in escape codes.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>Describes the state of the DNS alias.</p>
    /// <ul>
    /// <li>
    /// <p>AVAILABLE - The DNS alias is associated with an Amazon FSx file system.</p></li>
    /// <li>
    /// <p>CREATING - Amazon FSx is creating the DNS alias and associating it with the file system.</p></li>
    /// <li>
    /// <p>CREATE_FAILED - Amazon FSx was unable to associate the DNS alias with the file system.</p></li>
    /// <li>
    /// <p>DELETING - Amazon FSx is disassociating the DNS alias from the file system and deleting it.</p></li>
    /// <li>
    /// <p>DELETE_FAILED - Amazon FSx was unable to disassociate the DNS alias from the file system.</p></li>
    /// </ul>
    pub lifecycle: ::std::option::Option<crate::types::AliasLifecycle>,
}
impl Alias {
    /// <p>The name of the DNS alias. The alias name has to meet the following requirements:</p>
    /// <ul>
    /// <li>
    /// <p>Formatted as a fully-qualified domain name (FQDN), <code>hostname.domain</code>, for example, <code>accounting.example.com</code>.</p></li>
    /// <li>
    /// <p>Can contain alphanumeric characters, the underscore (_), and the hyphen (-).</p></li>
    /// <li>
    /// <p>Cannot start or end with a hyphen.</p></li>
    /// <li>
    /// <p>Can start with a numeric.</p></li>
    /// </ul>
    /// <p>For DNS names, Amazon FSx stores alphabetic characters as lowercase letters (a-z), regardless of how you specify them: as uppercase letters, lowercase letters, or the corresponding letters in escape codes.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>Describes the state of the DNS alias.</p>
    /// <ul>
    /// <li>
    /// <p>AVAILABLE - The DNS alias is associated with an Amazon FSx file system.</p></li>
    /// <li>
    /// <p>CREATING - Amazon FSx is creating the DNS alias and associating it with the file system.</p></li>
    /// <li>
    /// <p>CREATE_FAILED - Amazon FSx was unable to associate the DNS alias with the file system.</p></li>
    /// <li>
    /// <p>DELETING - Amazon FSx is disassociating the DNS alias from the file system and deleting it.</p></li>
    /// <li>
    /// <p>DELETE_FAILED - Amazon FSx was unable to disassociate the DNS alias from the file system.</p></li>
    /// </ul>
    pub fn lifecycle(&self) -> ::std::option::Option<&crate::types::AliasLifecycle> {
        self.lifecycle.as_ref()
    }
}
impl Alias {
    /// Creates a new builder-style object to manufacture [`Alias`](crate::types::Alias).
    pub fn builder() -> crate::types::builders::AliasBuilder {
        crate::types::builders::AliasBuilder::default()
    }
}

/// A builder for [`Alias`](crate::types::Alias).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AliasBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) lifecycle: ::std::option::Option<crate::types::AliasLifecycle>,
}
impl AliasBuilder {
    /// <p>The name of the DNS alias. The alias name has to meet the following requirements:</p>
    /// <ul>
    /// <li>
    /// <p>Formatted as a fully-qualified domain name (FQDN), <code>hostname.domain</code>, for example, <code>accounting.example.com</code>.</p></li>
    /// <li>
    /// <p>Can contain alphanumeric characters, the underscore (_), and the hyphen (-).</p></li>
    /// <li>
    /// <p>Cannot start or end with a hyphen.</p></li>
    /// <li>
    /// <p>Can start with a numeric.</p></li>
    /// </ul>
    /// <p>For DNS names, Amazon FSx stores alphabetic characters as lowercase letters (a-z), regardless of how you specify them: as uppercase letters, lowercase letters, or the corresponding letters in escape codes.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the DNS alias. The alias name has to meet the following requirements:</p>
    /// <ul>
    /// <li>
    /// <p>Formatted as a fully-qualified domain name (FQDN), <code>hostname.domain</code>, for example, <code>accounting.example.com</code>.</p></li>
    /// <li>
    /// <p>Can contain alphanumeric characters, the underscore (_), and the hyphen (-).</p></li>
    /// <li>
    /// <p>Cannot start or end with a hyphen.</p></li>
    /// <li>
    /// <p>Can start with a numeric.</p></li>
    /// </ul>
    /// <p>For DNS names, Amazon FSx stores alphabetic characters as lowercase letters (a-z), regardless of how you specify them: as uppercase letters, lowercase letters, or the corresponding letters in escape codes.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the DNS alias. The alias name has to meet the following requirements:</p>
    /// <ul>
    /// <li>
    /// <p>Formatted as a fully-qualified domain name (FQDN), <code>hostname.domain</code>, for example, <code>accounting.example.com</code>.</p></li>
    /// <li>
    /// <p>Can contain alphanumeric characters, the underscore (_), and the hyphen (-).</p></li>
    /// <li>
    /// <p>Cannot start or end with a hyphen.</p></li>
    /// <li>
    /// <p>Can start with a numeric.</p></li>
    /// </ul>
    /// <p>For DNS names, Amazon FSx stores alphabetic characters as lowercase letters (a-z), regardless of how you specify them: as uppercase letters, lowercase letters, or the corresponding letters in escape codes.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>Describes the state of the DNS alias.</p>
    /// <ul>
    /// <li>
    /// <p>AVAILABLE - The DNS alias is associated with an Amazon FSx file system.</p></li>
    /// <li>
    /// <p>CREATING - Amazon FSx is creating the DNS alias and associating it with the file system.</p></li>
    /// <li>
    /// <p>CREATE_FAILED - Amazon FSx was unable to associate the DNS alias with the file system.</p></li>
    /// <li>
    /// <p>DELETING - Amazon FSx is disassociating the DNS alias from the file system and deleting it.</p></li>
    /// <li>
    /// <p>DELETE_FAILED - Amazon FSx was unable to disassociate the DNS alias from the file system.</p></li>
    /// </ul>
    pub fn lifecycle(mut self, input: crate::types::AliasLifecycle) -> Self {
        self.lifecycle = ::std::option::Option::Some(input);
        self
    }
    /// <p>Describes the state of the DNS alias.</p>
    /// <ul>
    /// <li>
    /// <p>AVAILABLE - The DNS alias is associated with an Amazon FSx file system.</p></li>
    /// <li>
    /// <p>CREATING - Amazon FSx is creating the DNS alias and associating it with the file system.</p></li>
    /// <li>
    /// <p>CREATE_FAILED - Amazon FSx was unable to associate the DNS alias with the file system.</p></li>
    /// <li>
    /// <p>DELETING - Amazon FSx is disassociating the DNS alias from the file system and deleting it.</p></li>
    /// <li>
    /// <p>DELETE_FAILED - Amazon FSx was unable to disassociate the DNS alias from the file system.</p></li>
    /// </ul>
    pub fn set_lifecycle(mut self, input: ::std::option::Option<crate::types::AliasLifecycle>) -> Self {
        self.lifecycle = input;
        self
    }
    /// <p>Describes the state of the DNS alias.</p>
    /// <ul>
    /// <li>
    /// <p>AVAILABLE - The DNS alias is associated with an Amazon FSx file system.</p></li>
    /// <li>
    /// <p>CREATING - Amazon FSx is creating the DNS alias and associating it with the file system.</p></li>
    /// <li>
    /// <p>CREATE_FAILED - Amazon FSx was unable to associate the DNS alias with the file system.</p></li>
    /// <li>
    /// <p>DELETING - Amazon FSx is disassociating the DNS alias from the file system and deleting it.</p></li>
    /// <li>
    /// <p>DELETE_FAILED - Amazon FSx was unable to disassociate the DNS alias from the file system.</p></li>
    /// </ul>
    pub fn get_lifecycle(&self) -> &::std::option::Option<crate::types::AliasLifecycle> {
        &self.lifecycle
    }
    /// Consumes the builder and constructs a [`Alias`](crate::types::Alias).
    pub fn build(self) -> crate::types::Alias {
        crate::types::Alias {
            name: self.name,
            lifecycle: self.lifecycle,
        }
    }
}