aws_sdk_ec2/operation/modify_vpc_endpoint/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::modify_vpc_endpoint::_modify_vpc_endpoint_output::ModifyVpcEndpointOutputBuilder;
3
4pub use crate::operation::modify_vpc_endpoint::_modify_vpc_endpoint_input::ModifyVpcEndpointInputBuilder;
5
6impl crate::operation::modify_vpc_endpoint::builders::ModifyVpcEndpointInputBuilder {
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::modify_vpc_endpoint::ModifyVpcEndpointOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::modify_vpc_endpoint::ModifyVpcEndpointError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.modify_vpc_endpoint();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `ModifyVpcEndpoint`.
24///
25/// <p>Modifies attributes of a specified VPC endpoint. The attributes that you can modify depend on the type of VPC endpoint (interface, gateway, or Gateway Load Balancer). For more information, see the <a href="https://docs.aws.amazon.com/vpc/latest/privatelink/">Amazon Web Services PrivateLink Guide</a>.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct ModifyVpcEndpointFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::modify_vpc_endpoint::builders::ModifyVpcEndpointInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::modify_vpc_endpoint::ModifyVpcEndpointOutput,
35        crate::operation::modify_vpc_endpoint::ModifyVpcEndpointError,
36    > for ModifyVpcEndpointFluentBuilder
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::modify_vpc_endpoint::ModifyVpcEndpointOutput,
44            crate::operation::modify_vpc_endpoint::ModifyVpcEndpointError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl ModifyVpcEndpointFluentBuilder {
51    /// Creates a new `ModifyVpcEndpointFluentBuilder`.
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 ModifyVpcEndpoint as a reference.
60    pub fn as_input(&self) -> &crate::operation::modify_vpc_endpoint::builders::ModifyVpcEndpointInputBuilder {
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::modify_vpc_endpoint::ModifyVpcEndpointOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::modify_vpc_endpoint::ModifyVpcEndpointError,
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::modify_vpc_endpoint::ModifyVpcEndpoint::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::modify_vpc_endpoint::ModifyVpcEndpoint::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::modify_vpc_endpoint::ModifyVpcEndpointOutput,
97        crate::operation::modify_vpc_endpoint::ModifyVpcEndpointError,
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    /// <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>
112    pub fn dry_run(mut self, input: bool) -> Self {
113        self.inner = self.inner.dry_run(input);
114        self
115    }
116    /// <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>
117    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
118        self.inner = self.inner.set_dry_run(input);
119        self
120    }
121    /// <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>
122    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
123        self.inner.get_dry_run()
124    }
125    /// <p>The ID of the endpoint.</p>
126    pub fn vpc_endpoint_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.vpc_endpoint_id(input.into());
128        self
129    }
130    /// <p>The ID of the endpoint.</p>
131    pub fn set_vpc_endpoint_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_vpc_endpoint_id(input);
133        self
134    }
135    /// <p>The ID of the endpoint.</p>
136    pub fn get_vpc_endpoint_id(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_vpc_endpoint_id()
138    }
139    /// <p>(Gateway endpoint) Specify <code>true</code> to reset the policy document to the default policy. The default policy allows full access to the service.</p>
140    pub fn reset_policy(mut self, input: bool) -> Self {
141        self.inner = self.inner.reset_policy(input);
142        self
143    }
144    /// <p>(Gateway endpoint) Specify <code>true</code> to reset the policy document to the default policy. The default policy allows full access to the service.</p>
145    pub fn set_reset_policy(mut self, input: ::std::option::Option<bool>) -> Self {
146        self.inner = self.inner.set_reset_policy(input);
147        self
148    }
149    /// <p>(Gateway endpoint) Specify <code>true</code> to reset the policy document to the default policy. The default policy allows full access to the service.</p>
150    pub fn get_reset_policy(&self) -> &::std::option::Option<bool> {
151        self.inner.get_reset_policy()
152    }
153    /// <p>(Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. The policy must be in valid JSON format.</p>
154    pub fn policy_document(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155        self.inner = self.inner.policy_document(input.into());
156        self
157    }
158    /// <p>(Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. The policy must be in valid JSON format.</p>
159    pub fn set_policy_document(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
160        self.inner = self.inner.set_policy_document(input);
161        self
162    }
163    /// <p>(Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. The policy must be in valid JSON format.</p>
164    pub fn get_policy_document(&self) -> &::std::option::Option<::std::string::String> {
165        self.inner.get_policy_document()
166    }
167    ///
168    /// Appends an item to `AddRouteTableIds`.
169    ///
170    /// To override the contents of this collection use [`set_add_route_table_ids`](Self::set_add_route_table_ids).
171    ///
172    /// <p>(Gateway endpoint) The IDs of the route tables to associate with the endpoint.</p>
173    pub fn add_route_table_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
174        self.inner = self.inner.add_route_table_ids(input.into());
175        self
176    }
177    /// <p>(Gateway endpoint) The IDs of the route tables to associate with the endpoint.</p>
178    pub fn set_add_route_table_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
179        self.inner = self.inner.set_add_route_table_ids(input);
180        self
181    }
182    /// <p>(Gateway endpoint) The IDs of the route tables to associate with the endpoint.</p>
183    pub fn get_add_route_table_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
184        self.inner.get_add_route_table_ids()
185    }
186    ///
187    /// Appends an item to `RemoveRouteTableIds`.
188    ///
189    /// To override the contents of this collection use [`set_remove_route_table_ids`](Self::set_remove_route_table_ids).
190    ///
191    /// <p>(Gateway endpoint) The IDs of the route tables to disassociate from the endpoint.</p>
192    pub fn remove_route_table_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
193        self.inner = self.inner.remove_route_table_ids(input.into());
194        self
195    }
196    /// <p>(Gateway endpoint) The IDs of the route tables to disassociate from the endpoint.</p>
197    pub fn set_remove_route_table_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
198        self.inner = self.inner.set_remove_route_table_ids(input);
199        self
200    }
201    /// <p>(Gateway endpoint) The IDs of the route tables to disassociate from the endpoint.</p>
202    pub fn get_remove_route_table_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
203        self.inner.get_remove_route_table_ids()
204    }
205    ///
206    /// Appends an item to `AddSubnetIds`.
207    ///
208    /// To override the contents of this collection use [`set_add_subnet_ids`](Self::set_add_subnet_ids).
209    ///
210    /// <p>(Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to serve the endpoint. For a Gateway Load Balancer endpoint, you can specify only one subnet.</p>
211    pub fn add_subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
212        self.inner = self.inner.add_subnet_ids(input.into());
213        self
214    }
215    /// <p>(Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to serve the endpoint. For a Gateway Load Balancer endpoint, you can specify only one subnet.</p>
216    pub fn set_add_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
217        self.inner = self.inner.set_add_subnet_ids(input);
218        self
219    }
220    /// <p>(Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to serve the endpoint. For a Gateway Load Balancer endpoint, you can specify only one subnet.</p>
221    pub fn get_add_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
222        self.inner.get_add_subnet_ids()
223    }
224    ///
225    /// Appends an item to `RemoveSubnetIds`.
226    ///
227    /// To override the contents of this collection use [`set_remove_subnet_ids`](Self::set_remove_subnet_ids).
228    ///
229    /// <p>(Interface endpoint) The IDs of the subnets from which to remove the endpoint.</p>
230    pub fn remove_subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
231        self.inner = self.inner.remove_subnet_ids(input.into());
232        self
233    }
234    /// <p>(Interface endpoint) The IDs of the subnets from which to remove the endpoint.</p>
235    pub fn set_remove_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
236        self.inner = self.inner.set_remove_subnet_ids(input);
237        self
238    }
239    /// <p>(Interface endpoint) The IDs of the subnets from which to remove the endpoint.</p>
240    pub fn get_remove_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
241        self.inner.get_remove_subnet_ids()
242    }
243    ///
244    /// Appends an item to `AddSecurityGroupIds`.
245    ///
246    /// To override the contents of this collection use [`set_add_security_group_ids`](Self::set_add_security_group_ids).
247    ///
248    /// <p>(Interface endpoint) The IDs of the security groups to associate with the endpoint network interfaces.</p>
249    pub fn add_security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
250        self.inner = self.inner.add_security_group_ids(input.into());
251        self
252    }
253    /// <p>(Interface endpoint) The IDs of the security groups to associate with the endpoint network interfaces.</p>
254    pub fn set_add_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
255        self.inner = self.inner.set_add_security_group_ids(input);
256        self
257    }
258    /// <p>(Interface endpoint) The IDs of the security groups to associate with the endpoint network interfaces.</p>
259    pub fn get_add_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
260        self.inner.get_add_security_group_ids()
261    }
262    ///
263    /// Appends an item to `RemoveSecurityGroupIds`.
264    ///
265    /// To override the contents of this collection use [`set_remove_security_group_ids`](Self::set_remove_security_group_ids).
266    ///
267    /// <p>(Interface endpoint) The IDs of the security groups to disassociate from the endpoint network interfaces.</p>
268    pub fn remove_security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
269        self.inner = self.inner.remove_security_group_ids(input.into());
270        self
271    }
272    /// <p>(Interface endpoint) The IDs of the security groups to disassociate from the endpoint network interfaces.</p>
273    pub fn set_remove_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
274        self.inner = self.inner.set_remove_security_group_ids(input);
275        self
276    }
277    /// <p>(Interface endpoint) The IDs of the security groups to disassociate from the endpoint network interfaces.</p>
278    pub fn get_remove_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
279        self.inner.get_remove_security_group_ids()
280    }
281    /// <p>The IP address type for the endpoint.</p>
282    pub fn ip_address_type(mut self, input: crate::types::IpAddressType) -> Self {
283        self.inner = self.inner.ip_address_type(input);
284        self
285    }
286    /// <p>The IP address type for the endpoint.</p>
287    pub fn set_ip_address_type(mut self, input: ::std::option::Option<crate::types::IpAddressType>) -> Self {
288        self.inner = self.inner.set_ip_address_type(input);
289        self
290    }
291    /// <p>The IP address type for the endpoint.</p>
292    pub fn get_ip_address_type(&self) -> &::std::option::Option<crate::types::IpAddressType> {
293        self.inner.get_ip_address_type()
294    }
295    /// <p>The DNS options for the endpoint.</p>
296    pub fn dns_options(mut self, input: crate::types::DnsOptionsSpecification) -> Self {
297        self.inner = self.inner.dns_options(input);
298        self
299    }
300    /// <p>The DNS options for the endpoint.</p>
301    pub fn set_dns_options(mut self, input: ::std::option::Option<crate::types::DnsOptionsSpecification>) -> Self {
302        self.inner = self.inner.set_dns_options(input);
303        self
304    }
305    /// <p>The DNS options for the endpoint.</p>
306    pub fn get_dns_options(&self) -> &::std::option::Option<crate::types::DnsOptionsSpecification> {
307        self.inner.get_dns_options()
308    }
309    /// <p>(Interface endpoint) Indicates whether a private hosted zone is associated with the VPC.</p>
310    pub fn private_dns_enabled(mut self, input: bool) -> Self {
311        self.inner = self.inner.private_dns_enabled(input);
312        self
313    }
314    /// <p>(Interface endpoint) Indicates whether a private hosted zone is associated with the VPC.</p>
315    pub fn set_private_dns_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
316        self.inner = self.inner.set_private_dns_enabled(input);
317        self
318    }
319    /// <p>(Interface endpoint) Indicates whether a private hosted zone is associated with the VPC.</p>
320    pub fn get_private_dns_enabled(&self) -> &::std::option::Option<bool> {
321        self.inner.get_private_dns_enabled()
322    }
323    ///
324    /// Appends an item to `SubnetConfigurations`.
325    ///
326    /// To override the contents of this collection use [`set_subnet_configurations`](Self::set_subnet_configurations).
327    ///
328    /// <p>The subnet configurations for the endpoint.</p>
329    pub fn subnet_configurations(mut self, input: crate::types::SubnetConfiguration) -> Self {
330        self.inner = self.inner.subnet_configurations(input);
331        self
332    }
333    /// <p>The subnet configurations for the endpoint.</p>
334    pub fn set_subnet_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SubnetConfiguration>>) -> Self {
335        self.inner = self.inner.set_subnet_configurations(input);
336        self
337    }
338    /// <p>The subnet configurations for the endpoint.</p>
339    pub fn get_subnet_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SubnetConfiguration>> {
340        self.inner.get_subnet_configurations()
341    }
342}