aws_sdk_ec2/operation/describe_vpc_endpoint_services/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_vpc_endpoint_services::_describe_vpc_endpoint_services_output::DescribeVpcEndpointServicesOutputBuilder;
3
4pub use crate::operation::describe_vpc_endpoint_services::_describe_vpc_endpoint_services_input::DescribeVpcEndpointServicesInputBuilder;
5
6impl crate::operation::describe_vpc_endpoint_services::builders::DescribeVpcEndpointServicesInputBuilder {
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_vpc_endpoint_services::DescribeVpcEndpointServicesOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::describe_vpc_endpoint_services::DescribeVpcEndpointServicesError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.describe_vpc_endpoint_services();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `DescribeVpcEndpointServices`.
24///
25/// <p>Describes available services to which you can create a VPC endpoint.</p>
26/// <p>When the service provider and the consumer have different accounts in multiple Availability Zones, and the consumer views the VPC endpoint service information, the response only includes the common Availability Zones. For example, when the service provider account uses <code>us-east-1a</code> and <code>us-east-1c</code> and the consumer uses <code>us-east-1a</code> and <code>us-east-1b</code>, the response includes the VPC endpoint services in the common Availability Zone, <code>us-east-1a</code>.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct DescribeVpcEndpointServicesFluentBuilder {
29 handle: ::std::sync::Arc<crate::client::Handle>,
30 inner: crate::operation::describe_vpc_endpoint_services::builders::DescribeVpcEndpointServicesInputBuilder,
31 config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34 crate::client::customize::internal::CustomizableSend<
35 crate::operation::describe_vpc_endpoint_services::DescribeVpcEndpointServicesOutput,
36 crate::operation::describe_vpc_endpoint_services::DescribeVpcEndpointServicesError,
37 > for DescribeVpcEndpointServicesFluentBuilder
38{
39 fn send(
40 self,
41 config_override: crate::config::Builder,
42 ) -> crate::client::customize::internal::BoxFuture<
43 crate::client::customize::internal::SendResult<
44 crate::operation::describe_vpc_endpoint_services::DescribeVpcEndpointServicesOutput,
45 crate::operation::describe_vpc_endpoint_services::DescribeVpcEndpointServicesError,
46 >,
47 > {
48 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49 }
50}
51impl DescribeVpcEndpointServicesFluentBuilder {
52 /// Creates a new `DescribeVpcEndpointServicesFluentBuilder`.
53 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54 Self {
55 handle,
56 inner: ::std::default::Default::default(),
57 config_override: ::std::option::Option::None,
58 }
59 }
60 /// Access the DescribeVpcEndpointServices as a reference.
61 pub fn as_input(&self) -> &crate::operation::describe_vpc_endpoint_services::builders::DescribeVpcEndpointServicesInputBuilder {
62 &self.inner
63 }
64 /// Sends the request and returns the response.
65 ///
66 /// If an error occurs, an `SdkError` will be returned with additional details that
67 /// can be matched against.
68 ///
69 /// By default, any retryable failures will be retried twice. Retry behavior
70 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
71 /// set when configuring the client.
72 pub async fn send(
73 self,
74 ) -> ::std::result::Result<
75 crate::operation::describe_vpc_endpoint_services::DescribeVpcEndpointServicesOutput,
76 ::aws_smithy_runtime_api::client::result::SdkError<
77 crate::operation::describe_vpc_endpoint_services::DescribeVpcEndpointServicesError,
78 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
79 >,
80 > {
81 let input = self
82 .inner
83 .build()
84 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
85 let runtime_plugins = crate::operation::describe_vpc_endpoint_services::DescribeVpcEndpointServices::operation_runtime_plugins(
86 self.handle.runtime_plugins.clone(),
87 &self.handle.conf,
88 self.config_override,
89 );
90 crate::operation::describe_vpc_endpoint_services::DescribeVpcEndpointServices::orchestrate(&runtime_plugins, input).await
91 }
92
93 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94 pub fn customize(
95 self,
96 ) -> crate::client::customize::CustomizableOperation<
97 crate::operation::describe_vpc_endpoint_services::DescribeVpcEndpointServicesOutput,
98 crate::operation::describe_vpc_endpoint_services::DescribeVpcEndpointServicesError,
99 Self,
100 > {
101 crate::client::customize::CustomizableOperation::new(self)
102 }
103 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104 self.set_config_override(::std::option::Option::Some(config_override.into()));
105 self
106 }
107
108 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109 self.config_override = config_override;
110 self
111 }
112 /// <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>
113 pub fn dry_run(mut self, input: bool) -> Self {
114 self.inner = self.inner.dry_run(input);
115 self
116 }
117 /// <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>
118 pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
119 self.inner = self.inner.set_dry_run(input);
120 self
121 }
122 /// <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>
123 pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
124 self.inner.get_dry_run()
125 }
126 ///
127 /// Appends an item to `ServiceNames`.
128 ///
129 /// To override the contents of this collection use [`set_service_names`](Self::set_service_names).
130 ///
131 /// <p>The service names.</p>
132 pub fn service_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133 self.inner = self.inner.service_names(input.into());
134 self
135 }
136 /// <p>The service names.</p>
137 pub fn set_service_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
138 self.inner = self.inner.set_service_names(input);
139 self
140 }
141 /// <p>The service names.</p>
142 pub fn get_service_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
143 self.inner.get_service_names()
144 }
145 ///
146 /// Appends an item to `Filters`.
147 ///
148 /// To override the contents of this collection use [`set_filters`](Self::set_filters).
149 ///
150 /// <p>The filters.</p>
151 /// <ul>
152 /// <li>
153 /// <p><code>owner</code> - The ID or alias of the Amazon Web Services account that owns the service.</p></li>
154 /// <li>
155 /// <p><code>service-name</code> - The name of the service.</p></li>
156 /// <li>
157 /// <p><code>service-region</code> - The Region of the service.</p></li>
158 /// <li>
159 /// <p><code>service-type</code> - The type of service (<code>Interface</code> | <code>Gateway</code> | <code>GatewayLoadBalancer</code>).</p></li>
160 /// <li>
161 /// <p><code>supported-ip-address-types</code> - The IP address type (<code>ipv4</code> | <code>ipv6</code>).</p></li>
162 /// <li>
163 /// <p><code>tag</code>:<key>
164 /// - 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
165 /// <code>Owner</code> and the value
166 /// <code>TeamA</code>, specify
167 /// <code>tag:Owner</code> for the filter name and
168 /// <code>TeamA</code> for the filter value.
169 /// </key></p></li>
170 /// <li>
171 /// <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>
172 /// </ul>
173 pub fn filters(mut self, input: crate::types::Filter) -> Self {
174 self.inner = self.inner.filters(input);
175 self
176 }
177 /// <p>The filters.</p>
178 /// <ul>
179 /// <li>
180 /// <p><code>owner</code> - The ID or alias of the Amazon Web Services account that owns the service.</p></li>
181 /// <li>
182 /// <p><code>service-name</code> - The name of the service.</p></li>
183 /// <li>
184 /// <p><code>service-region</code> - The Region of the service.</p></li>
185 /// <li>
186 /// <p><code>service-type</code> - The type of service (<code>Interface</code> | <code>Gateway</code> | <code>GatewayLoadBalancer</code>).</p></li>
187 /// <li>
188 /// <p><code>supported-ip-address-types</code> - The IP address type (<code>ipv4</code> | <code>ipv6</code>).</p></li>
189 /// <li>
190 /// <p><code>tag</code>:<key>
191 /// - 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
192 /// <code>Owner</code> and the value
193 /// <code>TeamA</code>, specify
194 /// <code>tag:Owner</code> for the filter name and
195 /// <code>TeamA</code> for the filter value.
196 /// </key></p></li>
197 /// <li>
198 /// <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>
199 /// </ul>
200 pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
201 self.inner = self.inner.set_filters(input);
202 self
203 }
204 /// <p>The filters.</p>
205 /// <ul>
206 /// <li>
207 /// <p><code>owner</code> - The ID or alias of the Amazon Web Services account that owns the service.</p></li>
208 /// <li>
209 /// <p><code>service-name</code> - The name of the service.</p></li>
210 /// <li>
211 /// <p><code>service-region</code> - The Region of the service.</p></li>
212 /// <li>
213 /// <p><code>service-type</code> - The type of service (<code>Interface</code> | <code>Gateway</code> | <code>GatewayLoadBalancer</code>).</p></li>
214 /// <li>
215 /// <p><code>supported-ip-address-types</code> - The IP address type (<code>ipv4</code> | <code>ipv6</code>).</p></li>
216 /// <li>
217 /// <p><code>tag</code>:<key>
218 /// - 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
219 /// <code>Owner</code> and the value
220 /// <code>TeamA</code>, specify
221 /// <code>tag:Owner</code> for the filter name and
222 /// <code>TeamA</code> for the filter value.
223 /// </key></p></li>
224 /// <li>
225 /// <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>
226 /// </ul>
227 pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
228 self.inner.get_filters()
229 }
230 /// <p>The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.</p>
231 /// <p>Constraint: If the value is greater than 1,000, we return only 1,000 items.</p>
232 pub fn max_results(mut self, input: i32) -> Self {
233 self.inner = self.inner.max_results(input);
234 self
235 }
236 /// <p>The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.</p>
237 /// <p>Constraint: If the value is greater than 1,000, we return only 1,000 items.</p>
238 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
239 self.inner = self.inner.set_max_results(input);
240 self
241 }
242 /// <p>The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.</p>
243 /// <p>Constraint: If the value is greater than 1,000, we return only 1,000 items.</p>
244 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
245 self.inner.get_max_results()
246 }
247 /// <p>The token for the next set of items to return. (You received this token from a prior call.)</p>
248 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
249 self.inner = self.inner.next_token(input.into());
250 self
251 }
252 /// <p>The token for the next set of items to return. (You received this token from a prior call.)</p>
253 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
254 self.inner = self.inner.set_next_token(input);
255 self
256 }
257 /// <p>The token for the next set of items to return. (You received this token from a prior call.)</p>
258 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
259 self.inner.get_next_token()
260 }
261 ///
262 /// Appends an item to `ServiceRegions`.
263 ///
264 /// To override the contents of this collection use [`set_service_regions`](Self::set_service_regions).
265 ///
266 /// <p>The service Regions.</p>
267 pub fn service_regions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
268 self.inner = self.inner.service_regions(input.into());
269 self
270 }
271 /// <p>The service Regions.</p>
272 pub fn set_service_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
273 self.inner = self.inner.set_service_regions(input);
274 self
275 }
276 /// <p>The service Regions.</p>
277 pub fn get_service_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
278 self.inner.get_service_regions()
279 }
280}