UserPoolDomainProps

class aws_cdk.aws_cognito.UserPoolDomainProps(*, cognito_domain=None, custom_domain=None, user_pool)

Bases: UserPoolDomainOptions

Props for UserPoolDomain construct.

Parameters
  • cognito_domain (Union[CognitoDomainOptions, Dict[str, Any], None]) – 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 (Union[CustomDomainOptions, Dict[str, Any], None]) – 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.

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

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_certificatemanager as certificatemanager
from aws_cdk import aws_cognito as cognito

# certificate: certificatemanager.Certificate
# user_pool: cognito.UserPool

user_pool_domain_props = cognito.UserPoolDomainProps(
    user_pool=user_pool,

    # the properties below are optional
    cognito_domain=cognito.CognitoDomainOptions(
        domain_prefix="domainPrefix"
    ),
    custom_domain=cognito.CustomDomainOptions(
        certificate=certificate,
        domain_name="domainName"
    )
)

Attributes

cognito_domain

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.

See

https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-assign-domain-prefix.html

Return type

Optional[CognitoDomainOptions]

custom_domain

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.

See

https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-add-custom-domain.html

Return type

Optional[CustomDomainOptions]

user_pool

The user pool to which this domain should be associated.

Return type

IUserPool