aws_sdk_ec2/operation/describe_addresses/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_addresses::_describe_addresses_output::DescribeAddressesOutputBuilder;
3
4pub use crate::operation::describe_addresses::_describe_addresses_input::DescribeAddressesInputBuilder;
5
6impl crate::operation::describe_addresses::builders::DescribeAddressesInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::describe_addresses::DescribeAddressesOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::describe_addresses::DescribeAddressesError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.describe_addresses();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `DescribeAddresses`.
24///
25/// <p>Describes the specified Elastic IP addresses or all of your Elastic IP addresses.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct DescribeAddressesFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::describe_addresses::builders::DescribeAddressesInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::describe_addresses::DescribeAddressesOutput,
35 crate::operation::describe_addresses::DescribeAddressesError,
36 > for DescribeAddressesFluentBuilder
37{
38 fn send(
39 self,
40 config_override: crate::config::Builder,
41 ) -> crate::client::customize::internal::BoxFuture<
42 crate::client::customize::internal::SendResult<
43 crate::operation::describe_addresses::DescribeAddressesOutput,
44 crate::operation::describe_addresses::DescribeAddressesError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl DescribeAddressesFluentBuilder {
51 /// Creates a new `DescribeAddressesFluentBuilder`.
52 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53 Self {
54 handle,
55 inner: ::std::default::Default::default(),
56 config_override: ::std::option::Option::None,
57 }
58 }
59 /// Access the DescribeAddresses as a reference.
60 pub fn as_input(&self) -> &crate::operation::describe_addresses::builders::DescribeAddressesInputBuilder {
61 &self.inner
62 }
63 /// Sends the request and returns the response.
64 ///
65 /// If an error occurs, an `SdkError` will be returned with additional details that
66 /// can be matched against.
67 ///
68 /// By default, any retryable failures will be retried twice. Retry behavior
69 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70 /// set when configuring the client.
71 pub async fn send(
72 self,
73 ) -> ::std::result::Result<
74 crate::operation::describe_addresses::DescribeAddressesOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::describe_addresses::DescribeAddressesError,
77 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78 >,
79 > {
80 let input = self
81 .inner
82 .build()
83 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84 let runtime_plugins = crate::operation::describe_addresses::DescribeAddresses::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::describe_addresses::DescribeAddresses::orchestrate(&runtime_plugins, input).await
90 }
91
92 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93 pub fn customize(
94 self,
95 ) -> crate::client::customize::CustomizableOperation<
96 crate::operation::describe_addresses::DescribeAddressesOutput,
97 crate::operation::describe_addresses::DescribeAddressesError,
98 Self,
99 > {
100 crate::client::customize::CustomizableOperation::new(self)
101 }
102 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103 self.set_config_override(::std::option::Option::Some(config_override.into()));
104 self
105 }
106
107 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108 self.config_override = config_override;
109 self
110 }
111 ///
112 /// Appends an item to `PublicIps`.
113 ///
114 /// To override the contents of this collection use [`set_public_ips`](Self::set_public_ips).
115 ///
116 /// <p>One or more Elastic IP addresses.</p>
117 /// <p>Default: Describes all your Elastic IP addresses.</p>
118 pub fn public_ips(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119 self.inner = self.inner.public_ips(input.into());
120 self
121 }
122 /// <p>One or more Elastic IP addresses.</p>
123 /// <p>Default: Describes all your Elastic IP addresses.</p>
124 pub fn set_public_ips(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
125 self.inner = self.inner.set_public_ips(input);
126 self
127 }
128 /// <p>One or more Elastic IP addresses.</p>
129 /// <p>Default: Describes all your Elastic IP addresses.</p>
130 pub fn get_public_ips(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
131 self.inner.get_public_ips()
132 }
133 /// <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>
134 pub fn dry_run(mut self, input: bool) -> Self {
135 self.inner = self.inner.dry_run(input);
136 self
137 }
138 /// <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>
139 pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
140 self.inner = self.inner.set_dry_run(input);
141 self
142 }
143 /// <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>
144 pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
145 self.inner.get_dry_run()
146 }
147 ///
148 /// Appends an item to `Filters`.
149 ///
150 /// To override the contents of this collection use [`set_filters`](Self::set_filters).
151 ///
152 /// <p>One or more filters. Filter names and values are case-sensitive.</p>
153 /// <ul>
154 /// <li>
155 /// <p><code>allocation-id</code> - The allocation ID for the address.</p></li>
156 /// <li>
157 /// <p><code>association-id</code> - The association ID for the address.</p></li>
158 /// <li>
159 /// <p><code>instance-id</code> - The ID of the instance the address is associated with, if any.</p></li>
160 /// <li>
161 /// <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>
162 /// <li>
163 /// <p><code>network-interface-id</code> - The ID of the network interface that the address is associated with, if any.</p></li>
164 /// <li>
165 /// <p><code>network-interface-owner-id</code> - The Amazon Web Services account ID of the owner.</p></li>
166 /// <li>
167 /// <p><code>private-ip-address</code> - The private IP address associated with the Elastic IP address.</p></li>
168 /// <li>
169 /// <p><code>public-ip</code> - The Elastic IP address, or the carrier IP address.</p></li>
170 /// <li>
171 /// <p><code>tag</code>:<key>
172 /// - 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
173 /// <code>Owner</code> and the value
174 /// <code>TeamA</code>, specify
175 /// <code>tag:Owner</code> for the filter name and
176 /// <code>TeamA</code> for the filter value.
177 /// </key></p></li>
178 /// <li>
179 /// <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>
180 /// </ul>
181 pub fn filters(mut self, input: crate::types::Filter) -> Self {
182 self.inner = self.inner.filters(input);
183 self
184 }
185 /// <p>One or more filters. Filter names and values are case-sensitive.</p>
186 /// <ul>
187 /// <li>
188 /// <p><code>allocation-id</code> - The allocation ID for the address.</p></li>
189 /// <li>
190 /// <p><code>association-id</code> - The association ID for the address.</p></li>
191 /// <li>
192 /// <p><code>instance-id</code> - The ID of the instance the address is associated with, if any.</p></li>
193 /// <li>
194 /// <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>
195 /// <li>
196 /// <p><code>network-interface-id</code> - The ID of the network interface that the address is associated with, if any.</p></li>
197 /// <li>
198 /// <p><code>network-interface-owner-id</code> - The Amazon Web Services account ID of the owner.</p></li>
199 /// <li>
200 /// <p><code>private-ip-address</code> - The private IP address associated with the Elastic IP address.</p></li>
201 /// <li>
202 /// <p><code>public-ip</code> - The Elastic IP address, or the carrier IP address.</p></li>
203 /// <li>
204 /// <p><code>tag</code>:<key>
205 /// - 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
206 /// <code>Owner</code> and the value
207 /// <code>TeamA</code>, specify
208 /// <code>tag:Owner</code> for the filter name and
209 /// <code>TeamA</code> for the filter value.
210 /// </key></p></li>
211 /// <li>
212 /// <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>
213 /// </ul>
214 pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
215 self.inner = self.inner.set_filters(input);
216 self
217 }
218 /// <p>One or more filters. Filter names and values are case-sensitive.</p>
219 /// <ul>
220 /// <li>
221 /// <p><code>allocation-id</code> - The allocation ID for the address.</p></li>
222 /// <li>
223 /// <p><code>association-id</code> - The association ID for the address.</p></li>
224 /// <li>
225 /// <p><code>instance-id</code> - The ID of the instance the address is associated with, if any.</p></li>
226 /// <li>
227 /// <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>
228 /// <li>
229 /// <p><code>network-interface-id</code> - The ID of the network interface that the address is associated with, if any.</p></li>
230 /// <li>
231 /// <p><code>network-interface-owner-id</code> - The Amazon Web Services account ID of the owner.</p></li>
232 /// <li>
233 /// <p><code>private-ip-address</code> - The private IP address associated with the Elastic IP address.</p></li>
234 /// <li>
235 /// <p><code>public-ip</code> - The Elastic IP address, or the carrier IP address.</p></li>
236 /// <li>
237 /// <p><code>tag</code>:<key>
238 /// - 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
239 /// <code>Owner</code> and the value
240 /// <code>TeamA</code>, specify
241 /// <code>tag:Owner</code> for the filter name and
242 /// <code>TeamA</code> for the filter value.
243 /// </key></p></li>
244 /// <li>
245 /// <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>
246 /// </ul>
247 pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
248 self.inner.get_filters()
249 }
250 ///
251 /// Appends an item to `AllocationIds`.
252 ///
253 /// To override the contents of this collection use [`set_allocation_ids`](Self::set_allocation_ids).
254 ///
255 /// <p>Information about the allocation IDs.</p>
256 pub fn allocation_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
257 self.inner = self.inner.allocation_ids(input.into());
258 self
259 }
260 /// <p>Information about the allocation IDs.</p>
261 pub fn set_allocation_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
262 self.inner = self.inner.set_allocation_ids(input);
263 self
264 }
265 /// <p>Information about the allocation IDs.</p>
266 pub fn get_allocation_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
267 self.inner.get_allocation_ids()
268 }
269}