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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Provides a description of a mount target.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateMountTargetOutput {
/// <p>Amazon Web Services account ID that owns the resource.</p>
pub owner_id: ::std::option::Option<::std::string::String>,
/// <p>System-assigned mount target ID.</p>
pub mount_target_id: ::std::string::String,
/// <p>The ID of the file system for which the mount target is intended.</p>
pub file_system_id: ::std::string::String,
/// <p>The ID of the mount target's subnet.</p>
pub subnet_id: ::std::string::String,
/// <p>Lifecycle state of the mount target.</p>
pub life_cycle_state: crate::types::LifeCycleState,
/// <p>Address at which the file system can be mounted by using the mount target.</p>
pub ip_address: ::std::option::Option<::std::string::String>,
/// <p>The IPv6 address for the mount target.</p>
pub ipv6_address: ::std::option::Option<::std::string::String>,
/// <p>The ID of the network interface that Amazon EFS created when it created the mount target.</p>
pub network_interface_id: ::std::option::Option<::std::string::String>,
/// <p>The unique and consistent identifier of the Availability Zone that the mount target resides in. For example, <code>use1-az1</code> is an AZ ID for the us-east-1 Region and it has the same location in every Amazon Web Services account.</p>
pub availability_zone_id: ::std::option::Option<::std::string::String>,
/// <p>The name of the Availability Zone in which the mount target is located. Availability Zones are independently mapped to names for each Amazon Web Services account. For example, the Availability Zone <code>us-east-1a</code> for your Amazon Web Services account might not be the same location as <code>us-east-1a</code> for another Amazon Web Services account.</p>
pub availability_zone_name: ::std::option::Option<::std::string::String>,
/// <p>The virtual private cloud (VPC) ID that the mount target is configured in.</p>
pub vpc_id: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateMountTargetOutput {
/// <p>Amazon Web Services account ID that owns the resource.</p>
pub fn owner_id(&self) -> ::std::option::Option<&str> {
self.owner_id.as_deref()
}
/// <p>System-assigned mount target ID.</p>
pub fn mount_target_id(&self) -> &str {
use std::ops::Deref;
self.mount_target_id.deref()
}
/// <p>The ID of the file system for which the mount target is intended.</p>
pub fn file_system_id(&self) -> &str {
use std::ops::Deref;
self.file_system_id.deref()
}
/// <p>The ID of the mount target's subnet.</p>
pub fn subnet_id(&self) -> &str {
use std::ops::Deref;
self.subnet_id.deref()
}
/// <p>Lifecycle state of the mount target.</p>
pub fn life_cycle_state(&self) -> &crate::types::LifeCycleState {
&self.life_cycle_state
}
/// <p>Address at which the file system can be mounted by using the mount target.</p>
pub fn ip_address(&self) -> ::std::option::Option<&str> {
self.ip_address.as_deref()
}
/// <p>The IPv6 address for the mount target.</p>
pub fn ipv6_address(&self) -> ::std::option::Option<&str> {
self.ipv6_address.as_deref()
}
/// <p>The ID of the network interface that Amazon EFS created when it created the mount target.</p>
pub fn network_interface_id(&self) -> ::std::option::Option<&str> {
self.network_interface_id.as_deref()
}
/// <p>The unique and consistent identifier of the Availability Zone that the mount target resides in. For example, <code>use1-az1</code> is an AZ ID for the us-east-1 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 name of the Availability Zone in which the mount target is located. Availability Zones are independently mapped to names for each Amazon Web Services account. For example, the Availability Zone <code>us-east-1a</code> for your Amazon Web Services account might not be the same location as <code>us-east-1a</code> for another Amazon Web Services account.</p>
pub fn availability_zone_name(&self) -> ::std::option::Option<&str> {
self.availability_zone_name.as_deref()
}
/// <p>The virtual private cloud (VPC) ID that the mount target is configured in.</p>
pub fn vpc_id(&self) -> ::std::option::Option<&str> {
self.vpc_id.as_deref()
}
}
impl ::aws_types::request_id::RequestId for CreateMountTargetOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateMountTargetOutput {
/// Creates a new builder-style object to manufacture [`CreateMountTargetOutput`](crate::operation::create_mount_target::CreateMountTargetOutput).
pub fn builder() -> crate::operation::create_mount_target::builders::CreateMountTargetOutputBuilder {
crate::operation::create_mount_target::builders::CreateMountTargetOutputBuilder::default()
}
}
/// A builder for [`CreateMountTargetOutput`](crate::operation::create_mount_target::CreateMountTargetOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateMountTargetOutputBuilder {
pub(crate) owner_id: ::std::option::Option<::std::string::String>,
pub(crate) mount_target_id: ::std::option::Option<::std::string::String>,
pub(crate) file_system_id: ::std::option::Option<::std::string::String>,
pub(crate) subnet_id: ::std::option::Option<::std::string::String>,
pub(crate) life_cycle_state: ::std::option::Option<crate::types::LifeCycleState>,
pub(crate) ip_address: ::std::option::Option<::std::string::String>,
pub(crate) ipv6_address: ::std::option::Option<::std::string::String>,
pub(crate) network_interface_id: ::std::option::Option<::std::string::String>,
pub(crate) availability_zone_id: ::std::option::Option<::std::string::String>,
pub(crate) availability_zone_name: ::std::option::Option<::std::string::String>,
pub(crate) vpc_id: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateMountTargetOutputBuilder {
/// <p>Amazon Web Services account ID that owns the resource.</p>
pub fn owner_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.owner_id = ::std::option::Option::Some(input.into());
self
}
/// <p>Amazon Web Services account ID that owns the resource.</p>
pub fn set_owner_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.owner_id = input;
self
}
/// <p>Amazon Web Services account ID that owns the resource.</p>
pub fn get_owner_id(&self) -> &::std::option::Option<::std::string::String> {
&self.owner_id
}
/// <p>System-assigned mount target ID.</p>
/// This field is required.
pub fn mount_target_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.mount_target_id = ::std::option::Option::Some(input.into());
self
}
/// <p>System-assigned mount target ID.</p>
pub fn set_mount_target_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.mount_target_id = input;
self
}
/// <p>System-assigned mount target ID.</p>
pub fn get_mount_target_id(&self) -> &::std::option::Option<::std::string::String> {
&self.mount_target_id
}
/// <p>The ID of the file system for which the mount target is intended.</p>
/// This field is required.
pub fn file_system_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.file_system_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the file system for which the mount target is intended.</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 ID of the file system for which the mount target is intended.</p>
pub fn get_file_system_id(&self) -> &::std::option::Option<::std::string::String> {
&self.file_system_id
}
/// <p>The ID of the mount target's subnet.</p>
/// This field is required.
pub fn subnet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.subnet_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the mount target's subnet.</p>
pub fn set_subnet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.subnet_id = input;
self
}
/// <p>The ID of the mount target's subnet.</p>
pub fn get_subnet_id(&self) -> &::std::option::Option<::std::string::String> {
&self.subnet_id
}
/// <p>Lifecycle state of the mount target.</p>
/// This field is required.
pub fn life_cycle_state(mut self, input: crate::types::LifeCycleState) -> Self {
self.life_cycle_state = ::std::option::Option::Some(input);
self
}
/// <p>Lifecycle state of the mount target.</p>
pub fn set_life_cycle_state(mut self, input: ::std::option::Option<crate::types::LifeCycleState>) -> Self {
self.life_cycle_state = input;
self
}
/// <p>Lifecycle state of the mount target.</p>
pub fn get_life_cycle_state(&self) -> &::std::option::Option<crate::types::LifeCycleState> {
&self.life_cycle_state
}
/// <p>Address at which the file system can be mounted by using the mount target.</p>
pub fn ip_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.ip_address = ::std::option::Option::Some(input.into());
self
}
/// <p>Address at which the file system can be mounted by using the mount target.</p>
pub fn set_ip_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ip_address = input;
self
}
/// <p>Address at which the file system can be mounted by using the mount target.</p>
pub fn get_ip_address(&self) -> &::std::option::Option<::std::string::String> {
&self.ip_address
}
/// <p>The IPv6 address for the mount target.</p>
pub fn ipv6_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.ipv6_address = ::std::option::Option::Some(input.into());
self
}
/// <p>The IPv6 address for the mount target.</p>
pub fn set_ipv6_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ipv6_address = input;
self
}
/// <p>The IPv6 address for the mount target.</p>
pub fn get_ipv6_address(&self) -> &::std::option::Option<::std::string::String> {
&self.ipv6_address
}
/// <p>The ID of the network interface that Amazon EFS created when it created the mount target.</p>
pub fn network_interface_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.network_interface_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the network interface that Amazon EFS created when it created the mount target.</p>
pub fn set_network_interface_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.network_interface_id = input;
self
}
/// <p>The ID of the network interface that Amazon EFS created when it created the mount target.</p>
pub fn get_network_interface_id(&self) -> &::std::option::Option<::std::string::String> {
&self.network_interface_id
}
/// <p>The unique and consistent identifier of the Availability Zone that the mount target resides in. For example, <code>use1-az1</code> is an AZ ID for the us-east-1 Region and it has the same location in every Amazon Web Services account.</p>
pub fn availability_zone_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.availability_zone_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique and consistent identifier of the Availability Zone that the mount target resides in. For example, <code>use1-az1</code> is an AZ ID for the us-east-1 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
}
/// <p>The unique and consistent identifier of the Availability Zone that the mount target resides in. For example, <code>use1-az1</code> is an AZ ID for the us-east-1 Region and it has the same location in every Amazon Web Services account.</p>
pub fn get_availability_zone_id(&self) -> &::std::option::Option<::std::string::String> {
&self.availability_zone_id
}
/// <p>The name of the Availability Zone in which the mount target is located. Availability Zones are independently mapped to names for each Amazon Web Services account. For example, the Availability Zone <code>us-east-1a</code> for your Amazon Web Services account might not be the same location as <code>us-east-1a</code> for another Amazon Web Services account.</p>
pub fn availability_zone_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.availability_zone_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the Availability Zone in which the mount target is located. Availability Zones are independently mapped to names for each Amazon Web Services account. For example, the Availability Zone <code>us-east-1a</code> for your Amazon Web Services account might not be the same location as <code>us-east-1a</code> for another Amazon Web Services account.</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 name of the Availability Zone in which the mount target is located. Availability Zones are independently mapped to names for each Amazon Web Services account. For example, the Availability Zone <code>us-east-1a</code> for your Amazon Web Services account might not be the same location as <code>us-east-1a</code> for another Amazon Web Services account.</p>
pub fn get_availability_zone_name(&self) -> &::std::option::Option<::std::string::String> {
&self.availability_zone_name
}
/// <p>The virtual private cloud (VPC) ID that the mount target is configured in.</p>
pub fn vpc_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.vpc_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The virtual private cloud (VPC) ID that the mount target is configured in.</p>
pub fn set_vpc_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.vpc_id = input;
self
}
/// <p>The virtual private cloud (VPC) ID that the mount target is configured in.</p>
pub fn get_vpc_id(&self) -> &::std::option::Option<::std::string::String> {
&self.vpc_id
}
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 [`CreateMountTargetOutput`](crate::operation::create_mount_target::CreateMountTargetOutput).
/// This method will fail if any of the following fields are not set:
/// - [`mount_target_id`](crate::operation::create_mount_target::builders::CreateMountTargetOutputBuilder::mount_target_id)
/// - [`file_system_id`](crate::operation::create_mount_target::builders::CreateMountTargetOutputBuilder::file_system_id)
/// - [`subnet_id`](crate::operation::create_mount_target::builders::CreateMountTargetOutputBuilder::subnet_id)
/// - [`life_cycle_state`](crate::operation::create_mount_target::builders::CreateMountTargetOutputBuilder::life_cycle_state)
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_mount_target::CreateMountTargetOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_mount_target::CreateMountTargetOutput {
owner_id: self.owner_id,
mount_target_id: self.mount_target_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"mount_target_id",
"mount_target_id was not specified but it is required when building CreateMountTargetOutput",
)
})?,
file_system_id: self.file_system_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"file_system_id",
"file_system_id was not specified but it is required when building CreateMountTargetOutput",
)
})?,
subnet_id: self.subnet_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"subnet_id",
"subnet_id was not specified but it is required when building CreateMountTargetOutput",
)
})?,
life_cycle_state: self.life_cycle_state.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"life_cycle_state",
"life_cycle_state was not specified but it is required when building CreateMountTargetOutput",
)
})?,
ip_address: self.ip_address,
ipv6_address: self.ipv6_address,
network_interface_id: self.network_interface_id,
availability_zone_id: self.availability_zone_id,
availability_zone_name: self.availability_zone_name,
vpc_id: self.vpc_id,
_request_id: self._request_id,
})
}
}