aws_sdk_cognitoidentityprovider/operation/update_user_pool_domain/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_user_pool_domain::_update_user_pool_domain_output::UpdateUserPoolDomainOutputBuilder;
3
4pub use crate::operation::update_user_pool_domain::_update_user_pool_domain_input::UpdateUserPoolDomainInputBuilder;
5
6impl crate::operation::update_user_pool_domain::builders::UpdateUserPoolDomainInputBuilder {
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::update_user_pool_domain::UpdateUserPoolDomainOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_user_pool_domain::UpdateUserPoolDomainError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_user_pool_domain();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UpdateUserPoolDomain`.
24///
25/// <p>A user pool domain hosts managed login, an authorization server and web server for authentication in your application. This operation updates the branding version for user pool domains between <code>1</code> for hosted UI (classic) and <code>2</code> for managed login. It also updates the SSL certificate for user pool custom domains.</p>
26/// <p>Changes to the domain branding version take up to one minute to take effect for a prefix domain and up to five minutes for a custom domain.</p>
27/// <p>This operation doesn't change the name of your user pool domain. To change your domain, delete it with <code>DeleteUserPoolDomain</code> and create a new domain with <code>CreateUserPoolDomain</code>.</p>
28/// <p>You can pass the ARN of a new Certificate Manager certificate in this request. Typically, ACM certificates automatically renew and you user pool can continue to use the same ARN. But if you generate a new certificate for your custom domain name, replace the original configuration with the new ARN in this request.</p>
29/// <p>ACM certificates for custom domains must be in the US East (N. Virginia) Amazon Web Services Region. After you submit your request, Amazon Cognito requires up to 1 hour to distribute your new certificate to your custom domain.</p>
30/// <p>For more information about adding a custom domain to your user pool, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-add-custom-domain.html">Configuring a user pool domain</a>.</p><note>
31/// <p>Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.</p>
32/// <p class="title"><b>Learn more</b></p>
33/// <ul>
34/// <li>
35/// <p><a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-signing.html">Signing Amazon Web Services API Requests</a></p></li>
36/// <li>
37/// <p><a href="https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html">Using the Amazon Cognito user pools API and user pool endpoints</a></p></li>
38/// </ul>
39/// </note>
40#[derive(::std::clone::Clone, ::std::fmt::Debug)]
41pub struct UpdateUserPoolDomainFluentBuilder {
42 handle: ::std::sync::Arc<crate::client::Handle>,
43 inner: crate::operation::update_user_pool_domain::builders::UpdateUserPoolDomainInputBuilder,
44 config_override: ::std::option::Option<crate::config::Builder>,
45}
46impl
47 crate::client::customize::internal::CustomizableSend<
48 crate::operation::update_user_pool_domain::UpdateUserPoolDomainOutput,
49 crate::operation::update_user_pool_domain::UpdateUserPoolDomainError,
50 > for UpdateUserPoolDomainFluentBuilder
51{
52 fn send(
53 self,
54 config_override: crate::config::Builder,
55 ) -> crate::client::customize::internal::BoxFuture<
56 crate::client::customize::internal::SendResult<
57 crate::operation::update_user_pool_domain::UpdateUserPoolDomainOutput,
58 crate::operation::update_user_pool_domain::UpdateUserPoolDomainError,
59 >,
60 > {
61 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
62 }
63}
64impl UpdateUserPoolDomainFluentBuilder {
65 /// Creates a new `UpdateUserPoolDomainFluentBuilder`.
66 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
67 Self {
68 handle,
69 inner: ::std::default::Default::default(),
70 config_override: ::std::option::Option::None,
71 }
72 }
73 /// Access the UpdateUserPoolDomain as a reference.
74 pub fn as_input(&self) -> &crate::operation::update_user_pool_domain::builders::UpdateUserPoolDomainInputBuilder {
75 &self.inner
76 }
77 /// Sends the request and returns the response.
78 ///
79 /// If an error occurs, an `SdkError` will be returned with additional details that
80 /// can be matched against.
81 ///
82 /// By default, any retryable failures will be retried twice. Retry behavior
83 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
84 /// set when configuring the client.
85 pub async fn send(
86 self,
87 ) -> ::std::result::Result<
88 crate::operation::update_user_pool_domain::UpdateUserPoolDomainOutput,
89 ::aws_smithy_runtime_api::client::result::SdkError<
90 crate::operation::update_user_pool_domain::UpdateUserPoolDomainError,
91 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
92 >,
93 > {
94 let input = self
95 .inner
96 .build()
97 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
98 let runtime_plugins = crate::operation::update_user_pool_domain::UpdateUserPoolDomain::operation_runtime_plugins(
99 self.handle.runtime_plugins.clone(),
100 &self.handle.conf,
101 self.config_override,
102 );
103 crate::operation::update_user_pool_domain::UpdateUserPoolDomain::orchestrate(&runtime_plugins, input).await
104 }
105
106 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
107 pub fn customize(
108 self,
109 ) -> crate::client::customize::CustomizableOperation<
110 crate::operation::update_user_pool_domain::UpdateUserPoolDomainOutput,
111 crate::operation::update_user_pool_domain::UpdateUserPoolDomainError,
112 Self,
113 > {
114 crate::client::customize::CustomizableOperation::new(self)
115 }
116 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
117 self.set_config_override(::std::option::Option::Some(config_override.into()));
118 self
119 }
120
121 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
122 self.config_override = config_override;
123 self
124 }
125 /// <p>The name of the domain that you want to update. For custom domains, this is the fully-qualified domain name, for example <code>auth.example.com</code>. For prefix domains, this is the prefix alone, such as <code>myprefix</code>.</p>
126 pub fn domain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127 self.inner = self.inner.domain(input.into());
128 self
129 }
130 /// <p>The name of the domain that you want to update. For custom domains, this is the fully-qualified domain name, for example <code>auth.example.com</code>. For prefix domains, this is the prefix alone, such as <code>myprefix</code>.</p>
131 pub fn set_domain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132 self.inner = self.inner.set_domain(input);
133 self
134 }
135 /// <p>The name of the domain that you want to update. For custom domains, this is the fully-qualified domain name, for example <code>auth.example.com</code>. For prefix domains, this is the prefix alone, such as <code>myprefix</code>.</p>
136 pub fn get_domain(&self) -> &::std::option::Option<::std::string::String> {
137 self.inner.get_domain()
138 }
139 /// <p>The ID of the user pool that is associated with the domain you're updating.</p>
140 pub fn user_pool_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141 self.inner = self.inner.user_pool_id(input.into());
142 self
143 }
144 /// <p>The ID of the user pool that is associated with the domain you're updating.</p>
145 pub fn set_user_pool_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146 self.inner = self.inner.set_user_pool_id(input);
147 self
148 }
149 /// <p>The ID of the user pool that is associated with the domain you're updating.</p>
150 pub fn get_user_pool_id(&self) -> &::std::option::Option<::std::string::String> {
151 self.inner.get_user_pool_id()
152 }
153 /// <p>A version number that indicates the state of managed login for your domain. Version <code>1</code> is hosted UI (classic). Version <code>2</code> is the newer managed login with the branding editor. For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managed-login.html">Managed login</a>.</p>
154 pub fn managed_login_version(mut self, input: i32) -> Self {
155 self.inner = self.inner.managed_login_version(input);
156 self
157 }
158 /// <p>A version number that indicates the state of managed login for your domain. Version <code>1</code> is hosted UI (classic). Version <code>2</code> is the newer managed login with the branding editor. For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managed-login.html">Managed login</a>.</p>
159 pub fn set_managed_login_version(mut self, input: ::std::option::Option<i32>) -> Self {
160 self.inner = self.inner.set_managed_login_version(input);
161 self
162 }
163 /// <p>A version number that indicates the state of managed login for your domain. Version <code>1</code> is hosted UI (classic). Version <code>2</code> is the newer managed login with the branding editor. For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managed-login.html">Managed login</a>.</p>
164 pub fn get_managed_login_version(&self) -> &::std::option::Option<i32> {
165 self.inner.get_managed_login_version()
166 }
167 /// <p>The configuration for a custom domain that hosts managed login for your application. In an <code>UpdateUserPoolDomain</code> request, this parameter specifies an SSL certificate for the managed login hosted webserver. The certificate must be an ACM ARN in <code>us-east-1</code>.</p>
168 /// <p>When you create a custom domain, the passkey RP ID defaults to the custom domain. If you had a prefix domain active, this will cause passkey integration for your prefix domain to stop working due to a mismatch in RP ID. To keep the prefix domain passkey integration working, you can explicitly set RP ID to the prefix domain.</p>
169 pub fn custom_domain_config(mut self, input: crate::types::CustomDomainConfigType) -> Self {
170 self.inner = self.inner.custom_domain_config(input);
171 self
172 }
173 /// <p>The configuration for a custom domain that hosts managed login for your application. In an <code>UpdateUserPoolDomain</code> request, this parameter specifies an SSL certificate for the managed login hosted webserver. The certificate must be an ACM ARN in <code>us-east-1</code>.</p>
174 /// <p>When you create a custom domain, the passkey RP ID defaults to the custom domain. If you had a prefix domain active, this will cause passkey integration for your prefix domain to stop working due to a mismatch in RP ID. To keep the prefix domain passkey integration working, you can explicitly set RP ID to the prefix domain.</p>
175 pub fn set_custom_domain_config(mut self, input: ::std::option::Option<crate::types::CustomDomainConfigType>) -> Self {
176 self.inner = self.inner.set_custom_domain_config(input);
177 self
178 }
179 /// <p>The configuration for a custom domain that hosts managed login for your application. In an <code>UpdateUserPoolDomain</code> request, this parameter specifies an SSL certificate for the managed login hosted webserver. The certificate must be an ACM ARN in <code>us-east-1</code>.</p>
180 /// <p>When you create a custom domain, the passkey RP ID defaults to the custom domain. If you had a prefix domain active, this will cause passkey integration for your prefix domain to stop working due to a mismatch in RP ID. To keep the prefix domain passkey integration working, you can explicitly set RP ID to the prefix domain.</p>
181 pub fn get_custom_domain_config(&self) -> &::std::option::Option<crate::types::CustomDomainConfigType> {
182 self.inner.get_custom_domain_config()
183 }
184}