aws_sdk_ec2/operation/create_vpc_endpoint_service_configuration/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_vpc_endpoint_service_configuration::_create_vpc_endpoint_service_configuration_output::CreateVpcEndpointServiceConfigurationOutputBuilder;
3
4pub use crate::operation::create_vpc_endpoint_service_configuration::_create_vpc_endpoint_service_configuration_input::CreateVpcEndpointServiceConfigurationInputBuilder;
5
6impl crate::operation::create_vpc_endpoint_service_configuration::builders::CreateVpcEndpointServiceConfigurationInputBuilder {
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::create_vpc_endpoint_service_configuration::CreateVpcEndpointServiceConfigurationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_vpc_endpoint_service_configuration::CreateVpcEndpointServiceConfigurationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_vpc_endpoint_service_configuration();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateVpcEndpointServiceConfiguration`.
24///
25/// <p>Creates a VPC endpoint service to which service consumers (Amazon Web Services accounts, users, and IAM roles) can connect.</p>
26/// <p>Before you create an endpoint service, you must create one of the following for your service:</p>
27/// <ul>
28/// <li>
29/// <p>A <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/network/">Network Load Balancer</a>. Service consumers connect to your service using an interface endpoint.</p></li>
30/// <li>
31/// <p>A <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/gateway/">Gateway Load Balancer</a>. Service consumers connect to your service using a Gateway Load Balancer endpoint.</p></li>
32/// </ul>
33/// <p>If you set the private DNS name, you must prove that you own the private DNS domain name.</p>
34/// <p>For more information, see the <a href="https://docs.aws.amazon.com/vpc/latest/privatelink/">Amazon Web Services PrivateLink Guide</a>.</p>
35#[derive(::std::clone::Clone, ::std::fmt::Debug)]
36pub struct CreateVpcEndpointServiceConfigurationFluentBuilder {
37    handle: ::std::sync::Arc<crate::client::Handle>,
38    inner: crate::operation::create_vpc_endpoint_service_configuration::builders::CreateVpcEndpointServiceConfigurationInputBuilder,
39    config_override: ::std::option::Option<crate::config::Builder>,
40}
41impl
42    crate::client::customize::internal::CustomizableSend<
43        crate::operation::create_vpc_endpoint_service_configuration::CreateVpcEndpointServiceConfigurationOutput,
44        crate::operation::create_vpc_endpoint_service_configuration::CreateVpcEndpointServiceConfigurationError,
45    > for CreateVpcEndpointServiceConfigurationFluentBuilder
46{
47    fn send(
48        self,
49        config_override: crate::config::Builder,
50    ) -> crate::client::customize::internal::BoxFuture<
51        crate::client::customize::internal::SendResult<
52            crate::operation::create_vpc_endpoint_service_configuration::CreateVpcEndpointServiceConfigurationOutput,
53            crate::operation::create_vpc_endpoint_service_configuration::CreateVpcEndpointServiceConfigurationError,
54        >,
55    > {
56        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
57    }
58}
59impl CreateVpcEndpointServiceConfigurationFluentBuilder {
60    /// Creates a new `CreateVpcEndpointServiceConfigurationFluentBuilder`.
61    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
62        Self {
63            handle,
64            inner: ::std::default::Default::default(),
65            config_override: ::std::option::Option::None,
66        }
67    }
68    /// Access the CreateVpcEndpointServiceConfiguration as a reference.
69    pub fn as_input(
70        &self,
71    ) -> &crate::operation::create_vpc_endpoint_service_configuration::builders::CreateVpcEndpointServiceConfigurationInputBuilder {
72        &self.inner
73    }
74    /// Sends the request and returns the response.
75    ///
76    /// If an error occurs, an `SdkError` will be returned with additional details that
77    /// can be matched against.
78    ///
79    /// By default, any retryable failures will be retried twice. Retry behavior
80    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
81    /// set when configuring the client.
82    pub async fn send(
83        self,
84    ) -> ::std::result::Result<
85        crate::operation::create_vpc_endpoint_service_configuration::CreateVpcEndpointServiceConfigurationOutput,
86        ::aws_smithy_runtime_api::client::result::SdkError<
87            crate::operation::create_vpc_endpoint_service_configuration::CreateVpcEndpointServiceConfigurationError,
88            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
89        >,
90    > {
91        let input = self
92            .inner
93            .build()
94            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
95        let runtime_plugins =
96            crate::operation::create_vpc_endpoint_service_configuration::CreateVpcEndpointServiceConfiguration::operation_runtime_plugins(
97                self.handle.runtime_plugins.clone(),
98                &self.handle.conf,
99                self.config_override,
100            );
101        crate::operation::create_vpc_endpoint_service_configuration::CreateVpcEndpointServiceConfiguration::orchestrate(&runtime_plugins, input).await
102    }
103
104    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
105    pub fn customize(
106        self,
107    ) -> crate::client::customize::CustomizableOperation<
108        crate::operation::create_vpc_endpoint_service_configuration::CreateVpcEndpointServiceConfigurationOutput,
109        crate::operation::create_vpc_endpoint_service_configuration::CreateVpcEndpointServiceConfigurationError,
110        Self,
111    > {
112        crate::client::customize::CustomizableOperation::new(self)
113    }
114    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
115        self.set_config_override(::std::option::Option::Some(config_override.into()));
116        self
117    }
118
119    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
120        self.config_override = config_override;
121        self
122    }
123    /// <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>
124    pub fn dry_run(mut self, input: bool) -> Self {
125        self.inner = self.inner.dry_run(input);
126        self
127    }
128    /// <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>
129    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
130        self.inner = self.inner.set_dry_run(input);
131        self
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 get_dry_run(&self) -> &::std::option::Option<bool> {
135        self.inner.get_dry_run()
136    }
137    /// <p>Indicates whether requests from service consumers to create an endpoint to your service must be accepted manually.</p>
138    pub fn acceptance_required(mut self, input: bool) -> Self {
139        self.inner = self.inner.acceptance_required(input);
140        self
141    }
142    /// <p>Indicates whether requests from service consumers to create an endpoint to your service must be accepted manually.</p>
143    pub fn set_acceptance_required(mut self, input: ::std::option::Option<bool>) -> Self {
144        self.inner = self.inner.set_acceptance_required(input);
145        self
146    }
147    /// <p>Indicates whether requests from service consumers to create an endpoint to your service must be accepted manually.</p>
148    pub fn get_acceptance_required(&self) -> &::std::option::Option<bool> {
149        self.inner.get_acceptance_required()
150    }
151    /// <p>(Interface endpoint configuration) The private DNS name to assign to the VPC endpoint service.</p>
152    pub fn private_dns_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153        self.inner = self.inner.private_dns_name(input.into());
154        self
155    }
156    /// <p>(Interface endpoint configuration) The private DNS name to assign to the VPC endpoint service.</p>
157    pub fn set_private_dns_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
158        self.inner = self.inner.set_private_dns_name(input);
159        self
160    }
161    /// <p>(Interface endpoint configuration) The private DNS name to assign to the VPC endpoint service.</p>
162    pub fn get_private_dns_name(&self) -> &::std::option::Option<::std::string::String> {
163        self.inner.get_private_dns_name()
164    }
165    ///
166    /// Appends an item to `NetworkLoadBalancerArns`.
167    ///
168    /// To override the contents of this collection use [`set_network_load_balancer_arns`](Self::set_network_load_balancer_arns).
169    ///
170    /// <p>The Amazon Resource Names (ARNs) of the Network Load Balancers.</p>
171    pub fn network_load_balancer_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
172        self.inner = self.inner.network_load_balancer_arns(input.into());
173        self
174    }
175    /// <p>The Amazon Resource Names (ARNs) of the Network Load Balancers.</p>
176    pub fn set_network_load_balancer_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
177        self.inner = self.inner.set_network_load_balancer_arns(input);
178        self
179    }
180    /// <p>The Amazon Resource Names (ARNs) of the Network Load Balancers.</p>
181    pub fn get_network_load_balancer_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
182        self.inner.get_network_load_balancer_arns()
183    }
184    ///
185    /// Appends an item to `GatewayLoadBalancerArns`.
186    ///
187    /// To override the contents of this collection use [`set_gateway_load_balancer_arns`](Self::set_gateway_load_balancer_arns).
188    ///
189    /// <p>The Amazon Resource Names (ARNs) of the Gateway Load Balancers.</p>
190    pub fn gateway_load_balancer_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
191        self.inner = self.inner.gateway_load_balancer_arns(input.into());
192        self
193    }
194    /// <p>The Amazon Resource Names (ARNs) of the Gateway Load Balancers.</p>
195    pub fn set_gateway_load_balancer_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
196        self.inner = self.inner.set_gateway_load_balancer_arns(input);
197        self
198    }
199    /// <p>The Amazon Resource Names (ARNs) of the Gateway Load Balancers.</p>
200    pub fn get_gateway_load_balancer_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
201        self.inner.get_gateway_load_balancer_arns()
202    }
203    ///
204    /// Appends an item to `SupportedIpAddressTypes`.
205    ///
206    /// To override the contents of this collection use [`set_supported_ip_address_types`](Self::set_supported_ip_address_types).
207    ///
208    /// <p>The supported IP address types. The possible values are <code>ipv4</code> and <code>ipv6</code>.</p>
209    pub fn supported_ip_address_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
210        self.inner = self.inner.supported_ip_address_types(input.into());
211        self
212    }
213    /// <p>The supported IP address types. The possible values are <code>ipv4</code> and <code>ipv6</code>.</p>
214    pub fn set_supported_ip_address_types(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
215        self.inner = self.inner.set_supported_ip_address_types(input);
216        self
217    }
218    /// <p>The supported IP address types. The possible values are <code>ipv4</code> and <code>ipv6</code>.</p>
219    pub fn get_supported_ip_address_types(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
220        self.inner.get_supported_ip_address_types()
221    }
222    ///
223    /// Appends an item to `SupportedRegions`.
224    ///
225    /// To override the contents of this collection use [`set_supported_regions`](Self::set_supported_regions).
226    ///
227    /// <p>The Regions from which service consumers can access the service.</p>
228    pub fn supported_regions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
229        self.inner = self.inner.supported_regions(input.into());
230        self
231    }
232    /// <p>The Regions from which service consumers can access the service.</p>
233    pub fn set_supported_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
234        self.inner = self.inner.set_supported_regions(input);
235        self
236    }
237    /// <p>The Regions from which service consumers can access the service.</p>
238    pub fn get_supported_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
239        self.inner.get_supported_regions()
240    }
241    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">How to ensure idempotency</a>.</p>
242    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
243        self.inner = self.inner.client_token(input.into());
244        self
245    }
246    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">How to ensure idempotency</a>.</p>
247    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
248        self.inner = self.inner.set_client_token(input);
249        self
250    }
251    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">How to ensure idempotency</a>.</p>
252    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
253        self.inner.get_client_token()
254    }
255    ///
256    /// Appends an item to `TagSpecifications`.
257    ///
258    /// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
259    ///
260    /// <p>The tags to associate with the service.</p>
261    pub fn tag_specifications(mut self, input: crate::types::TagSpecification) -> Self {
262        self.inner = self.inner.tag_specifications(input);
263        self
264    }
265    /// <p>The tags to associate with the service.</p>
266    pub fn set_tag_specifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>) -> Self {
267        self.inner = self.inner.set_tag_specifications(input);
268        self
269    }
270    /// <p>The tags to associate with the service.</p>
271    pub fn get_tag_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>> {
272        self.inner.get_tag_specifications()
273    }
274}