aws_sdk_ec2/operation/describe_subnets/_describe_subnets_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeSubnetsInput {
6 /// <p>The filters.</p>
7 /// <ul>
8 /// <li>
9 /// <p><code>availability-zone</code> - The Availability Zone for the subnet. You can also use <code>availabilityZone</code> as the filter name.</p></li>
10 /// <li>
11 /// <p><code>availability-zone-id</code> - The ID of the Availability Zone for the subnet. You can also use <code>availabilityZoneId</code> as the filter name.</p></li>
12 /// <li>
13 /// <p><code>available-ip-address-count</code> - The number of IPv4 addresses in the subnet that are available.</p></li>
14 /// <li>
15 /// <p><code>cidr-block</code> - The IPv4 CIDR block of the subnet. The CIDR block you specify must exactly match the subnet's CIDR block for information to be returned for the subnet. You can also use <code>cidr</code> or <code>cidrBlock</code> as the filter names.</p></li>
16 /// <li>
17 /// <p><code>customer-owned-ipv4-pool</code> - The customer-owned IPv4 address pool associated with the subnet.</p></li>
18 /// <li>
19 /// <p><code>default-for-az</code> - Indicates whether this is the default subnet for the Availability Zone (<code>true</code> | <code>false</code>). You can also use <code>defaultForAz</code> as the filter name.</p></li>
20 /// <li>
21 /// <p><code>enable-dns64</code> - Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.</p></li>
22 /// <li>
23 /// <p><code>enable-lni-at-device-index</code> - Indicates the device position for local network interfaces in this subnet. For example, <code>1</code> indicates local network interfaces in this subnet are the secondary network interface (eth1).</p></li>
24 /// <li>
25 /// <p><code>ipv6-cidr-block-association.ipv6-cidr-block</code> - An IPv6 CIDR block associated with the subnet.</p></li>
26 /// <li>
27 /// <p><code>ipv6-cidr-block-association.association-id</code> - An association ID for an IPv6 CIDR block associated with the subnet.</p></li>
28 /// <li>
29 /// <p><code>ipv6-cidr-block-association.state</code> - The state of an IPv6 CIDR block associated with the subnet.</p></li>
30 /// <li>
31 /// <p><code>ipv6-native</code> - Indicates whether this is an IPv6 only subnet (<code>true</code> | <code>false</code>).</p></li>
32 /// <li>
33 /// <p><code>map-customer-owned-ip-on-launch</code> - Indicates whether a network interface created in this subnet (including a network interface created by <code>RunInstances</code>) receives a customer-owned IPv4 address.</p></li>
34 /// <li>
35 /// <p><code>map-public-ip-on-launch</code> - Indicates whether instances launched in this subnet receive a public IPv4 address.</p></li>
36 /// <li>
37 /// <p><code>outpost-arn</code> - The Amazon Resource Name (ARN) of the Outpost.</p></li>
38 /// <li>
39 /// <p><code>owner-id</code> - The ID of the Amazon Web Services account that owns the subnet.</p></li>
40 /// <li>
41 /// <p><code>private-dns-name-options-on-launch.hostname-type</code> - The type of hostname to assign to instances in the subnet at launch. For IPv4-only and dual-stack (IPv4 and IPv6) subnets, an instance DNS name can be based on the instance IPv4 address (ip-name) or the instance ID (resource-name). For IPv6 only subnets, an instance DNS name must be based on the instance ID (resource-name).</p></li>
42 /// <li>
43 /// <p><code>private-dns-name-options-on-launch.enable-resource-name-dns-a-record</code> - Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p></li>
44 /// <li>
45 /// <p><code>private-dns-name-options-on-launch.enable-resource-name-dns-aaaa-record</code> - Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p></li>
46 /// <li>
47 /// <p><code>state</code> - The state of the subnet (<code>pending</code> | <code>available</code>).</p></li>
48 /// <li>
49 /// <p><code>subnet-arn</code> - The Amazon Resource Name (ARN) of the subnet.</p></li>
50 /// <li>
51 /// <p><code>subnet-id</code> - The ID of the subnet.</p></li>
52 /// <li>
53 /// <p><code>tag</code> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p></li>
54 /// <li>
55 /// <p><code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p></li>
56 /// <li>
57 /// <p><code>vpc-id</code> - The ID of the VPC for the subnet.</p></li>
58 /// </ul>
59 pub filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
60 /// <p>The IDs of the subnets.</p>
61 /// <p>Default: Describes all your subnets.</p>
62 pub subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
63 /// <p>The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.</p>
64 pub next_token: ::std::option::Option<::std::string::String>,
65 /// <p>The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination">Pagination</a>.</p>
66 pub max_results: ::std::option::Option<i32>,
67 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
68 pub dry_run: ::std::option::Option<bool>,
69}
70impl DescribeSubnetsInput {
71 /// <p>The filters.</p>
72 /// <ul>
73 /// <li>
74 /// <p><code>availability-zone</code> - The Availability Zone for the subnet. You can also use <code>availabilityZone</code> as the filter name.</p></li>
75 /// <li>
76 /// <p><code>availability-zone-id</code> - The ID of the Availability Zone for the subnet. You can also use <code>availabilityZoneId</code> as the filter name.</p></li>
77 /// <li>
78 /// <p><code>available-ip-address-count</code> - The number of IPv4 addresses in the subnet that are available.</p></li>
79 /// <li>
80 /// <p><code>cidr-block</code> - The IPv4 CIDR block of the subnet. The CIDR block you specify must exactly match the subnet's CIDR block for information to be returned for the subnet. You can also use <code>cidr</code> or <code>cidrBlock</code> as the filter names.</p></li>
81 /// <li>
82 /// <p><code>customer-owned-ipv4-pool</code> - The customer-owned IPv4 address pool associated with the subnet.</p></li>
83 /// <li>
84 /// <p><code>default-for-az</code> - Indicates whether this is the default subnet for the Availability Zone (<code>true</code> | <code>false</code>). You can also use <code>defaultForAz</code> as the filter name.</p></li>
85 /// <li>
86 /// <p><code>enable-dns64</code> - Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.</p></li>
87 /// <li>
88 /// <p><code>enable-lni-at-device-index</code> - Indicates the device position for local network interfaces in this subnet. For example, <code>1</code> indicates local network interfaces in this subnet are the secondary network interface (eth1).</p></li>
89 /// <li>
90 /// <p><code>ipv6-cidr-block-association.ipv6-cidr-block</code> - An IPv6 CIDR block associated with the subnet.</p></li>
91 /// <li>
92 /// <p><code>ipv6-cidr-block-association.association-id</code> - An association ID for an IPv6 CIDR block associated with the subnet.</p></li>
93 /// <li>
94 /// <p><code>ipv6-cidr-block-association.state</code> - The state of an IPv6 CIDR block associated with the subnet.</p></li>
95 /// <li>
96 /// <p><code>ipv6-native</code> - Indicates whether this is an IPv6 only subnet (<code>true</code> | <code>false</code>).</p></li>
97 /// <li>
98 /// <p><code>map-customer-owned-ip-on-launch</code> - Indicates whether a network interface created in this subnet (including a network interface created by <code>RunInstances</code>) receives a customer-owned IPv4 address.</p></li>
99 /// <li>
100 /// <p><code>map-public-ip-on-launch</code> - Indicates whether instances launched in this subnet receive a public IPv4 address.</p></li>
101 /// <li>
102 /// <p><code>outpost-arn</code> - The Amazon Resource Name (ARN) of the Outpost.</p></li>
103 /// <li>
104 /// <p><code>owner-id</code> - The ID of the Amazon Web Services account that owns the subnet.</p></li>
105 /// <li>
106 /// <p><code>private-dns-name-options-on-launch.hostname-type</code> - The type of hostname to assign to instances in the subnet at launch. For IPv4-only and dual-stack (IPv4 and IPv6) subnets, an instance DNS name can be based on the instance IPv4 address (ip-name) or the instance ID (resource-name). For IPv6 only subnets, an instance DNS name must be based on the instance ID (resource-name).</p></li>
107 /// <li>
108 /// <p><code>private-dns-name-options-on-launch.enable-resource-name-dns-a-record</code> - Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p></li>
109 /// <li>
110 /// <p><code>private-dns-name-options-on-launch.enable-resource-name-dns-aaaa-record</code> - Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p></li>
111 /// <li>
112 /// <p><code>state</code> - The state of the subnet (<code>pending</code> | <code>available</code>).</p></li>
113 /// <li>
114 /// <p><code>subnet-arn</code> - The Amazon Resource Name (ARN) of the subnet.</p></li>
115 /// <li>
116 /// <p><code>subnet-id</code> - The ID of the subnet.</p></li>
117 /// <li>
118 /// <p><code>tag</code> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p></li>
119 /// <li>
120 /// <p><code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p></li>
121 /// <li>
122 /// <p><code>vpc-id</code> - The ID of the VPC for the subnet.</p></li>
123 /// </ul>
124 ///
125 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.filters.is_none()`.
126 pub fn filters(&self) -> &[crate::types::Filter] {
127 self.filters.as_deref().unwrap_or_default()
128 }
129 /// <p>The IDs of the subnets.</p>
130 /// <p>Default: Describes all your subnets.</p>
131 ///
132 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.subnet_ids.is_none()`.
133 pub fn subnet_ids(&self) -> &[::std::string::String] {
134 self.subnet_ids.as_deref().unwrap_or_default()
135 }
136 /// <p>The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.</p>
137 pub fn next_token(&self) -> ::std::option::Option<&str> {
138 self.next_token.as_deref()
139 }
140 /// <p>The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination">Pagination</a>.</p>
141 pub fn max_results(&self) -> ::std::option::Option<i32> {
142 self.max_results
143 }
144 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
145 pub fn dry_run(&self) -> ::std::option::Option<bool> {
146 self.dry_run
147 }
148}
149impl DescribeSubnetsInput {
150 /// Creates a new builder-style object to manufacture [`DescribeSubnetsInput`](crate::operation::describe_subnets::DescribeSubnetsInput).
151 pub fn builder() -> crate::operation::describe_subnets::builders::DescribeSubnetsInputBuilder {
152 crate::operation::describe_subnets::builders::DescribeSubnetsInputBuilder::default()
153 }
154}
155
156/// A builder for [`DescribeSubnetsInput`](crate::operation::describe_subnets::DescribeSubnetsInput).
157#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
158#[non_exhaustive]
159pub struct DescribeSubnetsInputBuilder {
160 pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
161 pub(crate) subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
162 pub(crate) next_token: ::std::option::Option<::std::string::String>,
163 pub(crate) max_results: ::std::option::Option<i32>,
164 pub(crate) dry_run: ::std::option::Option<bool>,
165}
166impl DescribeSubnetsInputBuilder {
167 /// Appends an item to `filters`.
168 ///
169 /// To override the contents of this collection use [`set_filters`](Self::set_filters).
170 ///
171 /// <p>The filters.</p>
172 /// <ul>
173 /// <li>
174 /// <p><code>availability-zone</code> - The Availability Zone for the subnet. You can also use <code>availabilityZone</code> as the filter name.</p></li>
175 /// <li>
176 /// <p><code>availability-zone-id</code> - The ID of the Availability Zone for the subnet. You can also use <code>availabilityZoneId</code> as the filter name.</p></li>
177 /// <li>
178 /// <p><code>available-ip-address-count</code> - The number of IPv4 addresses in the subnet that are available.</p></li>
179 /// <li>
180 /// <p><code>cidr-block</code> - The IPv4 CIDR block of the subnet. The CIDR block you specify must exactly match the subnet's CIDR block for information to be returned for the subnet. You can also use <code>cidr</code> or <code>cidrBlock</code> as the filter names.</p></li>
181 /// <li>
182 /// <p><code>customer-owned-ipv4-pool</code> - The customer-owned IPv4 address pool associated with the subnet.</p></li>
183 /// <li>
184 /// <p><code>default-for-az</code> - Indicates whether this is the default subnet for the Availability Zone (<code>true</code> | <code>false</code>). You can also use <code>defaultForAz</code> as the filter name.</p></li>
185 /// <li>
186 /// <p><code>enable-dns64</code> - Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.</p></li>
187 /// <li>
188 /// <p><code>enable-lni-at-device-index</code> - Indicates the device position for local network interfaces in this subnet. For example, <code>1</code> indicates local network interfaces in this subnet are the secondary network interface (eth1).</p></li>
189 /// <li>
190 /// <p><code>ipv6-cidr-block-association.ipv6-cidr-block</code> - An IPv6 CIDR block associated with the subnet.</p></li>
191 /// <li>
192 /// <p><code>ipv6-cidr-block-association.association-id</code> - An association ID for an IPv6 CIDR block associated with the subnet.</p></li>
193 /// <li>
194 /// <p><code>ipv6-cidr-block-association.state</code> - The state of an IPv6 CIDR block associated with the subnet.</p></li>
195 /// <li>
196 /// <p><code>ipv6-native</code> - Indicates whether this is an IPv6 only subnet (<code>true</code> | <code>false</code>).</p></li>
197 /// <li>
198 /// <p><code>map-customer-owned-ip-on-launch</code> - Indicates whether a network interface created in this subnet (including a network interface created by <code>RunInstances</code>) receives a customer-owned IPv4 address.</p></li>
199 /// <li>
200 /// <p><code>map-public-ip-on-launch</code> - Indicates whether instances launched in this subnet receive a public IPv4 address.</p></li>
201 /// <li>
202 /// <p><code>outpost-arn</code> - The Amazon Resource Name (ARN) of the Outpost.</p></li>
203 /// <li>
204 /// <p><code>owner-id</code> - The ID of the Amazon Web Services account that owns the subnet.</p></li>
205 /// <li>
206 /// <p><code>private-dns-name-options-on-launch.hostname-type</code> - The type of hostname to assign to instances in the subnet at launch. For IPv4-only and dual-stack (IPv4 and IPv6) subnets, an instance DNS name can be based on the instance IPv4 address (ip-name) or the instance ID (resource-name). For IPv6 only subnets, an instance DNS name must be based on the instance ID (resource-name).</p></li>
207 /// <li>
208 /// <p><code>private-dns-name-options-on-launch.enable-resource-name-dns-a-record</code> - Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p></li>
209 /// <li>
210 /// <p><code>private-dns-name-options-on-launch.enable-resource-name-dns-aaaa-record</code> - Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p></li>
211 /// <li>
212 /// <p><code>state</code> - The state of the subnet (<code>pending</code> | <code>available</code>).</p></li>
213 /// <li>
214 /// <p><code>subnet-arn</code> - The Amazon Resource Name (ARN) of the subnet.</p></li>
215 /// <li>
216 /// <p><code>subnet-id</code> - The ID of the subnet.</p></li>
217 /// <li>
218 /// <p><code>tag</code> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p></li>
219 /// <li>
220 /// <p><code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p></li>
221 /// <li>
222 /// <p><code>vpc-id</code> - The ID of the VPC for the subnet.</p></li>
223 /// </ul>
224 pub fn filters(mut self, input: crate::types::Filter) -> Self {
225 let mut v = self.filters.unwrap_or_default();
226 v.push(input);
227 self.filters = ::std::option::Option::Some(v);
228 self
229 }
230 /// <p>The filters.</p>
231 /// <ul>
232 /// <li>
233 /// <p><code>availability-zone</code> - The Availability Zone for the subnet. You can also use <code>availabilityZone</code> as the filter name.</p></li>
234 /// <li>
235 /// <p><code>availability-zone-id</code> - The ID of the Availability Zone for the subnet. You can also use <code>availabilityZoneId</code> as the filter name.</p></li>
236 /// <li>
237 /// <p><code>available-ip-address-count</code> - The number of IPv4 addresses in the subnet that are available.</p></li>
238 /// <li>
239 /// <p><code>cidr-block</code> - The IPv4 CIDR block of the subnet. The CIDR block you specify must exactly match the subnet's CIDR block for information to be returned for the subnet. You can also use <code>cidr</code> or <code>cidrBlock</code> as the filter names.</p></li>
240 /// <li>
241 /// <p><code>customer-owned-ipv4-pool</code> - The customer-owned IPv4 address pool associated with the subnet.</p></li>
242 /// <li>
243 /// <p><code>default-for-az</code> - Indicates whether this is the default subnet for the Availability Zone (<code>true</code> | <code>false</code>). You can also use <code>defaultForAz</code> as the filter name.</p></li>
244 /// <li>
245 /// <p><code>enable-dns64</code> - Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.</p></li>
246 /// <li>
247 /// <p><code>enable-lni-at-device-index</code> - Indicates the device position for local network interfaces in this subnet. For example, <code>1</code> indicates local network interfaces in this subnet are the secondary network interface (eth1).</p></li>
248 /// <li>
249 /// <p><code>ipv6-cidr-block-association.ipv6-cidr-block</code> - An IPv6 CIDR block associated with the subnet.</p></li>
250 /// <li>
251 /// <p><code>ipv6-cidr-block-association.association-id</code> - An association ID for an IPv6 CIDR block associated with the subnet.</p></li>
252 /// <li>
253 /// <p><code>ipv6-cidr-block-association.state</code> - The state of an IPv6 CIDR block associated with the subnet.</p></li>
254 /// <li>
255 /// <p><code>ipv6-native</code> - Indicates whether this is an IPv6 only subnet (<code>true</code> | <code>false</code>).</p></li>
256 /// <li>
257 /// <p><code>map-customer-owned-ip-on-launch</code> - Indicates whether a network interface created in this subnet (including a network interface created by <code>RunInstances</code>) receives a customer-owned IPv4 address.</p></li>
258 /// <li>
259 /// <p><code>map-public-ip-on-launch</code> - Indicates whether instances launched in this subnet receive a public IPv4 address.</p></li>
260 /// <li>
261 /// <p><code>outpost-arn</code> - The Amazon Resource Name (ARN) of the Outpost.</p></li>
262 /// <li>
263 /// <p><code>owner-id</code> - The ID of the Amazon Web Services account that owns the subnet.</p></li>
264 /// <li>
265 /// <p><code>private-dns-name-options-on-launch.hostname-type</code> - The type of hostname to assign to instances in the subnet at launch. For IPv4-only and dual-stack (IPv4 and IPv6) subnets, an instance DNS name can be based on the instance IPv4 address (ip-name) or the instance ID (resource-name). For IPv6 only subnets, an instance DNS name must be based on the instance ID (resource-name).</p></li>
266 /// <li>
267 /// <p><code>private-dns-name-options-on-launch.enable-resource-name-dns-a-record</code> - Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p></li>
268 /// <li>
269 /// <p><code>private-dns-name-options-on-launch.enable-resource-name-dns-aaaa-record</code> - Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p></li>
270 /// <li>
271 /// <p><code>state</code> - The state of the subnet (<code>pending</code> | <code>available</code>).</p></li>
272 /// <li>
273 /// <p><code>subnet-arn</code> - The Amazon Resource Name (ARN) of the subnet.</p></li>
274 /// <li>
275 /// <p><code>subnet-id</code> - The ID of the subnet.</p></li>
276 /// <li>
277 /// <p><code>tag</code> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p></li>
278 /// <li>
279 /// <p><code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p></li>
280 /// <li>
281 /// <p><code>vpc-id</code> - The ID of the VPC for the subnet.</p></li>
282 /// </ul>
283 pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
284 self.filters = input;
285 self
286 }
287 /// <p>The filters.</p>
288 /// <ul>
289 /// <li>
290 /// <p><code>availability-zone</code> - The Availability Zone for the subnet. You can also use <code>availabilityZone</code> as the filter name.</p></li>
291 /// <li>
292 /// <p><code>availability-zone-id</code> - The ID of the Availability Zone for the subnet. You can also use <code>availabilityZoneId</code> as the filter name.</p></li>
293 /// <li>
294 /// <p><code>available-ip-address-count</code> - The number of IPv4 addresses in the subnet that are available.</p></li>
295 /// <li>
296 /// <p><code>cidr-block</code> - The IPv4 CIDR block of the subnet. The CIDR block you specify must exactly match the subnet's CIDR block for information to be returned for the subnet. You can also use <code>cidr</code> or <code>cidrBlock</code> as the filter names.</p></li>
297 /// <li>
298 /// <p><code>customer-owned-ipv4-pool</code> - The customer-owned IPv4 address pool associated with the subnet.</p></li>
299 /// <li>
300 /// <p><code>default-for-az</code> - Indicates whether this is the default subnet for the Availability Zone (<code>true</code> | <code>false</code>). You can also use <code>defaultForAz</code> as the filter name.</p></li>
301 /// <li>
302 /// <p><code>enable-dns64</code> - Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.</p></li>
303 /// <li>
304 /// <p><code>enable-lni-at-device-index</code> - Indicates the device position for local network interfaces in this subnet. For example, <code>1</code> indicates local network interfaces in this subnet are the secondary network interface (eth1).</p></li>
305 /// <li>
306 /// <p><code>ipv6-cidr-block-association.ipv6-cidr-block</code> - An IPv6 CIDR block associated with the subnet.</p></li>
307 /// <li>
308 /// <p><code>ipv6-cidr-block-association.association-id</code> - An association ID for an IPv6 CIDR block associated with the subnet.</p></li>
309 /// <li>
310 /// <p><code>ipv6-cidr-block-association.state</code> - The state of an IPv6 CIDR block associated with the subnet.</p></li>
311 /// <li>
312 /// <p><code>ipv6-native</code> - Indicates whether this is an IPv6 only subnet (<code>true</code> | <code>false</code>).</p></li>
313 /// <li>
314 /// <p><code>map-customer-owned-ip-on-launch</code> - Indicates whether a network interface created in this subnet (including a network interface created by <code>RunInstances</code>) receives a customer-owned IPv4 address.</p></li>
315 /// <li>
316 /// <p><code>map-public-ip-on-launch</code> - Indicates whether instances launched in this subnet receive a public IPv4 address.</p></li>
317 /// <li>
318 /// <p><code>outpost-arn</code> - The Amazon Resource Name (ARN) of the Outpost.</p></li>
319 /// <li>
320 /// <p><code>owner-id</code> - The ID of the Amazon Web Services account that owns the subnet.</p></li>
321 /// <li>
322 /// <p><code>private-dns-name-options-on-launch.hostname-type</code> - The type of hostname to assign to instances in the subnet at launch. For IPv4-only and dual-stack (IPv4 and IPv6) subnets, an instance DNS name can be based on the instance IPv4 address (ip-name) or the instance ID (resource-name). For IPv6 only subnets, an instance DNS name must be based on the instance ID (resource-name).</p></li>
323 /// <li>
324 /// <p><code>private-dns-name-options-on-launch.enable-resource-name-dns-a-record</code> - Indicates whether to respond to DNS queries for instance hostnames with DNS A records.</p></li>
325 /// <li>
326 /// <p><code>private-dns-name-options-on-launch.enable-resource-name-dns-aaaa-record</code> - Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.</p></li>
327 /// <li>
328 /// <p><code>state</code> - The state of the subnet (<code>pending</code> | <code>available</code>).</p></li>
329 /// <li>
330 /// <p><code>subnet-arn</code> - The Amazon Resource Name (ARN) of the subnet.</p></li>
331 /// <li>
332 /// <p><code>subnet-id</code> - The ID of the subnet.</p></li>
333 /// <li>
334 /// <p><code>tag</code> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p></li>
335 /// <li>
336 /// <p><code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p></li>
337 /// <li>
338 /// <p><code>vpc-id</code> - The ID of the VPC for the subnet.</p></li>
339 /// </ul>
340 pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
341 &self.filters
342 }
343 /// Appends an item to `subnet_ids`.
344 ///
345 /// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
346 ///
347 /// <p>The IDs of the subnets.</p>
348 /// <p>Default: Describes all your subnets.</p>
349 pub fn subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
350 let mut v = self.subnet_ids.unwrap_or_default();
351 v.push(input.into());
352 self.subnet_ids = ::std::option::Option::Some(v);
353 self
354 }
355 /// <p>The IDs of the subnets.</p>
356 /// <p>Default: Describes all your subnets.</p>
357 pub fn set_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
358 self.subnet_ids = input;
359 self
360 }
361 /// <p>The IDs of the subnets.</p>
362 /// <p>Default: Describes all your subnets.</p>
363 pub fn get_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
364 &self.subnet_ids
365 }
366 /// <p>The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.</p>
367 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
368 self.next_token = ::std::option::Option::Some(input.into());
369 self
370 }
371 /// <p>The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.</p>
372 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
373 self.next_token = input;
374 self
375 }
376 /// <p>The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.</p>
377 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
378 &self.next_token
379 }
380 /// <p>The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination">Pagination</a>.</p>
381 pub fn max_results(mut self, input: i32) -> Self {
382 self.max_results = ::std::option::Option::Some(input);
383 self
384 }
385 /// <p>The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination">Pagination</a>.</p>
386 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
387 self.max_results = input;
388 self
389 }
390 /// <p>The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination">Pagination</a>.</p>
391 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
392 &self.max_results
393 }
394 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
395 pub fn dry_run(mut self, input: bool) -> Self {
396 self.dry_run = ::std::option::Option::Some(input);
397 self
398 }
399 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
400 pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
401 self.dry_run = input;
402 self
403 }
404 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
405 pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
406 &self.dry_run
407 }
408 /// Consumes the builder and constructs a [`DescribeSubnetsInput`](crate::operation::describe_subnets::DescribeSubnetsInput).
409 pub fn build(
410 self,
411 ) -> ::std::result::Result<crate::operation::describe_subnets::DescribeSubnetsInput, ::aws_smithy_types::error::operation::BuildError> {
412 ::std::result::Result::Ok(crate::operation::describe_subnets::DescribeSubnetsInput {
413 filters: self.filters,
414 subnet_ids: self.subnet_ids,
415 next_token: self.next_token,
416 max_results: self.max_results,
417 dry_run: self.dry_run,
418 })
419 }
420}