create_user_pool_domain
async
¶
create_user_pool_domain(
domain: DomainType,
user_pool_id: UserPoolIdType,
*,
config_overrides: Optional[AsyncCognitoIdentityProviderClientConfig] = None,
managed_login_version: Optional[WrappedIntegerType] = None,
custom_domain_config: Optional[CustomDomainConfigType] = None,
routing: Optional[RoutingType] = None,
) -> CreateUserPoolDomainResponse
A user pool domain hosts managed login, an authorization server and web server for authentication in your application. This operation creates a new user pool prefix domain or custom domain and sets the managed login branding version. Set the branding version to 1 for hosted UI (classic) or 2 for managed login. When you choose a custom domain, you must provide an SSL certificate in the US East (N. Virginia) Amazon Web Services Region in your request.
Your prefix domain might take up to one minute to take effect. Your custom domain is online within five minutes, but it can take up to one hour to distribute your SSL certificate.
For more information about adding a custom domain to your user pool, see Configuring a user pool domain.
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.
Learn more
Parameters:
-
domain(DomainType) –The domain string. For custom domains, this is the fully-qualified domain name, such as
auth.example.com. For prefix domains, this is the prefix alone, such asmyprefix. A prefix value ofmyprefixfor a user pool in theus-east-1Region results in a domain ofmyprefix.auth.us-east-1.amazoncognito.com. -
user_pool_id(UserPoolIdType) –The ID of the user pool where you want to add a domain.
-
managed_login_version(Optional[WrappedIntegerType], default:None) –The version of managed login branding that you want to apply to your domain. A value of
1indicates hosted UI (classic) and a version of2indicates managed login.Managed login requires that your user pool be configured for any feature plan other than
Lite.A
ManagedLoginVersionvalue of2does not activate managed login pages for your app client. When you create an app client programmatically, your app client has no branding style. To use managed login, create a branding style using the CreateManagedLoginBranding operation. When you use the console, Amazon Cognito assigns a default branding style automatically. When you use the API or an SDK, you must create a branding style yourself. -
custom_domain_config(Optional[CustomDomainConfigType], default:None) –The configuration for a custom domain. Configures your domain with an Certificate Manager certificate in the
us-east-1Region.Provide this parameter only if you want to use a custom domain for your user pool. Otherwise, you can omit this parameter and use a prefix domain instead.
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.
-
routing(Optional[RoutingType], default:None) –The configuration of routing for requests to the domain for replicas of a replicated user pool. The routing configuration is currently only supported for custom domains.
Raises:
-
ConcurrentModificationException–This exception is thrown if two or more modifications are happening concurrently.
-
FeatureUnavailableInTierException–This exception is thrown when a feature that you attempted to use or configure isn't included in your user pool's current feature plan. This can occur when:
-
You configure a feature that your feature plan doesn't support.
-
You make a request that uses a feature that requires a higher feature plan.
To resolve this issue, upgrade your user pool to a feature plan that includes the feature.
-
-
InternalErrorException–This exception is thrown when Amazon Cognito encounters an internal error.
-
InvalidParameterException–This exception is thrown when the Amazon Cognito service encounters an invalid parameter.
-
LimitExceededException–This exception is thrown when a user exceeds the limit for a requested Amazon Web Services resource.
-
NotAuthorizedException–This exception is thrown when a user isn't authorized.
-
OperationNotEnabledException–This exception is thrown when an operation is not available in the current region or for the current user pool configuration. This can occur when attempting to perform operations that are not supported in secondary replica regions.
-
ResourceNotFoundException–This exception is thrown when the Amazon Cognito service can't find the requested resource.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_cognito_identity_provider/_services/async_cognito_identity_provider.py
4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 | |