aws_sdk_ec2/operation/create_verified_access_trust_provider/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_verified_access_trust_provider::_create_verified_access_trust_provider_output::CreateVerifiedAccessTrustProviderOutputBuilder;
3
4pub use crate::operation::create_verified_access_trust_provider::_create_verified_access_trust_provider_input::CreateVerifiedAccessTrustProviderInputBuilder;
5
6impl crate::operation::create_verified_access_trust_provider::builders::CreateVerifiedAccessTrustProviderInputBuilder {
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_trust_provider::CreateVerifiedAccessTrustProviderOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_verified_access_trust_provider::CreateVerifiedAccessTrustProviderError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_verified_access_trust_provider();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateVerifiedAccessTrustProvider`.
24///
25/// <p>A trust provider is a third-party entity that creates, maintains, and manages identity information for users and devices. When an application request is made, the identity information sent by the trust provider is evaluated by Verified Access before allowing or denying the application request.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateVerifiedAccessTrustProviderFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::create_verified_access_trust_provider::builders::CreateVerifiedAccessTrustProviderInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::create_verified_access_trust_provider::CreateVerifiedAccessTrustProviderOutput,
35        crate::operation::create_verified_access_trust_provider::CreateVerifiedAccessTrustProviderError,
36    > for CreateVerifiedAccessTrustProviderFluentBuilder
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_trust_provider::CreateVerifiedAccessTrustProviderOutput,
44            crate::operation::create_verified_access_trust_provider::CreateVerifiedAccessTrustProviderError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl CreateVerifiedAccessTrustProviderFluentBuilder {
51    /// Creates a new `CreateVerifiedAccessTrustProviderFluentBuilder`.
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 CreateVerifiedAccessTrustProvider as a reference.
60    pub fn as_input(&self) -> &crate::operation::create_verified_access_trust_provider::builders::CreateVerifiedAccessTrustProviderInputBuilder {
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_trust_provider::CreateVerifiedAccessTrustProviderOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::create_verified_access_trust_provider::CreateVerifiedAccessTrustProviderError,
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_trust_provider::CreateVerifiedAccessTrustProvider::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::create_verified_access_trust_provider::CreateVerifiedAccessTrustProvider::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_trust_provider::CreateVerifiedAccessTrustProviderOutput,
97        crate::operation::create_verified_access_trust_provider::CreateVerifiedAccessTrustProviderError,
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 type of trust provider.</p>
112    pub fn trust_provider_type(mut self, input: crate::types::TrustProviderType) -> Self {
113        self.inner = self.inner.trust_provider_type(input);
114        self
115    }
116    /// <p>The type of trust provider.</p>
117    pub fn set_trust_provider_type(mut self, input: ::std::option::Option<crate::types::TrustProviderType>) -> Self {
118        self.inner = self.inner.set_trust_provider_type(input);
119        self
120    }
121    /// <p>The type of trust provider.</p>
122    pub fn get_trust_provider_type(&self) -> &::std::option::Option<crate::types::TrustProviderType> {
123        self.inner.get_trust_provider_type()
124    }
125    /// <p>The type of user-based trust provider. This parameter is required when the provider type is <code>user</code>.</p>
126    pub fn user_trust_provider_type(mut self, input: crate::types::UserTrustProviderType) -> Self {
127        self.inner = self.inner.user_trust_provider_type(input);
128        self
129    }
130    /// <p>The type of user-based trust provider. This parameter is required when the provider type is <code>user</code>.</p>
131    pub fn set_user_trust_provider_type(mut self, input: ::std::option::Option<crate::types::UserTrustProviderType>) -> Self {
132        self.inner = self.inner.set_user_trust_provider_type(input);
133        self
134    }
135    /// <p>The type of user-based trust provider. This parameter is required when the provider type is <code>user</code>.</p>
136    pub fn get_user_trust_provider_type(&self) -> &::std::option::Option<crate::types::UserTrustProviderType> {
137        self.inner.get_user_trust_provider_type()
138    }
139    /// <p>The type of device-based trust provider. This parameter is required when the provider type is <code>device</code>.</p>
140    pub fn device_trust_provider_type(mut self, input: crate::types::DeviceTrustProviderType) -> Self {
141        self.inner = self.inner.device_trust_provider_type(input);
142        self
143    }
144    /// <p>The type of device-based trust provider. This parameter is required when the provider type is <code>device</code>.</p>
145    pub fn set_device_trust_provider_type(mut self, input: ::std::option::Option<crate::types::DeviceTrustProviderType>) -> Self {
146        self.inner = self.inner.set_device_trust_provider_type(input);
147        self
148    }
149    /// <p>The type of device-based trust provider. This parameter is required when the provider type is <code>device</code>.</p>
150    pub fn get_device_trust_provider_type(&self) -> &::std::option::Option<crate::types::DeviceTrustProviderType> {
151        self.inner.get_device_trust_provider_type()
152    }
153    /// <p>The options for a OpenID Connect-compatible user-identity trust provider. This parameter is required when the provider type is <code>user</code>.</p>
154    pub fn oidc_options(mut self, input: crate::types::CreateVerifiedAccessTrustProviderOidcOptions) -> Self {
155        self.inner = self.inner.oidc_options(input);
156        self
157    }
158    /// <p>The options for a OpenID Connect-compatible user-identity trust provider. This parameter is required when the provider type is <code>user</code>.</p>
159    pub fn set_oidc_options(mut self, input: ::std::option::Option<crate::types::CreateVerifiedAccessTrustProviderOidcOptions>) -> Self {
160        self.inner = self.inner.set_oidc_options(input);
161        self
162    }
163    /// <p>The options for a OpenID Connect-compatible user-identity trust provider. This parameter is required when the provider type is <code>user</code>.</p>
164    pub fn get_oidc_options(&self) -> &::std::option::Option<crate::types::CreateVerifiedAccessTrustProviderOidcOptions> {
165        self.inner.get_oidc_options()
166    }
167    /// <p>The options for a device-based trust provider. This parameter is required when the provider type is <code>device</code>.</p>
168    pub fn device_options(mut self, input: crate::types::CreateVerifiedAccessTrustProviderDeviceOptions) -> Self {
169        self.inner = self.inner.device_options(input);
170        self
171    }
172    /// <p>The options for a device-based trust provider. This parameter is required when the provider type is <code>device</code>.</p>
173    pub fn set_device_options(mut self, input: ::std::option::Option<crate::types::CreateVerifiedAccessTrustProviderDeviceOptions>) -> Self {
174        self.inner = self.inner.set_device_options(input);
175        self
176    }
177    /// <p>The options for a device-based trust provider. This parameter is required when the provider type is <code>device</code>.</p>
178    pub fn get_device_options(&self) -> &::std::option::Option<crate::types::CreateVerifiedAccessTrustProviderDeviceOptions> {
179        self.inner.get_device_options()
180    }
181    /// <p>The identifier to be used when working with policy rules.</p>
182    pub fn policy_reference_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
183        self.inner = self.inner.policy_reference_name(input.into());
184        self
185    }
186    /// <p>The identifier to be used when working with policy rules.</p>
187    pub fn set_policy_reference_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
188        self.inner = self.inner.set_policy_reference_name(input);
189        self
190    }
191    /// <p>The identifier to be used when working with policy rules.</p>
192    pub fn get_policy_reference_name(&self) -> &::std::option::Option<::std::string::String> {
193        self.inner.get_policy_reference_name()
194    }
195    /// <p>A description for the Verified Access trust provider.</p>
196    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
197        self.inner = self.inner.description(input.into());
198        self
199    }
200    /// <p>A description for the Verified Access trust provider.</p>
201    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
202        self.inner = self.inner.set_description(input);
203        self
204    }
205    /// <p>A description for the Verified Access trust provider.</p>
206    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
207        self.inner.get_description()
208    }
209    ///
210    /// Appends an item to `TagSpecifications`.
211    ///
212    /// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
213    ///
214    /// <p>The tags to assign to the Verified Access trust provider.</p>
215    pub fn tag_specifications(mut self, input: crate::types::TagSpecification) -> Self {
216        self.inner = self.inner.tag_specifications(input);
217        self
218    }
219    /// <p>The tags to assign to the Verified Access trust provider.</p>
220    pub fn set_tag_specifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>) -> Self {
221        self.inner = self.inner.set_tag_specifications(input);
222        self
223    }
224    /// <p>The tags to assign to the Verified Access trust provider.</p>
225    pub fn get_tag_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>> {
226        self.inner.get_tag_specifications()
227    }
228    /// <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>
229    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
230        self.inner = self.inner.client_token(input.into());
231        self
232    }
233    /// <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>
234    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
235        self.inner = self.inner.set_client_token(input);
236        self
237    }
238    /// <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>
239    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
240        self.inner.get_client_token()
241    }
242    /// <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>
243    pub fn dry_run(mut self, input: bool) -> Self {
244        self.inner = self.inner.dry_run(input);
245        self
246    }
247    /// <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>
248    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
249        self.inner = self.inner.set_dry_run(input);
250        self
251    }
252    /// <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>
253    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
254        self.inner.get_dry_run()
255    }
256    /// <p>The options for server side encryption.</p>
257    pub fn sse_specification(mut self, input: crate::types::VerifiedAccessSseSpecificationRequest) -> Self {
258        self.inner = self.inner.sse_specification(input);
259        self
260    }
261    /// <p>The options for server side encryption.</p>
262    pub fn set_sse_specification(mut self, input: ::std::option::Option<crate::types::VerifiedAccessSseSpecificationRequest>) -> Self {
263        self.inner = self.inner.set_sse_specification(input);
264        self
265    }
266    /// <p>The options for server side encryption.</p>
267    pub fn get_sse_specification(&self) -> &::std::option::Option<crate::types::VerifiedAccessSseSpecificationRequest> {
268        self.inner.get_sse_specification()
269    }
270    /// <p>The OpenID Connect (OIDC) options.</p>
271    pub fn native_application_oidc_options(mut self, input: crate::types::CreateVerifiedAccessNativeApplicationOidcOptions) -> Self {
272        self.inner = self.inner.native_application_oidc_options(input);
273        self
274    }
275    /// <p>The OpenID Connect (OIDC) options.</p>
276    pub fn set_native_application_oidc_options(
277        mut self,
278        input: ::std::option::Option<crate::types::CreateVerifiedAccessNativeApplicationOidcOptions>,
279    ) -> Self {
280        self.inner = self.inner.set_native_application_oidc_options(input);
281        self
282    }
283    /// <p>The OpenID Connect (OIDC) options.</p>
284    pub fn get_native_application_oidc_options(&self) -> &::std::option::Option<crate::types::CreateVerifiedAccessNativeApplicationOidcOptions> {
285        self.inner.get_native_application_oidc_options()
286    }
287}