UserPoolDomain

class aws_cdk.aws_cognito.UserPoolDomain(scope, id, *, user_pool, cognito_domain=None, custom_domain=None)

Bases: aws_cdk.core.Resource

Define a user pool domain.

stability :stability: experimental

__init__(scope, id, *, user_pool, cognito_domain=None, custom_domain=None)
Parameters
  • scope (Construct) –

  • id (str) –

  • user_pool (IUserPool) – The user pool to which this domain should be associated.

  • cognito_domain (Optional[CognitoDomainOptions]) – Associate a cognito prefix domain with your user pool Either customDomain or cognitoDomain must be specified. Default: - not set if customDomain is specified, otherwise, throws an error.

  • custom_domain (Optional[CustomDomainOptions]) – Associate a custom domain with your user pool Either customDomain or cognitoDomain must be specified. Default: - not set if cognitoDomain is specified, otherwise, throws an error.

stability :stability: experimental

Return type

None

Methods

base_url()

The URL to the hosted UI associated with this domain.

stability :stability: experimental

Return type

str

sign_in_url(client, *, redirect_uri, sign_in_path=None)

The URL to the sign in page in this domain using a specific UserPoolClient.

Parameters
  • client (UserPoolClient) – [disable-awslint:ref-via-interface] the user pool client that the UI will use to interact with the UserPool.

  • redirect_uri (str) – Where to redirect to after sign in.

  • sign_in_path (Optional[str]) – The path in the URI where the sign-in page is located. Default: ‘/login’

stability :stability: experimental

Return type

str

to_string()

Returns a string representation of this construct.

Return type

str

Attributes

cloud_front_domain_name

The domain name of the CloudFront distribution associated with the user pool domain.

stability :stability: experimental

Return type

str

domain_name

The domain that was specified to be created.

If customDomain was selected, this holds the full domain name that was specified. If the cognitoDomain was used, it contains the prefix to the Cognito hosted domain.

stability :stability: experimental

Return type

str

env

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.

Return type

ResourceEnvironment

node

The construct tree node associated with this construct.

Return type

ConstructNode

stack

The stack in which this resource is defined.

Return type

Stack

Static Methods

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool