aws_sdk_ec2/operation/describe_addresses/
_describe_addresses_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 DescribeAddressesInput {
6    /// <p>One or more Elastic IP addresses.</p>
7    /// <p>Default: Describes all your Elastic IP addresses.</p>
8    pub public_ips: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
9    /// <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>
10    pub dry_run: ::std::option::Option<bool>,
11    /// <p>One or more filters. Filter names and values are case-sensitive.</p>
12    /// <ul>
13    /// <li>
14    /// <p><code>allocation-id</code> - The allocation ID for the address.</p></li>
15    /// <li>
16    /// <p><code>association-id</code> - The association ID for the address.</p></li>
17    /// <li>
18    /// <p><code>instance-id</code> - The ID of the instance the address is associated with, if any.</p></li>
19    /// <li>
20    /// <p><code>network-border-group</code> - A unique set of Availability Zones, Local Zones, or Wavelength Zones from where Amazon Web Services advertises IP addresses.</p></li>
21    /// <li>
22    /// <p><code>network-interface-id</code> - The ID of the network interface that the address is associated with, if any.</p></li>
23    /// <li>
24    /// <p><code>network-interface-owner-id</code> - The Amazon Web Services account ID of the owner.</p></li>
25    /// <li>
26    /// <p><code>private-ip-address</code> - The private IP address associated with the Elastic IP address.</p></li>
27    /// <li>
28    /// <p><code>public-ip</code> - The Elastic IP address, or the carrier IP address.</p></li>
29    /// <li>
30    /// <p><code>tag</code>:<key>
31    /// - 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
32    /// <code>Owner</code> and the value
33    /// <code>TeamA</code>, specify
34    /// <code>tag:Owner</code> for the filter name and
35    /// <code>TeamA</code> for the filter value.
36    /// </key></p></li>
37    /// <li>
38    /// <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>
39    /// </ul>
40    pub filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
41    /// <p>Information about the allocation IDs.</p>
42    pub allocation_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
43}
44impl DescribeAddressesInput {
45    /// <p>One or more Elastic IP addresses.</p>
46    /// <p>Default: Describes all your Elastic IP addresses.</p>
47    ///
48    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.public_ips.is_none()`.
49    pub fn public_ips(&self) -> &[::std::string::String] {
50        self.public_ips.as_deref().unwrap_or_default()
51    }
52    /// <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>
53    pub fn dry_run(&self) -> ::std::option::Option<bool> {
54        self.dry_run
55    }
56    /// <p>One or more filters. Filter names and values are case-sensitive.</p>
57    /// <ul>
58    /// <li>
59    /// <p><code>allocation-id</code> - The allocation ID for the address.</p></li>
60    /// <li>
61    /// <p><code>association-id</code> - The association ID for the address.</p></li>
62    /// <li>
63    /// <p><code>instance-id</code> - The ID of the instance the address is associated with, if any.</p></li>
64    /// <li>
65    /// <p><code>network-border-group</code> - A unique set of Availability Zones, Local Zones, or Wavelength Zones from where Amazon Web Services advertises IP addresses.</p></li>
66    /// <li>
67    /// <p><code>network-interface-id</code> - The ID of the network interface that the address is associated with, if any.</p></li>
68    /// <li>
69    /// <p><code>network-interface-owner-id</code> - The Amazon Web Services account ID of the owner.</p></li>
70    /// <li>
71    /// <p><code>private-ip-address</code> - The private IP address associated with the Elastic IP address.</p></li>
72    /// <li>
73    /// <p><code>public-ip</code> - The Elastic IP address, or the carrier IP address.</p></li>
74    /// <li>
75    /// <p><code>tag</code>:<key>
76    /// - 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
77    /// <code>Owner</code> and the value
78    /// <code>TeamA</code>, specify
79    /// <code>tag:Owner</code> for the filter name and
80    /// <code>TeamA</code> for the filter value.
81    /// </key></p></li>
82    /// <li>
83    /// <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>
84    /// </ul>
85    ///
86    /// 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()`.
87    pub fn filters(&self) -> &[crate::types::Filter] {
88        self.filters.as_deref().unwrap_or_default()
89    }
90    /// <p>Information about the allocation IDs.</p>
91    ///
92    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.allocation_ids.is_none()`.
93    pub fn allocation_ids(&self) -> &[::std::string::String] {
94        self.allocation_ids.as_deref().unwrap_or_default()
95    }
96}
97impl DescribeAddressesInput {
98    /// Creates a new builder-style object to manufacture [`DescribeAddressesInput`](crate::operation::describe_addresses::DescribeAddressesInput).
99    pub fn builder() -> crate::operation::describe_addresses::builders::DescribeAddressesInputBuilder {
100        crate::operation::describe_addresses::builders::DescribeAddressesInputBuilder::default()
101    }
102}
103
104/// A builder for [`DescribeAddressesInput`](crate::operation::describe_addresses::DescribeAddressesInput).
105#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
106#[non_exhaustive]
107pub struct DescribeAddressesInputBuilder {
108    pub(crate) public_ips: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
109    pub(crate) dry_run: ::std::option::Option<bool>,
110    pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
111    pub(crate) allocation_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
112}
113impl DescribeAddressesInputBuilder {
114    /// Appends an item to `public_ips`.
115    ///
116    /// To override the contents of this collection use [`set_public_ips`](Self::set_public_ips).
117    ///
118    /// <p>One or more Elastic IP addresses.</p>
119    /// <p>Default: Describes all your Elastic IP addresses.</p>
120    pub fn public_ips(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121        let mut v = self.public_ips.unwrap_or_default();
122        v.push(input.into());
123        self.public_ips = ::std::option::Option::Some(v);
124        self
125    }
126    /// <p>One or more Elastic IP addresses.</p>
127    /// <p>Default: Describes all your Elastic IP addresses.</p>
128    pub fn set_public_ips(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
129        self.public_ips = input;
130        self
131    }
132    /// <p>One or more Elastic IP addresses.</p>
133    /// <p>Default: Describes all your Elastic IP addresses.</p>
134    pub fn get_public_ips(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
135        &self.public_ips
136    }
137    /// <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>
138    pub fn dry_run(mut self, input: bool) -> Self {
139        self.dry_run = ::std::option::Option::Some(input);
140        self
141    }
142    /// <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>
143    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
144        self.dry_run = input;
145        self
146    }
147    /// <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>
148    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
149        &self.dry_run
150    }
151    /// Appends an item to `filters`.
152    ///
153    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
154    ///
155    /// <p>One or more filters. Filter names and values are case-sensitive.</p>
156    /// <ul>
157    /// <li>
158    /// <p><code>allocation-id</code> - The allocation ID for the address.</p></li>
159    /// <li>
160    /// <p><code>association-id</code> - The association ID for the address.</p></li>
161    /// <li>
162    /// <p><code>instance-id</code> - The ID of the instance the address is associated with, if any.</p></li>
163    /// <li>
164    /// <p><code>network-border-group</code> - A unique set of Availability Zones, Local Zones, or Wavelength Zones from where Amazon Web Services advertises IP addresses.</p></li>
165    /// <li>
166    /// <p><code>network-interface-id</code> - The ID of the network interface that the address is associated with, if any.</p></li>
167    /// <li>
168    /// <p><code>network-interface-owner-id</code> - The Amazon Web Services account ID of the owner.</p></li>
169    /// <li>
170    /// <p><code>private-ip-address</code> - The private IP address associated with the Elastic IP address.</p></li>
171    /// <li>
172    /// <p><code>public-ip</code> - The Elastic IP address, or the carrier IP address.</p></li>
173    /// <li>
174    /// <p><code>tag</code>:<key>
175    /// - 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
176    /// <code>Owner</code> and the value
177    /// <code>TeamA</code>, specify
178    /// <code>tag:Owner</code> for the filter name and
179    /// <code>TeamA</code> for the filter value.
180    /// </key></p></li>
181    /// <li>
182    /// <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>
183    /// </ul>
184    pub fn filters(mut self, input: crate::types::Filter) -> Self {
185        let mut v = self.filters.unwrap_or_default();
186        v.push(input);
187        self.filters = ::std::option::Option::Some(v);
188        self
189    }
190    /// <p>One or more filters. Filter names and values are case-sensitive.</p>
191    /// <ul>
192    /// <li>
193    /// <p><code>allocation-id</code> - The allocation ID for the address.</p></li>
194    /// <li>
195    /// <p><code>association-id</code> - The association ID for the address.</p></li>
196    /// <li>
197    /// <p><code>instance-id</code> - The ID of the instance the address is associated with, if any.</p></li>
198    /// <li>
199    /// <p><code>network-border-group</code> - A unique set of Availability Zones, Local Zones, or Wavelength Zones from where Amazon Web Services advertises IP addresses.</p></li>
200    /// <li>
201    /// <p><code>network-interface-id</code> - The ID of the network interface that the address is associated with, if any.</p></li>
202    /// <li>
203    /// <p><code>network-interface-owner-id</code> - The Amazon Web Services account ID of the owner.</p></li>
204    /// <li>
205    /// <p><code>private-ip-address</code> - The private IP address associated with the Elastic IP address.</p></li>
206    /// <li>
207    /// <p><code>public-ip</code> - The Elastic IP address, or the carrier IP address.</p></li>
208    /// <li>
209    /// <p><code>tag</code>:<key>
210    /// - 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
211    /// <code>Owner</code> and the value
212    /// <code>TeamA</code>, specify
213    /// <code>tag:Owner</code> for the filter name and
214    /// <code>TeamA</code> for the filter value.
215    /// </key></p></li>
216    /// <li>
217    /// <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>
218    /// </ul>
219    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
220        self.filters = input;
221        self
222    }
223    /// <p>One or more filters. Filter names and values are case-sensitive.</p>
224    /// <ul>
225    /// <li>
226    /// <p><code>allocation-id</code> - The allocation ID for the address.</p></li>
227    /// <li>
228    /// <p><code>association-id</code> - The association ID for the address.</p></li>
229    /// <li>
230    /// <p><code>instance-id</code> - The ID of the instance the address is associated with, if any.</p></li>
231    /// <li>
232    /// <p><code>network-border-group</code> - A unique set of Availability Zones, Local Zones, or Wavelength Zones from where Amazon Web Services advertises IP addresses.</p></li>
233    /// <li>
234    /// <p><code>network-interface-id</code> - The ID of the network interface that the address is associated with, if any.</p></li>
235    /// <li>
236    /// <p><code>network-interface-owner-id</code> - The Amazon Web Services account ID of the owner.</p></li>
237    /// <li>
238    /// <p><code>private-ip-address</code> - The private IP address associated with the Elastic IP address.</p></li>
239    /// <li>
240    /// <p><code>public-ip</code> - The Elastic IP address, or the carrier IP address.</p></li>
241    /// <li>
242    /// <p><code>tag</code>:<key>
243    /// - 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
244    /// <code>Owner</code> and the value
245    /// <code>TeamA</code>, specify
246    /// <code>tag:Owner</code> for the filter name and
247    /// <code>TeamA</code> for the filter value.
248    /// </key></p></li>
249    /// <li>
250    /// <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>
251    /// </ul>
252    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
253        &self.filters
254    }
255    /// Appends an item to `allocation_ids`.
256    ///
257    /// To override the contents of this collection use [`set_allocation_ids`](Self::set_allocation_ids).
258    ///
259    /// <p>Information about the allocation IDs.</p>
260    pub fn allocation_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
261        let mut v = self.allocation_ids.unwrap_or_default();
262        v.push(input.into());
263        self.allocation_ids = ::std::option::Option::Some(v);
264        self
265    }
266    /// <p>Information about the allocation IDs.</p>
267    pub fn set_allocation_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
268        self.allocation_ids = input;
269        self
270    }
271    /// <p>Information about the allocation IDs.</p>
272    pub fn get_allocation_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
273        &self.allocation_ids
274    }
275    /// Consumes the builder and constructs a [`DescribeAddressesInput`](crate::operation::describe_addresses::DescribeAddressesInput).
276    pub fn build(
277        self,
278    ) -> ::std::result::Result<crate::operation::describe_addresses::DescribeAddressesInput, ::aws_smithy_types::error::operation::BuildError> {
279        ::std::result::Result::Ok(crate::operation::describe_addresses::DescribeAddressesInput {
280            public_ips: self.public_ips,
281            dry_run: self.dry_run,
282            filters: self.filters,
283            allocation_ids: self.allocation_ids,
284        })
285    }
286}