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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateMountTargetInput {
/// <p>The ID or Amazon Resource Name (ARN) of the S3 File System to create the mount target for.</p>
pub file_system_id: ::std::option::Option<::std::string::String>,
/// <p>The ID of the subnet where the mount target will be created. The subnet must be in the same Amazon Web Services Region as the file system. For file systems with regional availability, you can create mount targets in any subnet within the Region. The subnet determines the Availability Zone where the mount target will be located.</p>
pub subnet_id: ::std::option::Option<::std::string::String>,
/// <p>A specific IPv4 address to assign to the mount target. If not specified and the IP address type supports IPv4, an address is automatically assigned from the subnet's available IPv4 address range. The address must be within the subnet's CIDR block and not already in use.</p>
pub ipv4_address: ::std::option::Option<::std::string::String>,
/// <p>A specific IPv6 address to assign to the mount target. If not specified and the IP address type supports IPv6, an address is automatically assigned from the subnet's available IPv6 address range. The address must be within the subnet's IPv6 CIDR block and not already in use.</p>
pub ipv6_address: ::std::option::Option<::std::string::String>,
/// <p>The IP address type for the mount target. If not specified, <code>IPV4_ONLY</code> is used. The IP address type must match the IP configuration of the specified subnet.</p>
pub ip_address_type: ::std::option::Option<crate::types::IpAddressType>,
/// <p>An array of VPC security group IDs to associate with the mount target's network interface. These security groups control network access to the mount target. If not specified, the default security group for the subnet's VPC is used. All security groups must belong to the same VPC as the subnet.</p>
pub security_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl CreateMountTargetInput {
/// <p>The ID or Amazon Resource Name (ARN) of the S3 File System to create the mount target for.</p>
pub fn file_system_id(&self) -> ::std::option::Option<&str> {
self.file_system_id.as_deref()
}
/// <p>The ID of the subnet where the mount target will be created. The subnet must be in the same Amazon Web Services Region as the file system. For file systems with regional availability, you can create mount targets in any subnet within the Region. The subnet determines the Availability Zone where the mount target will be located.</p>
pub fn subnet_id(&self) -> ::std::option::Option<&str> {
self.subnet_id.as_deref()
}
/// <p>A specific IPv4 address to assign to the mount target. If not specified and the IP address type supports IPv4, an address is automatically assigned from the subnet's available IPv4 address range. The address must be within the subnet's CIDR block and not already in use.</p>
pub fn ipv4_address(&self) -> ::std::option::Option<&str> {
self.ipv4_address.as_deref()
}
/// <p>A specific IPv6 address to assign to the mount target. If not specified and the IP address type supports IPv6, an address is automatically assigned from the subnet's available IPv6 address range. The address must be within the subnet's IPv6 CIDR block and not already in use.</p>
pub fn ipv6_address(&self) -> ::std::option::Option<&str> {
self.ipv6_address.as_deref()
}
/// <p>The IP address type for the mount target. If not specified, <code>IPV4_ONLY</code> is used. The IP address type must match the IP configuration of the specified subnet.</p>
pub fn ip_address_type(&self) -> ::std::option::Option<&crate::types::IpAddressType> {
self.ip_address_type.as_ref()
}
/// <p>An array of VPC security group IDs to associate with the mount target's network interface. These security groups control network access to the mount target. If not specified, the default security group for the subnet's VPC is used. All security groups must belong to the same VPC as the subnet.</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) ipv4_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 or Amazon Resource Name (ARN) of the S3 File System to create the mount target for.</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 or Amazon Resource Name (ARN) of the S3 File System to create the mount target for.</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 or Amazon Resource Name (ARN) of the S3 File System to create the mount target for.</p>
pub fn get_file_system_id(&self) -> &::std::option::Option<::std::string::String> {
&self.file_system_id
}
/// <p>The ID of the subnet where the mount target will be created. The subnet must be in the same Amazon Web Services Region as the file system. For file systems with regional availability, you can create mount targets in any subnet within the Region. The subnet determines the Availability Zone where the mount target will be located.</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 where the mount target will be created. The subnet must be in the same Amazon Web Services Region as the file system. For file systems with regional availability, you can create mount targets in any subnet within the Region. The subnet determines the Availability Zone where the mount target will be located.</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 where the mount target will be created. The subnet must be in the same Amazon Web Services Region as the file system. For file systems with regional availability, you can create mount targets in any subnet within the Region. The subnet determines the Availability Zone where the mount target will be located.</p>
pub fn get_subnet_id(&self) -> &::std::option::Option<::std::string::String> {
&self.subnet_id
}
/// <p>A specific IPv4 address to assign to the mount target. If not specified and the IP address type supports IPv4, an address is automatically assigned from the subnet's available IPv4 address range. The address must be within the subnet's CIDR block and not already in use.</p>
pub fn ipv4_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.ipv4_address = ::std::option::Option::Some(input.into());
self
}
/// <p>A specific IPv4 address to assign to the mount target. If not specified and the IP address type supports IPv4, an address is automatically assigned from the subnet's available IPv4 address range. The address must be within the subnet's CIDR block and not already in use.</p>
pub fn set_ipv4_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ipv4_address = input;
self
}
/// <p>A specific IPv4 address to assign to the mount target. If not specified and the IP address type supports IPv4, an address is automatically assigned from the subnet's available IPv4 address range. The address must be within the subnet's CIDR block and not already in use.</p>
pub fn get_ipv4_address(&self) -> &::std::option::Option<::std::string::String> {
&self.ipv4_address
}
/// <p>A specific IPv6 address to assign to the mount target. If not specified and the IP address type supports IPv6, an address is automatically assigned from the subnet's available IPv6 address range. The address must be within the subnet's IPv6 CIDR block and not already in use.</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>A specific IPv6 address to assign to the mount target. If not specified and the IP address type supports IPv6, an address is automatically assigned from the subnet's available IPv6 address range. The address must be within the subnet's IPv6 CIDR block and not already in use.</p>
pub fn set_ipv6_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ipv6_address = input;
self
}
/// <p>A specific IPv6 address to assign to the mount target. If not specified and the IP address type supports IPv6, an address is automatically assigned from the subnet's available IPv6 address range. The address must be within the subnet's IPv6 CIDR block and not already in use.</p>
pub fn get_ipv6_address(&self) -> &::std::option::Option<::std::string::String> {
&self.ipv6_address
}
/// <p>The IP address type for the mount target. If not specified, <code>IPV4_ONLY</code> is used. The IP address type must match the IP configuration of the specified subnet.</p>
pub fn ip_address_type(mut self, input: crate::types::IpAddressType) -> Self {
self.ip_address_type = ::std::option::Option::Some(input);
self
}
/// <p>The IP address type for the mount target. If not specified, <code>IPV4_ONLY</code> is used. The IP address type must match the IP configuration of the specified subnet.</p>
pub fn set_ip_address_type(mut self, input: ::std::option::Option<crate::types::IpAddressType>) -> Self {
self.ip_address_type = input;
self
}
/// <p>The IP address type for the mount target. If not specified, <code>IPV4_ONLY</code> is used. The IP address type must match the IP configuration of the specified subnet.</p>
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>An array of VPC security group IDs to associate with the mount target's network interface. These security groups control network access to the mount target. If not specified, the default security group for the subnet's VPC is used. All security groups must belong to the same VPC as the subnet.</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>An array of VPC security group IDs to associate with the mount target's network interface. These security groups control network access to the mount target. If not specified, the default security group for the subnet's VPC is used. All security groups must belong to the same VPC as the subnet.</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>An array of VPC security group IDs to associate with the mount target's network interface. These security groups control network access to the mount target. If not specified, the default security group for the subnet's VPC is used. All security groups must belong to the same VPC as the subnet.</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,
ipv4_address: self.ipv4_address,
ipv6_address: self.ipv6_address,
ip_address_type: self.ip_address_type,
security_groups: self.security_groups,
})
}
}