aws_sdk_ec2/operation/create_verified_access_endpoint/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_verified_access_endpoint::_create_verified_access_endpoint_output::CreateVerifiedAccessEndpointOutputBuilder;
3
4pub use crate::operation::create_verified_access_endpoint::_create_verified_access_endpoint_input::CreateVerifiedAccessEndpointInputBuilder;
5
6impl crate::operation::create_verified_access_endpoint::builders::CreateVerifiedAccessEndpointInputBuilder {
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_verified_access_endpoint::CreateVerifiedAccessEndpointOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_verified_access_endpoint::CreateVerifiedAccessEndpointError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_verified_access_endpoint();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateVerifiedAccessEndpoint`.
24///
25/// <p>An Amazon Web Services Verified Access endpoint is where you define your application along with an optional endpoint-level access policy.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateVerifiedAccessEndpointFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::create_verified_access_endpoint::builders::CreateVerifiedAccessEndpointInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::create_verified_access_endpoint::CreateVerifiedAccessEndpointOutput,
35        crate::operation::create_verified_access_endpoint::CreateVerifiedAccessEndpointError,
36    > for CreateVerifiedAccessEndpointFluentBuilder
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::create_verified_access_endpoint::CreateVerifiedAccessEndpointOutput,
44            crate::operation::create_verified_access_endpoint::CreateVerifiedAccessEndpointError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl CreateVerifiedAccessEndpointFluentBuilder {
51    /// Creates a new `CreateVerifiedAccessEndpointFluentBuilder`.
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 CreateVerifiedAccessEndpoint as a reference.
60    pub fn as_input(&self) -> &crate::operation::create_verified_access_endpoint::builders::CreateVerifiedAccessEndpointInputBuilder {
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::create_verified_access_endpoint::CreateVerifiedAccessEndpointOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::create_verified_access_endpoint::CreateVerifiedAccessEndpointError,
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::create_verified_access_endpoint::CreateVerifiedAccessEndpoint::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::create_verified_access_endpoint::CreateVerifiedAccessEndpoint::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::create_verified_access_endpoint::CreateVerifiedAccessEndpointOutput,
97        crate::operation::create_verified_access_endpoint::CreateVerifiedAccessEndpointError,
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 Verified Access group to associate the endpoint with.</p>
112    pub fn verified_access_group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.verified_access_group_id(input.into());
114        self
115    }
116    /// <p>The ID of the Verified Access group to associate the endpoint with.</p>
117    pub fn set_verified_access_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_verified_access_group_id(input);
119        self
120    }
121    /// <p>The ID of the Verified Access group to associate the endpoint with.</p>
122    pub fn get_verified_access_group_id(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_verified_access_group_id()
124    }
125    /// <p>The type of Verified Access endpoint to create.</p>
126    pub fn endpoint_type(mut self, input: crate::types::VerifiedAccessEndpointType) -> Self {
127        self.inner = self.inner.endpoint_type(input);
128        self
129    }
130    /// <p>The type of Verified Access endpoint to create.</p>
131    pub fn set_endpoint_type(mut self, input: ::std::option::Option<crate::types::VerifiedAccessEndpointType>) -> Self {
132        self.inner = self.inner.set_endpoint_type(input);
133        self
134    }
135    /// <p>The type of Verified Access endpoint to create.</p>
136    pub fn get_endpoint_type(&self) -> &::std::option::Option<crate::types::VerifiedAccessEndpointType> {
137        self.inner.get_endpoint_type()
138    }
139    /// <p>The type of attachment.</p>
140    pub fn attachment_type(mut self, input: crate::types::VerifiedAccessEndpointAttachmentType) -> Self {
141        self.inner = self.inner.attachment_type(input);
142        self
143    }
144    /// <p>The type of attachment.</p>
145    pub fn set_attachment_type(mut self, input: ::std::option::Option<crate::types::VerifiedAccessEndpointAttachmentType>) -> Self {
146        self.inner = self.inner.set_attachment_type(input);
147        self
148    }
149    /// <p>The type of attachment.</p>
150    pub fn get_attachment_type(&self) -> &::std::option::Option<crate::types::VerifiedAccessEndpointAttachmentType> {
151        self.inner.get_attachment_type()
152    }
153    /// <p>The ARN of the public TLS/SSL certificate in Amazon Web Services Certificate Manager to associate with the endpoint. The CN in the certificate must match the DNS name your end users will use to reach your application.</p>
154    pub fn domain_certificate_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155        self.inner = self.inner.domain_certificate_arn(input.into());
156        self
157    }
158    /// <p>The ARN of the public TLS/SSL certificate in Amazon Web Services Certificate Manager to associate with the endpoint. The CN in the certificate must match the DNS name your end users will use to reach your application.</p>
159    pub fn set_domain_certificate_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
160        self.inner = self.inner.set_domain_certificate_arn(input);
161        self
162    }
163    /// <p>The ARN of the public TLS/SSL certificate in Amazon Web Services Certificate Manager to associate with the endpoint. The CN in the certificate must match the DNS name your end users will use to reach your application.</p>
164    pub fn get_domain_certificate_arn(&self) -> &::std::option::Option<::std::string::String> {
165        self.inner.get_domain_certificate_arn()
166    }
167    /// <p>The DNS name for users to reach your application.</p>
168    pub fn application_domain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
169        self.inner = self.inner.application_domain(input.into());
170        self
171    }
172    /// <p>The DNS name for users to reach your application.</p>
173    pub fn set_application_domain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
174        self.inner = self.inner.set_application_domain(input);
175        self
176    }
177    /// <p>The DNS name for users to reach your application.</p>
178    pub fn get_application_domain(&self) -> &::std::option::Option<::std::string::String> {
179        self.inner.get_application_domain()
180    }
181    /// <p>A custom identifier that is prepended to the DNS name that is generated for the endpoint.</p>
182    pub fn endpoint_domain_prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
183        self.inner = self.inner.endpoint_domain_prefix(input.into());
184        self
185    }
186    /// <p>A custom identifier that is prepended to the DNS name that is generated for the endpoint.</p>
187    pub fn set_endpoint_domain_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
188        self.inner = self.inner.set_endpoint_domain_prefix(input);
189        self
190    }
191    /// <p>A custom identifier that is prepended to the DNS name that is generated for the endpoint.</p>
192    pub fn get_endpoint_domain_prefix(&self) -> &::std::option::Option<::std::string::String> {
193        self.inner.get_endpoint_domain_prefix()
194    }
195    ///
196    /// Appends an item to `SecurityGroupIds`.
197    ///
198    /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
199    ///
200    /// <p>The IDs of the security groups to associate with the Verified Access endpoint. Required if <code>AttachmentType</code> is set to <code>vpc</code>.</p>
201    pub fn security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
202        self.inner = self.inner.security_group_ids(input.into());
203        self
204    }
205    /// <p>The IDs of the security groups to associate with the Verified Access endpoint. Required if <code>AttachmentType</code> is set to <code>vpc</code>.</p>
206    pub fn set_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
207        self.inner = self.inner.set_security_group_ids(input);
208        self
209    }
210    /// <p>The IDs of the security groups to associate with the Verified Access endpoint. Required if <code>AttachmentType</code> is set to <code>vpc</code>.</p>
211    pub fn get_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
212        self.inner.get_security_group_ids()
213    }
214    /// <p>The load balancer details. This parameter is required if the endpoint type is <code>load-balancer</code>.</p>
215    pub fn load_balancer_options(mut self, input: crate::types::CreateVerifiedAccessEndpointLoadBalancerOptions) -> Self {
216        self.inner = self.inner.load_balancer_options(input);
217        self
218    }
219    /// <p>The load balancer details. This parameter is required if the endpoint type is <code>load-balancer</code>.</p>
220    pub fn set_load_balancer_options(mut self, input: ::std::option::Option<crate::types::CreateVerifiedAccessEndpointLoadBalancerOptions>) -> Self {
221        self.inner = self.inner.set_load_balancer_options(input);
222        self
223    }
224    /// <p>The load balancer details. This parameter is required if the endpoint type is <code>load-balancer</code>.</p>
225    pub fn get_load_balancer_options(&self) -> &::std::option::Option<crate::types::CreateVerifiedAccessEndpointLoadBalancerOptions> {
226        self.inner.get_load_balancer_options()
227    }
228    /// <p>The network interface details. This parameter is required if the endpoint type is <code>network-interface</code>.</p>
229    pub fn network_interface_options(mut self, input: crate::types::CreateVerifiedAccessEndpointEniOptions) -> Self {
230        self.inner = self.inner.network_interface_options(input);
231        self
232    }
233    /// <p>The network interface details. This parameter is required if the endpoint type is <code>network-interface</code>.</p>
234    pub fn set_network_interface_options(mut self, input: ::std::option::Option<crate::types::CreateVerifiedAccessEndpointEniOptions>) -> Self {
235        self.inner = self.inner.set_network_interface_options(input);
236        self
237    }
238    /// <p>The network interface details. This parameter is required if the endpoint type is <code>network-interface</code>.</p>
239    pub fn get_network_interface_options(&self) -> &::std::option::Option<crate::types::CreateVerifiedAccessEndpointEniOptions> {
240        self.inner.get_network_interface_options()
241    }
242    /// <p>A description for the Verified Access endpoint.</p>
243    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
244        self.inner = self.inner.description(input.into());
245        self
246    }
247    /// <p>A description for the Verified Access endpoint.</p>
248    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
249        self.inner = self.inner.set_description(input);
250        self
251    }
252    /// <p>A description for the Verified Access endpoint.</p>
253    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
254        self.inner.get_description()
255    }
256    /// <p>The Verified Access policy document.</p>
257    pub fn policy_document(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
258        self.inner = self.inner.policy_document(input.into());
259        self
260    }
261    /// <p>The Verified Access policy document.</p>
262    pub fn set_policy_document(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
263        self.inner = self.inner.set_policy_document(input);
264        self
265    }
266    /// <p>The Verified Access policy document.</p>
267    pub fn get_policy_document(&self) -> &::std::option::Option<::std::string::String> {
268        self.inner.get_policy_document()
269    }
270    ///
271    /// Appends an item to `TagSpecifications`.
272    ///
273    /// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
274    ///
275    /// <p>The tags to assign to the Verified Access endpoint.</p>
276    pub fn tag_specifications(mut self, input: crate::types::TagSpecification) -> Self {
277        self.inner = self.inner.tag_specifications(input);
278        self
279    }
280    /// <p>The tags to assign to the Verified Access endpoint.</p>
281    pub fn set_tag_specifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>) -> Self {
282        self.inner = self.inner.set_tag_specifications(input);
283        self
284    }
285    /// <p>The tags to assign to the Verified Access endpoint.</p>
286    pub fn get_tag_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>> {
287        self.inner.get_tag_specifications()
288    }
289    /// <p>A unique, case-sensitive token that you provide to ensure idempotency of your modification request. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensuring idempotency</a>.</p>
290    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
291        self.inner = self.inner.client_token(input.into());
292        self
293    }
294    /// <p>A unique, case-sensitive token that you provide to ensure idempotency of your modification request. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensuring idempotency</a>.</p>
295    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
296        self.inner = self.inner.set_client_token(input);
297        self
298    }
299    /// <p>A unique, case-sensitive token that you provide to ensure idempotency of your modification request. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensuring idempotency</a>.</p>
300    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
301        self.inner.get_client_token()
302    }
303    /// <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>
304    pub fn dry_run(mut self, input: bool) -> Self {
305        self.inner = self.inner.dry_run(input);
306        self
307    }
308    /// <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>
309    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
310        self.inner = self.inner.set_dry_run(input);
311        self
312    }
313    /// <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>
314    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
315        self.inner.get_dry_run()
316    }
317    /// <p>The options for server side encryption.</p>
318    pub fn sse_specification(mut self, input: crate::types::VerifiedAccessSseSpecificationRequest) -> Self {
319        self.inner = self.inner.sse_specification(input);
320        self
321    }
322    /// <p>The options for server side encryption.</p>
323    pub fn set_sse_specification(mut self, input: ::std::option::Option<crate::types::VerifiedAccessSseSpecificationRequest>) -> Self {
324        self.inner = self.inner.set_sse_specification(input);
325        self
326    }
327    /// <p>The options for server side encryption.</p>
328    pub fn get_sse_specification(&self) -> &::std::option::Option<crate::types::VerifiedAccessSseSpecificationRequest> {
329        self.inner.get_sse_specification()
330    }
331    /// <p>The RDS details. This parameter is required if the endpoint type is <code>rds</code>.</p>
332    pub fn rds_options(mut self, input: crate::types::CreateVerifiedAccessEndpointRdsOptions) -> Self {
333        self.inner = self.inner.rds_options(input);
334        self
335    }
336    /// <p>The RDS details. This parameter is required if the endpoint type is <code>rds</code>.</p>
337    pub fn set_rds_options(mut self, input: ::std::option::Option<crate::types::CreateVerifiedAccessEndpointRdsOptions>) -> Self {
338        self.inner = self.inner.set_rds_options(input);
339        self
340    }
341    /// <p>The RDS details. This parameter is required if the endpoint type is <code>rds</code>.</p>
342    pub fn get_rds_options(&self) -> &::std::option::Option<crate::types::CreateVerifiedAccessEndpointRdsOptions> {
343        self.inner.get_rds_options()
344    }
345    /// <p>The CIDR options. This parameter is required if the endpoint type is <code>cidr</code>.</p>
346    pub fn cidr_options(mut self, input: crate::types::CreateVerifiedAccessEndpointCidrOptions) -> Self {
347        self.inner = self.inner.cidr_options(input);
348        self
349    }
350    /// <p>The CIDR options. This parameter is required if the endpoint type is <code>cidr</code>.</p>
351    pub fn set_cidr_options(mut self, input: ::std::option::Option<crate::types::CreateVerifiedAccessEndpointCidrOptions>) -> Self {
352        self.inner = self.inner.set_cidr_options(input);
353        self
354    }
355    /// <p>The CIDR options. This parameter is required if the endpoint type is <code>cidr</code>.</p>
356    pub fn get_cidr_options(&self) -> &::std::option::Option<crate::types::CreateVerifiedAccessEndpointCidrOptions> {
357        self.inner.get_cidr_options()
358    }
359}