1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
// 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,
}
}
}