aws_sdk_cognitoidentityprovider/client/
create_user_pool_domain.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`CreateUserPoolDomain`](crate::operation::create_user_pool_domain::builders::CreateUserPoolDomainFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`domain(impl Into<String>)`](crate::operation::create_user_pool_domain::builders::CreateUserPoolDomainFluentBuilder::domain) / [`set_domain(Option<String>)`](crate::operation::create_user_pool_domain::builders::CreateUserPoolDomainFluentBuilder::set_domain):<br>required: **true**<br><p>The domain string. For custom domains, this is the fully-qualified domain name, such as <code>auth.example.com</code>. For prefix domains, this is the prefix alone, such as <code>myprefix</code>. A prefix value of <code>myprefix</code> for a user pool in the <code>us-east-1</code> Region results in a domain of <code>myprefix.auth.us-east-1.amazoncognito.com</code>.</p><br>
7    ///   - [`user_pool_id(impl Into<String>)`](crate::operation::create_user_pool_domain::builders::CreateUserPoolDomainFluentBuilder::user_pool_id) / [`set_user_pool_id(Option<String>)`](crate::operation::create_user_pool_domain::builders::CreateUserPoolDomainFluentBuilder::set_user_pool_id):<br>required: **true**<br><p>The ID of the user pool where you want to add a domain.</p><br>
8    ///   - [`managed_login_version(i32)`](crate::operation::create_user_pool_domain::builders::CreateUserPoolDomainFluentBuilder::managed_login_version) / [`set_managed_login_version(Option<i32>)`](crate::operation::create_user_pool_domain::builders::CreateUserPoolDomainFluentBuilder::set_managed_login_version):<br>required: **false**<br><p>The version of managed login branding that you want to apply to your domain. A value of <code>1</code> indicates hosted UI (classic) and a version of <code>2</code> indicates managed login.</p> <p>Managed login requires that your user pool be configured for any <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-sign-in-feature-plans.html">feature plan</a> other than <code>Lite</code>.</p><br>
9    ///   - [`custom_domain_config(CustomDomainConfigType)`](crate::operation::create_user_pool_domain::builders::CreateUserPoolDomainFluentBuilder::custom_domain_config) / [`set_custom_domain_config(Option<CustomDomainConfigType>)`](crate::operation::create_user_pool_domain::builders::CreateUserPoolDomainFluentBuilder::set_custom_domain_config):<br>required: **false**<br><p>The configuration for a custom domain. Configures your domain with an Certificate Manager certificate in the <code>us-east-1</code> Region.</p> <p>Provide this parameter only if you want to use a <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-add-custom-domain.html">custom domain</a> for your user pool. Otherwise, you can omit this parameter and use a <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-assign-domain-prefix.html">prefix domain</a> instead.</p> <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><br>
10    /// - On success, responds with [`CreateUserPoolDomainOutput`](crate::operation::create_user_pool_domain::CreateUserPoolDomainOutput) with field(s):
11    ///   - [`managed_login_version(Option<i32>)`](crate::operation::create_user_pool_domain::CreateUserPoolDomainOutput::managed_login_version): <p>The version of managed login branding applied your domain. A value of <code>1</code> indicates hosted UI (classic) and a version of <code>2</code> indicates managed login.</p>
12    ///   - [`cloud_front_domain(Option<String>)`](crate::operation::create_user_pool_domain::CreateUserPoolDomainOutput::cloud_front_domain): <p>The fully-qualified domain name (FQDN) of the Amazon CloudFront distribution that hosts your managed login or classic hosted UI pages. Your domain-name authority must have an alias record that points requests for your custom domain to this FQDN. Amazon Cognito returns this value if you set a custom domain with <code>CustomDomainConfig</code>. If you set an Amazon Cognito prefix domain, this parameter returns null.</p>
13    /// - On failure, responds with [`SdkError<CreateUserPoolDomainError>`](crate::operation::create_user_pool_domain::CreateUserPoolDomainError)
14    pub fn create_user_pool_domain(&self) -> crate::operation::create_user_pool_domain::builders::CreateUserPoolDomainFluentBuilder {
15        crate::operation::create_user_pool_domain::builders::CreateUserPoolDomainFluentBuilder::new(self.handle.clone())
16    }
17}