aws_sdk_ec2/operation/modify_client_vpn_endpoint/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::modify_client_vpn_endpoint::_modify_client_vpn_endpoint_output::ModifyClientVpnEndpointOutputBuilder;
3
4pub use crate::operation::modify_client_vpn_endpoint::_modify_client_vpn_endpoint_input::ModifyClientVpnEndpointInputBuilder;
5
6impl crate::operation::modify_client_vpn_endpoint::builders::ModifyClientVpnEndpointInputBuilder {
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_client_vpn_endpoint::ModifyClientVpnEndpointOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::modify_client_vpn_endpoint::ModifyClientVpnEndpointError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.modify_client_vpn_endpoint();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `ModifyClientVpnEndpoint`.
24///
25/// <p>Modifies the specified Client VPN endpoint. Modifying the DNS server resets existing client connections.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct ModifyClientVpnEndpointFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::modify_client_vpn_endpoint::builders::ModifyClientVpnEndpointInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::modify_client_vpn_endpoint::ModifyClientVpnEndpointOutput,
35        crate::operation::modify_client_vpn_endpoint::ModifyClientVpnEndpointError,
36    > for ModifyClientVpnEndpointFluentBuilder
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_client_vpn_endpoint::ModifyClientVpnEndpointOutput,
44            crate::operation::modify_client_vpn_endpoint::ModifyClientVpnEndpointError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl ModifyClientVpnEndpointFluentBuilder {
51    /// Creates a new `ModifyClientVpnEndpointFluentBuilder`.
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 ModifyClientVpnEndpoint as a reference.
60    pub fn as_input(&self) -> &crate::operation::modify_client_vpn_endpoint::builders::ModifyClientVpnEndpointInputBuilder {
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_client_vpn_endpoint::ModifyClientVpnEndpointOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::modify_client_vpn_endpoint::ModifyClientVpnEndpointError,
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_client_vpn_endpoint::ModifyClientVpnEndpoint::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::modify_client_vpn_endpoint::ModifyClientVpnEndpoint::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_client_vpn_endpoint::ModifyClientVpnEndpointOutput,
97        crate::operation::modify_client_vpn_endpoint::ModifyClientVpnEndpointError,
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>The ID of the Client VPN endpoint to modify.</p>
112    pub fn client_vpn_endpoint_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.client_vpn_endpoint_id(input.into());
114        self
115    }
116    /// <p>The ID of the Client VPN endpoint to modify.</p>
117    pub fn set_client_vpn_endpoint_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_client_vpn_endpoint_id(input);
119        self
120    }
121    /// <p>The ID of the Client VPN endpoint to modify.</p>
122    pub fn get_client_vpn_endpoint_id(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_client_vpn_endpoint_id()
124    }
125    /// <p>The ARN of the server certificate to be used. The server certificate must be provisioned in Certificate Manager (ACM).</p>
126    pub fn server_certificate_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.server_certificate_arn(input.into());
128        self
129    }
130    /// <p>The ARN of the server certificate to be used. The server certificate must be provisioned in Certificate Manager (ACM).</p>
131    pub fn set_server_certificate_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_server_certificate_arn(input);
133        self
134    }
135    /// <p>The ARN of the server certificate to be used. The server certificate must be provisioned in Certificate Manager (ACM).</p>
136    pub fn get_server_certificate_arn(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_server_certificate_arn()
138    }
139    /// <p>Information about the client connection logging options.</p>
140    /// <p>If you enable client connection logging, data about client connections is sent to a Cloudwatch Logs log stream. The following information is logged:</p>
141    /// <ul>
142    /// <li>
143    /// <p>Client connection requests</p></li>
144    /// <li>
145    /// <p>Client connection results (successful and unsuccessful)</p></li>
146    /// <li>
147    /// <p>Reasons for unsuccessful client connection requests</p></li>
148    /// <li>
149    /// <p>Client connection termination time</p></li>
150    /// </ul>
151    pub fn connection_log_options(mut self, input: crate::types::ConnectionLogOptions) -> Self {
152        self.inner = self.inner.connection_log_options(input);
153        self
154    }
155    /// <p>Information about the client connection logging options.</p>
156    /// <p>If you enable client connection logging, data about client connections is sent to a Cloudwatch Logs log stream. The following information is logged:</p>
157    /// <ul>
158    /// <li>
159    /// <p>Client connection requests</p></li>
160    /// <li>
161    /// <p>Client connection results (successful and unsuccessful)</p></li>
162    /// <li>
163    /// <p>Reasons for unsuccessful client connection requests</p></li>
164    /// <li>
165    /// <p>Client connection termination time</p></li>
166    /// </ul>
167    pub fn set_connection_log_options(mut self, input: ::std::option::Option<crate::types::ConnectionLogOptions>) -> Self {
168        self.inner = self.inner.set_connection_log_options(input);
169        self
170    }
171    /// <p>Information about the client connection logging options.</p>
172    /// <p>If you enable client connection logging, data about client connections is sent to a Cloudwatch Logs log stream. The following information is logged:</p>
173    /// <ul>
174    /// <li>
175    /// <p>Client connection requests</p></li>
176    /// <li>
177    /// <p>Client connection results (successful and unsuccessful)</p></li>
178    /// <li>
179    /// <p>Reasons for unsuccessful client connection requests</p></li>
180    /// <li>
181    /// <p>Client connection termination time</p></li>
182    /// </ul>
183    pub fn get_connection_log_options(&self) -> &::std::option::Option<crate::types::ConnectionLogOptions> {
184        self.inner.get_connection_log_options()
185    }
186    /// <p>Information about the DNS servers to be used by Client VPN connections. A Client VPN endpoint can have up to two DNS servers.</p>
187    pub fn dns_servers(mut self, input: crate::types::DnsServersOptionsModifyStructure) -> Self {
188        self.inner = self.inner.dns_servers(input);
189        self
190    }
191    /// <p>Information about the DNS servers to be used by Client VPN connections. A Client VPN endpoint can have up to two DNS servers.</p>
192    pub fn set_dns_servers(mut self, input: ::std::option::Option<crate::types::DnsServersOptionsModifyStructure>) -> Self {
193        self.inner = self.inner.set_dns_servers(input);
194        self
195    }
196    /// <p>Information about the DNS servers to be used by Client VPN connections. A Client VPN endpoint can have up to two DNS servers.</p>
197    pub fn get_dns_servers(&self) -> &::std::option::Option<crate::types::DnsServersOptionsModifyStructure> {
198        self.inner.get_dns_servers()
199    }
200    /// <p>The port number to assign to the Client VPN endpoint for TCP and UDP traffic.</p>
201    /// <p>Valid Values: <code>443</code> | <code>1194</code></p>
202    /// <p>Default Value: <code>443</code></p>
203    pub fn vpn_port(mut self, input: i32) -> Self {
204        self.inner = self.inner.vpn_port(input);
205        self
206    }
207    /// <p>The port number to assign to the Client VPN endpoint for TCP and UDP traffic.</p>
208    /// <p>Valid Values: <code>443</code> | <code>1194</code></p>
209    /// <p>Default Value: <code>443</code></p>
210    pub fn set_vpn_port(mut self, input: ::std::option::Option<i32>) -> Self {
211        self.inner = self.inner.set_vpn_port(input);
212        self
213    }
214    /// <p>The port number to assign to the Client VPN endpoint for TCP and UDP traffic.</p>
215    /// <p>Valid Values: <code>443</code> | <code>1194</code></p>
216    /// <p>Default Value: <code>443</code></p>
217    pub fn get_vpn_port(&self) -> &::std::option::Option<i32> {
218        self.inner.get_vpn_port()
219    }
220    /// <p>A brief description of the Client VPN endpoint.</p>
221    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
222        self.inner = self.inner.description(input.into());
223        self
224    }
225    /// <p>A brief description of the Client VPN endpoint.</p>
226    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
227        self.inner = self.inner.set_description(input);
228        self
229    }
230    /// <p>A brief description of the Client VPN endpoint.</p>
231    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
232        self.inner.get_description()
233    }
234    /// <p>Indicates whether the VPN is split-tunnel.</p>
235    /// <p>For information about split-tunnel VPN endpoints, see <a href="https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/split-tunnel-vpn.html">Split-tunnel Client VPN endpoint</a> in the <i>Client VPN Administrator Guide</i>.</p>
236    pub fn split_tunnel(mut self, input: bool) -> Self {
237        self.inner = self.inner.split_tunnel(input);
238        self
239    }
240    /// <p>Indicates whether the VPN is split-tunnel.</p>
241    /// <p>For information about split-tunnel VPN endpoints, see <a href="https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/split-tunnel-vpn.html">Split-tunnel Client VPN endpoint</a> in the <i>Client VPN Administrator Guide</i>.</p>
242    pub fn set_split_tunnel(mut self, input: ::std::option::Option<bool>) -> Self {
243        self.inner = self.inner.set_split_tunnel(input);
244        self
245    }
246    /// <p>Indicates whether the VPN is split-tunnel.</p>
247    /// <p>For information about split-tunnel VPN endpoints, see <a href="https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/split-tunnel-vpn.html">Split-tunnel Client VPN endpoint</a> in the <i>Client VPN Administrator Guide</i>.</p>
248    pub fn get_split_tunnel(&self) -> &::std::option::Option<bool> {
249        self.inner.get_split_tunnel()
250    }
251    /// <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>
252    pub fn dry_run(mut self, input: bool) -> Self {
253        self.inner = self.inner.dry_run(input);
254        self
255    }
256    /// <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>
257    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
258        self.inner = self.inner.set_dry_run(input);
259        self
260    }
261    /// <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>
262    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
263        self.inner.get_dry_run()
264    }
265    ///
266    /// Appends an item to `SecurityGroupIds`.
267    ///
268    /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
269    ///
270    /// <p>The IDs of one or more security groups to apply to the target network.</p>
271    pub fn security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
272        self.inner = self.inner.security_group_ids(input.into());
273        self
274    }
275    /// <p>The IDs of one or more security groups to apply to the target network.</p>
276    pub fn set_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
277        self.inner = self.inner.set_security_group_ids(input);
278        self
279    }
280    /// <p>The IDs of one or more security groups to apply to the target network.</p>
281    pub fn get_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
282        self.inner.get_security_group_ids()
283    }
284    /// <p>The ID of the VPC to associate with the Client VPN endpoint.</p>
285    pub fn vpc_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
286        self.inner = self.inner.vpc_id(input.into());
287        self
288    }
289    /// <p>The ID of the VPC to associate with the Client VPN endpoint.</p>
290    pub fn set_vpc_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
291        self.inner = self.inner.set_vpc_id(input);
292        self
293    }
294    /// <p>The ID of the VPC to associate with the Client VPN endpoint.</p>
295    pub fn get_vpc_id(&self) -> &::std::option::Option<::std::string::String> {
296        self.inner.get_vpc_id()
297    }
298    /// <p>Specify whether to enable the self-service portal for the Client VPN endpoint.</p>
299    pub fn self_service_portal(mut self, input: crate::types::SelfServicePortal) -> Self {
300        self.inner = self.inner.self_service_portal(input);
301        self
302    }
303    /// <p>Specify whether to enable the self-service portal for the Client VPN endpoint.</p>
304    pub fn set_self_service_portal(mut self, input: ::std::option::Option<crate::types::SelfServicePortal>) -> Self {
305        self.inner = self.inner.set_self_service_portal(input);
306        self
307    }
308    /// <p>Specify whether to enable the self-service portal for the Client VPN endpoint.</p>
309    pub fn get_self_service_portal(&self) -> &::std::option::Option<crate::types::SelfServicePortal> {
310        self.inner.get_self_service_portal()
311    }
312    /// <p>The options for managing connection authorization for new client connections.</p>
313    pub fn client_connect_options(mut self, input: crate::types::ClientConnectOptions) -> Self {
314        self.inner = self.inner.client_connect_options(input);
315        self
316    }
317    /// <p>The options for managing connection authorization for new client connections.</p>
318    pub fn set_client_connect_options(mut self, input: ::std::option::Option<crate::types::ClientConnectOptions>) -> Self {
319        self.inner = self.inner.set_client_connect_options(input);
320        self
321    }
322    /// <p>The options for managing connection authorization for new client connections.</p>
323    pub fn get_client_connect_options(&self) -> &::std::option::Option<crate::types::ClientConnectOptions> {
324        self.inner.get_client_connect_options()
325    }
326    /// <p>The maximum VPN session duration time in hours.</p>
327    /// <p>Valid values: <code>8 | 10 | 12 | 24</code></p>
328    /// <p>Default value: <code>24</code></p>
329    pub fn session_timeout_hours(mut self, input: i32) -> Self {
330        self.inner = self.inner.session_timeout_hours(input);
331        self
332    }
333    /// <p>The maximum VPN session duration time in hours.</p>
334    /// <p>Valid values: <code>8 | 10 | 12 | 24</code></p>
335    /// <p>Default value: <code>24</code></p>
336    pub fn set_session_timeout_hours(mut self, input: ::std::option::Option<i32>) -> Self {
337        self.inner = self.inner.set_session_timeout_hours(input);
338        self
339    }
340    /// <p>The maximum VPN session duration time in hours.</p>
341    /// <p>Valid values: <code>8 | 10 | 12 | 24</code></p>
342    /// <p>Default value: <code>24</code></p>
343    pub fn get_session_timeout_hours(&self) -> &::std::option::Option<i32> {
344        self.inner.get_session_timeout_hours()
345    }
346    /// <p>Options for enabling a customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.</p>
347    pub fn client_login_banner_options(mut self, input: crate::types::ClientLoginBannerOptions) -> Self {
348        self.inner = self.inner.client_login_banner_options(input);
349        self
350    }
351    /// <p>Options for enabling a customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.</p>
352    pub fn set_client_login_banner_options(mut self, input: ::std::option::Option<crate::types::ClientLoginBannerOptions>) -> Self {
353        self.inner = self.inner.set_client_login_banner_options(input);
354        self
355    }
356    /// <p>Options for enabling a customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.</p>
357    pub fn get_client_login_banner_options(&self) -> &::std::option::Option<crate::types::ClientLoginBannerOptions> {
358        self.inner.get_client_login_banner_options()
359    }
360    /// <p>Client route enforcement is a feature of the Client VPN service that helps enforce administrator defined routes on devices connected through the VPN. T his feature helps improve your security posture by ensuring that network traffic originating from a connected client is not inadvertently sent outside the VPN tunnel.</p>
361    /// <p>Client route enforcement works by monitoring the route table of a connected device for routing policy changes to the VPN connection. If the feature detects any VPN routing policy modifications, it will automatically force an update to the route table, reverting it back to the expected route configurations.</p>
362    pub fn client_route_enforcement_options(mut self, input: crate::types::ClientRouteEnforcementOptions) -> Self {
363        self.inner = self.inner.client_route_enforcement_options(input);
364        self
365    }
366    /// <p>Client route enforcement is a feature of the Client VPN service that helps enforce administrator defined routes on devices connected through the VPN. T his feature helps improve your security posture by ensuring that network traffic originating from a connected client is not inadvertently sent outside the VPN tunnel.</p>
367    /// <p>Client route enforcement works by monitoring the route table of a connected device for routing policy changes to the VPN connection. If the feature detects any VPN routing policy modifications, it will automatically force an update to the route table, reverting it back to the expected route configurations.</p>
368    pub fn set_client_route_enforcement_options(mut self, input: ::std::option::Option<crate::types::ClientRouteEnforcementOptions>) -> Self {
369        self.inner = self.inner.set_client_route_enforcement_options(input);
370        self
371    }
372    /// <p>Client route enforcement is a feature of the Client VPN service that helps enforce administrator defined routes on devices connected through the VPN. T his feature helps improve your security posture by ensuring that network traffic originating from a connected client is not inadvertently sent outside the VPN tunnel.</p>
373    /// <p>Client route enforcement works by monitoring the route table of a connected device for routing policy changes to the VPN connection. If the feature detects any VPN routing policy modifications, it will automatically force an update to the route table, reverting it back to the expected route configurations.</p>
374    pub fn get_client_route_enforcement_options(&self) -> &::std::option::Option<crate::types::ClientRouteEnforcementOptions> {
375        self.inner.get_client_route_enforcement_options()
376    }
377    /// <p>Indicates whether the client VPN session is disconnected after the maximum timeout specified in <code>sessionTimeoutHours</code> is reached. If <code>true</code>, users are prompted to reconnect client VPN. If <code>false</code>, client VPN attempts to reconnect automatically. The default value is <code>true</code>.</p>
378    pub fn disconnect_on_session_timeout(mut self, input: bool) -> Self {
379        self.inner = self.inner.disconnect_on_session_timeout(input);
380        self
381    }
382    /// <p>Indicates whether the client VPN session is disconnected after the maximum timeout specified in <code>sessionTimeoutHours</code> is reached. If <code>true</code>, users are prompted to reconnect client VPN. If <code>false</code>, client VPN attempts to reconnect automatically. The default value is <code>true</code>.</p>
383    pub fn set_disconnect_on_session_timeout(mut self, input: ::std::option::Option<bool>) -> Self {
384        self.inner = self.inner.set_disconnect_on_session_timeout(input);
385        self
386    }
387    /// <p>Indicates whether the client VPN session is disconnected after the maximum timeout specified in <code>sessionTimeoutHours</code> is reached. If <code>true</code>, users are prompted to reconnect client VPN. If <code>false</code>, client VPN attempts to reconnect automatically. The default value is <code>true</code>.</p>
388    pub fn get_disconnect_on_session_timeout(&self) -> &::std::option::Option<bool> {
389        self.inner.get_disconnect_on_session_timeout()
390    }
391}