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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p></p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateMountTargetInput {
/// <p>The ID of the file system for which to create the mount target.</p>
pub file_system_id: ::std::option::Option<::std::string::String>,
/// <p>The ID of the subnet to add the mount target in. For One Zone file systems, use the subnet that is associated with the file system's Availability Zone.</p>
pub subnet_id: ::std::option::Option<::std::string::String>,
/// <p>If the IP address type for the mount target is IPv4, then specify the IPv4 address within the address range of the specified subnet.</p>
pub ip_address: ::std::option::Option<::std::string::String>,
/// <p>If the IP address type for the mount target is IPv6, then specify the IPv6 address within the address range of the specified subnet.</p>
pub ipv6_address: ::std::option::Option<::std::string::String>,
/// <p>Specify the type of IP address of the mount target you are creating. Options are IPv4, dual stack, or IPv6. If you don’t specify an IpAddressType, then IPv4 is used.</p>
/// <ul>
/// <li>
/// <p>IPV4_ONLY – Create mount target with IPv4 only subnet or dual-stack subnet.</p></li>
/// <li>
/// <p>DUAL_STACK – Create mount target with dual-stack subnet.</p></li>
/// <li>
/// <p>IPV6_ONLY – Create mount target with IPv6 only subnet.</p></li>
/// </ul><note>
/// <p>Creating IPv6 mount target only ENI in dual-stack subnet is not supported.</p>
/// </note>
pub ip_address_type: ::std::option::Option<crate::types::IpAddressType>,
/// <p>VPC security group IDs, of the form <code>sg-xxxxxxxx</code>. These must be for the same VPC as the subnet specified. The maximum number of security groups depends on account quota. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html">Amazon VPC Quotas</a> in the <i>Amazon VPC User Guide</i> (see the <b>Security Groups</b> table).</p>
pub security_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl CreateMountTargetInput {
/// <p>The ID of the file system for which to create the mount target.</p>
pub fn file_system_id(&self) -> ::std::option::Option<&str> {
self.file_system_id.as_deref()
}
/// <p>The ID of the subnet to add the mount target in. For One Zone file systems, use the subnet that is associated with the file system's Availability Zone.</p>
pub fn subnet_id(&self) -> ::std::option::Option<&str> {
self.subnet_id.as_deref()
}
/// <p>If the IP address type for the mount target is IPv4, then specify the IPv4 address within the address range of the specified subnet.</p>
pub fn ip_address(&self) -> ::std::option::Option<&str> {
self.ip_address.as_deref()
}
/// <p>If the IP address type for the mount target is IPv6, then specify the IPv6 address within the address range of the specified subnet.</p>
pub fn ipv6_address(&self) -> ::std::option::Option<&str> {
self.ipv6_address.as_deref()
}
/// <p>Specify the type of IP address of the mount target you are creating. Options are IPv4, dual stack, or IPv6. If you don’t specify an IpAddressType, then IPv4 is used.</p>
/// <ul>
/// <li>
/// <p>IPV4_ONLY – Create mount target with IPv4 only subnet or dual-stack subnet.</p></li>
/// <li>
/// <p>DUAL_STACK – Create mount target with dual-stack subnet.</p></li>
/// <li>
/// <p>IPV6_ONLY – Create mount target with IPv6 only subnet.</p></li>
/// </ul><note>
/// <p>Creating IPv6 mount target only ENI in dual-stack subnet is not supported.</p>
/// </note>
pub fn ip_address_type(&self) -> ::std::option::Option<&crate::types::IpAddressType> {
self.ip_address_type.as_ref()
}
/// <p>VPC security group IDs, of the form <code>sg-xxxxxxxx</code>. These must be for the same VPC as the subnet specified. The maximum number of security groups depends on account quota. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html">Amazon VPC Quotas</a> in the <i>Amazon VPC User Guide</i> (see the <b>Security Groups</b> table).</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.security_groups.is_none()`.
pub fn security_groups(&self) -> &[::std::string::String] {
self.security_groups.as_deref().unwrap_or_default()
}
}
impl CreateMountTargetInput {
/// Creates a new builder-style object to manufacture [`CreateMountTargetInput`](crate::operation::create_mount_target::CreateMountTargetInput).
pub fn builder() -> crate::operation::create_mount_target::builders::CreateMountTargetInputBuilder {
crate::operation::create_mount_target::builders::CreateMountTargetInputBuilder::default()
}
}
/// A builder for [`CreateMountTargetInput`](crate::operation::create_mount_target::CreateMountTargetInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateMountTargetInputBuilder {
pub(crate) file_system_id: ::std::option::Option<::std::string::String>,
pub(crate) subnet_id: ::std::option::Option<::std::string::String>,
pub(crate) ip_address: ::std::option::Option<::std::string::String>,
pub(crate) ipv6_address: ::std::option::Option<::std::string::String>,
pub(crate) ip_address_type: ::std::option::Option<crate::types::IpAddressType>,
pub(crate) security_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl CreateMountTargetInputBuilder {
/// <p>The ID of the file system for which to create the mount target.</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 to create the mount target.</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 to create the mount target.</p>
pub fn get_file_system_id(&self) -> &::std::option::Option<::std::string::String> {
&self.file_system_id
}
/// <p>The ID of the subnet to add the mount target in. For One Zone file systems, use the subnet that is associated with the file system's Availability Zone.</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 subnet to add the mount target in. For One Zone file systems, use the subnet that is associated with the file system's Availability Zone.</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 subnet to add the mount target in. For One Zone file systems, use the subnet that is associated with the file system's Availability Zone.</p>
pub fn get_subnet_id(&self) -> &::std::option::Option<::std::string::String> {
&self.subnet_id
}
/// <p>If the IP address type for the mount target is IPv4, then specify the IPv4 address within the address range of the specified subnet.</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>If the IP address type for the mount target is IPv4, then specify the IPv4 address within the address range of the specified subnet.</p>
pub fn set_ip_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ip_address = input;
self
}
/// <p>If the IP address type for the mount target is IPv4, then specify the IPv4 address within the address range of the specified subnet.</p>
pub fn get_ip_address(&self) -> &::std::option::Option<::std::string::String> {
&self.ip_address
}
/// <p>If the IP address type for the mount target is IPv6, then specify the IPv6 address within the address range of the specified subnet.</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>If the IP address type for the mount target is IPv6, then specify the IPv6 address within the address range of the specified subnet.</p>
pub fn set_ipv6_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ipv6_address = input;
self
}
/// <p>If the IP address type for the mount target is IPv6, then specify the IPv6 address within the address range of the specified subnet.</p>
pub fn get_ipv6_address(&self) -> &::std::option::Option<::std::string::String> {
&self.ipv6_address
}
/// <p>Specify the type of IP address of the mount target you are creating. Options are IPv4, dual stack, or IPv6. If you don’t specify an IpAddressType, then IPv4 is used.</p>
/// <ul>
/// <li>
/// <p>IPV4_ONLY – Create mount target with IPv4 only subnet or dual-stack subnet.</p></li>
/// <li>
/// <p>DUAL_STACK – Create mount target with dual-stack subnet.</p></li>
/// <li>
/// <p>IPV6_ONLY – Create mount target with IPv6 only subnet.</p></li>
/// </ul><note>
/// <p>Creating IPv6 mount target only ENI in dual-stack subnet is not supported.</p>
/// </note>
pub fn ip_address_type(mut self, input: crate::types::IpAddressType) -> Self {
self.ip_address_type = ::std::option::Option::Some(input);
self
}
/// <p>Specify the type of IP address of the mount target you are creating. Options are IPv4, dual stack, or IPv6. If you don’t specify an IpAddressType, then IPv4 is used.</p>
/// <ul>
/// <li>
/// <p>IPV4_ONLY – Create mount target with IPv4 only subnet or dual-stack subnet.</p></li>
/// <li>
/// <p>DUAL_STACK – Create mount target with dual-stack subnet.</p></li>
/// <li>
/// <p>IPV6_ONLY – Create mount target with IPv6 only subnet.</p></li>
/// </ul><note>
/// <p>Creating IPv6 mount target only ENI in dual-stack subnet is not supported.</p>
/// </note>
pub fn set_ip_address_type(mut self, input: ::std::option::Option<crate::types::IpAddressType>) -> Self {
self.ip_address_type = input;
self
}
/// <p>Specify the type of IP address of the mount target you are creating. Options are IPv4, dual stack, or IPv6. If you don’t specify an IpAddressType, then IPv4 is used.</p>
/// <ul>
/// <li>
/// <p>IPV4_ONLY – Create mount target with IPv4 only subnet or dual-stack subnet.</p></li>
/// <li>
/// <p>DUAL_STACK – Create mount target with dual-stack subnet.</p></li>
/// <li>
/// <p>IPV6_ONLY – Create mount target with IPv6 only subnet.</p></li>
/// </ul><note>
/// <p>Creating IPv6 mount target only ENI in dual-stack subnet is not supported.</p>
/// </note>
pub fn get_ip_address_type(&self) -> &::std::option::Option<crate::types::IpAddressType> {
&self.ip_address_type
}
/// Appends an item to `security_groups`.
///
/// To override the contents of this collection use [`set_security_groups`](Self::set_security_groups).
///
/// <p>VPC security group IDs, of the form <code>sg-xxxxxxxx</code>. These must be for the same VPC as the subnet specified. The maximum number of security groups depends on account quota. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html">Amazon VPC Quotas</a> in the <i>Amazon VPC User Guide</i> (see the <b>Security Groups</b> table).</p>
pub fn security_groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.security_groups.unwrap_or_default();
v.push(input.into());
self.security_groups = ::std::option::Option::Some(v);
self
}
/// <p>VPC security group IDs, of the form <code>sg-xxxxxxxx</code>. These must be for the same VPC as the subnet specified. The maximum number of security groups depends on account quota. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html">Amazon VPC Quotas</a> in the <i>Amazon VPC User Guide</i> (see the <b>Security Groups</b> table).</p>
pub fn set_security_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.security_groups = input;
self
}
/// <p>VPC security group IDs, of the form <code>sg-xxxxxxxx</code>. These must be for the same VPC as the subnet specified. The maximum number of security groups depends on account quota. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html">Amazon VPC Quotas</a> in the <i>Amazon VPC User Guide</i> (see the <b>Security Groups</b> table).</p>
pub fn get_security_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.security_groups
}
/// Consumes the builder and constructs a [`CreateMountTargetInput`](crate::operation::create_mount_target::CreateMountTargetInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_mount_target::CreateMountTargetInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_mount_target::CreateMountTargetInput {
file_system_id: self.file_system_id,
subnet_id: self.subnet_id,
ip_address: self.ip_address,
ipv6_address: self.ipv6_address,
ip_address_type: self.ip_address_type,
security_groups: self.security_groups,
})
}
}