aws_sdk_ec2/operation/describe_vpcs/_describe_vpcs_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 DescribeVpcsInput {
6 /// <p>The filters.</p>
7 /// <ul>
8 /// <li>
9 /// <p><code>cidr</code> - The primary IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, <code>/28</code>).</p></li>
10 /// <li>
11 /// <p><code>cidr-block-association.cidr-block</code> - An IPv4 CIDR block associated with the VPC.</p></li>
12 /// <li>
13 /// <p><code>cidr-block-association.association-id</code> - The association ID for an IPv4 CIDR block associated with the VPC.</p></li>
14 /// <li>
15 /// <p><code>cidr-block-association.state</code> - The state of an IPv4 CIDR block associated with the VPC.</p></li>
16 /// <li>
17 /// <p><code>dhcp-options-id</code> - The ID of a set of DHCP options.</p></li>
18 /// <li>
19 /// <p><code>ipv6-cidr-block-association.ipv6-cidr-block</code> - An IPv6 CIDR block associated with the VPC.</p></li>
20 /// <li>
21 /// <p><code>ipv6-cidr-block-association.ipv6-pool</code> - The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.</p></li>
22 /// <li>
23 /// <p><code>ipv6-cidr-block-association.association-id</code> - The association ID for an IPv6 CIDR block associated with the VPC.</p></li>
24 /// <li>
25 /// <p><code>ipv6-cidr-block-association.state</code> - The state of an IPv6 CIDR block associated with the VPC.</p></li>
26 /// <li>
27 /// <p><code>is-default</code> - Indicates whether the VPC is the default VPC.</p></li>
28 /// <li>
29 /// <p><code>owner-id</code> - The ID of the Amazon Web Services account that owns the VPC.</p></li>
30 /// <li>
31 /// <p><code>state</code> - The state of the VPC (<code>pending</code> | <code>available</code>).</p></li>
32 /// <li>
33 /// <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>
34 /// <li>
35 /// <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>
36 /// <li>
37 /// <p><code>vpc-id</code> - The ID of the VPC.</p></li>
38 /// </ul>
39 pub filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
40 /// <p>The IDs of the VPCs.</p>
41 pub vpc_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
42 /// <p>The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.</p>
43 pub next_token: ::std::option::Option<::std::string::String>,
44 /// <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>
45 pub max_results: ::std::option::Option<i32>,
46 /// <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>
47 pub dry_run: ::std::option::Option<bool>,
48}
49impl DescribeVpcsInput {
50 /// <p>The filters.</p>
51 /// <ul>
52 /// <li>
53 /// <p><code>cidr</code> - The primary IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, <code>/28</code>).</p></li>
54 /// <li>
55 /// <p><code>cidr-block-association.cidr-block</code> - An IPv4 CIDR block associated with the VPC.</p></li>
56 /// <li>
57 /// <p><code>cidr-block-association.association-id</code> - The association ID for an IPv4 CIDR block associated with the VPC.</p></li>
58 /// <li>
59 /// <p><code>cidr-block-association.state</code> - The state of an IPv4 CIDR block associated with the VPC.</p></li>
60 /// <li>
61 /// <p><code>dhcp-options-id</code> - The ID of a set of DHCP options.</p></li>
62 /// <li>
63 /// <p><code>ipv6-cidr-block-association.ipv6-cidr-block</code> - An IPv6 CIDR block associated with the VPC.</p></li>
64 /// <li>
65 /// <p><code>ipv6-cidr-block-association.ipv6-pool</code> - The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.</p></li>
66 /// <li>
67 /// <p><code>ipv6-cidr-block-association.association-id</code> - The association ID for an IPv6 CIDR block associated with the VPC.</p></li>
68 /// <li>
69 /// <p><code>ipv6-cidr-block-association.state</code> - The state of an IPv6 CIDR block associated with the VPC.</p></li>
70 /// <li>
71 /// <p><code>is-default</code> - Indicates whether the VPC is the default VPC.</p></li>
72 /// <li>
73 /// <p><code>owner-id</code> - The ID of the Amazon Web Services account that owns the VPC.</p></li>
74 /// <li>
75 /// <p><code>state</code> - The state of the VPC (<code>pending</code> | <code>available</code>).</p></li>
76 /// <li>
77 /// <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>
78 /// <li>
79 /// <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>
80 /// <li>
81 /// <p><code>vpc-id</code> - The ID of the VPC.</p></li>
82 /// </ul>
83 ///
84 /// 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()`.
85 pub fn filters(&self) -> &[crate::types::Filter] {
86 self.filters.as_deref().unwrap_or_default()
87 }
88 /// <p>The IDs of the VPCs.</p>
89 ///
90 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.vpc_ids.is_none()`.
91 pub fn vpc_ids(&self) -> &[::std::string::String] {
92 self.vpc_ids.as_deref().unwrap_or_default()
93 }
94 /// <p>The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.</p>
95 pub fn next_token(&self) -> ::std::option::Option<&str> {
96 self.next_token.as_deref()
97 }
98 /// <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>
99 pub fn max_results(&self) -> ::std::option::Option<i32> {
100 self.max_results
101 }
102 /// <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>
103 pub fn dry_run(&self) -> ::std::option::Option<bool> {
104 self.dry_run
105 }
106}
107impl DescribeVpcsInput {
108 /// Creates a new builder-style object to manufacture [`DescribeVpcsInput`](crate::operation::describe_vpcs::DescribeVpcsInput).
109 pub fn builder() -> crate::operation::describe_vpcs::builders::DescribeVpcsInputBuilder {
110 crate::operation::describe_vpcs::builders::DescribeVpcsInputBuilder::default()
111 }
112}
113
114/// A builder for [`DescribeVpcsInput`](crate::operation::describe_vpcs::DescribeVpcsInput).
115#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
116#[non_exhaustive]
117pub struct DescribeVpcsInputBuilder {
118 pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
119 pub(crate) vpc_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
120 pub(crate) next_token: ::std::option::Option<::std::string::String>,
121 pub(crate) max_results: ::std::option::Option<i32>,
122 pub(crate) dry_run: ::std::option::Option<bool>,
123}
124impl DescribeVpcsInputBuilder {
125 /// Appends an item to `filters`.
126 ///
127 /// To override the contents of this collection use [`set_filters`](Self::set_filters).
128 ///
129 /// <p>The filters.</p>
130 /// <ul>
131 /// <li>
132 /// <p><code>cidr</code> - The primary IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, <code>/28</code>).</p></li>
133 /// <li>
134 /// <p><code>cidr-block-association.cidr-block</code> - An IPv4 CIDR block associated with the VPC.</p></li>
135 /// <li>
136 /// <p><code>cidr-block-association.association-id</code> - The association ID for an IPv4 CIDR block associated with the VPC.</p></li>
137 /// <li>
138 /// <p><code>cidr-block-association.state</code> - The state of an IPv4 CIDR block associated with the VPC.</p></li>
139 /// <li>
140 /// <p><code>dhcp-options-id</code> - The ID of a set of DHCP options.</p></li>
141 /// <li>
142 /// <p><code>ipv6-cidr-block-association.ipv6-cidr-block</code> - An IPv6 CIDR block associated with the VPC.</p></li>
143 /// <li>
144 /// <p><code>ipv6-cidr-block-association.ipv6-pool</code> - The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.</p></li>
145 /// <li>
146 /// <p><code>ipv6-cidr-block-association.association-id</code> - The association ID for an IPv6 CIDR block associated with the VPC.</p></li>
147 /// <li>
148 /// <p><code>ipv6-cidr-block-association.state</code> - The state of an IPv6 CIDR block associated with the VPC.</p></li>
149 /// <li>
150 /// <p><code>is-default</code> - Indicates whether the VPC is the default VPC.</p></li>
151 /// <li>
152 /// <p><code>owner-id</code> - The ID of the Amazon Web Services account that owns the VPC.</p></li>
153 /// <li>
154 /// <p><code>state</code> - The state of the VPC (<code>pending</code> | <code>available</code>).</p></li>
155 /// <li>
156 /// <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>
157 /// <li>
158 /// <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>
159 /// <li>
160 /// <p><code>vpc-id</code> - The ID of the VPC.</p></li>
161 /// </ul>
162 pub fn filters(mut self, input: crate::types::Filter) -> Self {
163 let mut v = self.filters.unwrap_or_default();
164 v.push(input);
165 self.filters = ::std::option::Option::Some(v);
166 self
167 }
168 /// <p>The filters.</p>
169 /// <ul>
170 /// <li>
171 /// <p><code>cidr</code> - The primary IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, <code>/28</code>).</p></li>
172 /// <li>
173 /// <p><code>cidr-block-association.cidr-block</code> - An IPv4 CIDR block associated with the VPC.</p></li>
174 /// <li>
175 /// <p><code>cidr-block-association.association-id</code> - The association ID for an IPv4 CIDR block associated with the VPC.</p></li>
176 /// <li>
177 /// <p><code>cidr-block-association.state</code> - The state of an IPv4 CIDR block associated with the VPC.</p></li>
178 /// <li>
179 /// <p><code>dhcp-options-id</code> - The ID of a set of DHCP options.</p></li>
180 /// <li>
181 /// <p><code>ipv6-cidr-block-association.ipv6-cidr-block</code> - An IPv6 CIDR block associated with the VPC.</p></li>
182 /// <li>
183 /// <p><code>ipv6-cidr-block-association.ipv6-pool</code> - The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.</p></li>
184 /// <li>
185 /// <p><code>ipv6-cidr-block-association.association-id</code> - The association ID for an IPv6 CIDR block associated with the VPC.</p></li>
186 /// <li>
187 /// <p><code>ipv6-cidr-block-association.state</code> - The state of an IPv6 CIDR block associated with the VPC.</p></li>
188 /// <li>
189 /// <p><code>is-default</code> - Indicates whether the VPC is the default VPC.</p></li>
190 /// <li>
191 /// <p><code>owner-id</code> - The ID of the Amazon Web Services account that owns the VPC.</p></li>
192 /// <li>
193 /// <p><code>state</code> - The state of the VPC (<code>pending</code> | <code>available</code>).</p></li>
194 /// <li>
195 /// <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>
196 /// <li>
197 /// <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>
198 /// <li>
199 /// <p><code>vpc-id</code> - The ID of the VPC.</p></li>
200 /// </ul>
201 pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
202 self.filters = input;
203 self
204 }
205 /// <p>The filters.</p>
206 /// <ul>
207 /// <li>
208 /// <p><code>cidr</code> - The primary IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, <code>/28</code>).</p></li>
209 /// <li>
210 /// <p><code>cidr-block-association.cidr-block</code> - An IPv4 CIDR block associated with the VPC.</p></li>
211 /// <li>
212 /// <p><code>cidr-block-association.association-id</code> - The association ID for an IPv4 CIDR block associated with the VPC.</p></li>
213 /// <li>
214 /// <p><code>cidr-block-association.state</code> - The state of an IPv4 CIDR block associated with the VPC.</p></li>
215 /// <li>
216 /// <p><code>dhcp-options-id</code> - The ID of a set of DHCP options.</p></li>
217 /// <li>
218 /// <p><code>ipv6-cidr-block-association.ipv6-cidr-block</code> - An IPv6 CIDR block associated with the VPC.</p></li>
219 /// <li>
220 /// <p><code>ipv6-cidr-block-association.ipv6-pool</code> - The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.</p></li>
221 /// <li>
222 /// <p><code>ipv6-cidr-block-association.association-id</code> - The association ID for an IPv6 CIDR block associated with the VPC.</p></li>
223 /// <li>
224 /// <p><code>ipv6-cidr-block-association.state</code> - The state of an IPv6 CIDR block associated with the VPC.</p></li>
225 /// <li>
226 /// <p><code>is-default</code> - Indicates whether the VPC is the default VPC.</p></li>
227 /// <li>
228 /// <p><code>owner-id</code> - The ID of the Amazon Web Services account that owns the VPC.</p></li>
229 /// <li>
230 /// <p><code>state</code> - The state of the VPC (<code>pending</code> | <code>available</code>).</p></li>
231 /// <li>
232 /// <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>
233 /// <li>
234 /// <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>
235 /// <li>
236 /// <p><code>vpc-id</code> - The ID of the VPC.</p></li>
237 /// </ul>
238 pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
239 &self.filters
240 }
241 /// Appends an item to `vpc_ids`.
242 ///
243 /// To override the contents of this collection use [`set_vpc_ids`](Self::set_vpc_ids).
244 ///
245 /// <p>The IDs of the VPCs.</p>
246 pub fn vpc_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
247 let mut v = self.vpc_ids.unwrap_or_default();
248 v.push(input.into());
249 self.vpc_ids = ::std::option::Option::Some(v);
250 self
251 }
252 /// <p>The IDs of the VPCs.</p>
253 pub fn set_vpc_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
254 self.vpc_ids = input;
255 self
256 }
257 /// <p>The IDs of the VPCs.</p>
258 pub fn get_vpc_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
259 &self.vpc_ids
260 }
261 /// <p>The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.</p>
262 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
263 self.next_token = ::std::option::Option::Some(input.into());
264 self
265 }
266 /// <p>The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.</p>
267 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
268 self.next_token = input;
269 self
270 }
271 /// <p>The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.</p>
272 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
273 &self.next_token
274 }
275 /// <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>
276 pub fn max_results(mut self, input: i32) -> Self {
277 self.max_results = ::std::option::Option::Some(input);
278 self
279 }
280 /// <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>
281 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
282 self.max_results = input;
283 self
284 }
285 /// <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>
286 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
287 &self.max_results
288 }
289 /// <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>
290 pub fn dry_run(mut self, input: bool) -> Self {
291 self.dry_run = ::std::option::Option::Some(input);
292 self
293 }
294 /// <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>
295 pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
296 self.dry_run = input;
297 self
298 }
299 /// <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>
300 pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
301 &self.dry_run
302 }
303 /// Consumes the builder and constructs a [`DescribeVpcsInput`](crate::operation::describe_vpcs::DescribeVpcsInput).
304 pub fn build(
305 self,
306 ) -> ::std::result::Result<crate::operation::describe_vpcs::DescribeVpcsInput, ::aws_smithy_types::error::operation::BuildError> {
307 ::std::result::Result::Ok(crate::operation::describe_vpcs::DescribeVpcsInput {
308 filters: self.filters,
309 vpc_ids: self.vpc_ids,
310 next_token: self.next_token,
311 max_results: self.max_results,
312 dry_run: self.dry_run,
313 })
314 }
315}