UserPoolDomainOptions
- class aws_cdk.aws_cognito.UserPoolDomainOptions(*, cognito_domain=None, custom_domain=None)
Bases:
objectOptions to create a UserPoolDomain.
- Parameters:
cognito_domain (
Union[CognitoDomainOptions,Dict[str,Any],None]) – Associate a cognito prefix domain with your user pool EithercustomDomainorcognitoDomainmust be specified. Default: - not set ifcustomDomainis specified, otherwise, throws an error.custom_domain (
Union[CustomDomainOptions,Dict[str,Any],None]) – Associate a custom domain with your user pool EithercustomDomainorcognitoDomainmust be specified. Default: - not set ifcognitoDomainis specified, otherwise, throws an error.
- ExampleMetadata:
infused
Example:
pool = cognito.UserPool(self, "Pool") pool.add_domain("CognitoDomain", cognito_domain=cognito.CognitoDomainOptions( domain_prefix="my-awesome-app" ) ) certificate_arn = "arn:aws:acm:us-east-1:123456789012:certificate/11-3336f1-44483d-adc7-9cd375c5169d" domain_cert = certificatemanager.Certificate.from_certificate_arn(self, "domainCert", certificate_arn) pool.add_domain("CustomDomain", custom_domain=cognito.CustomDomainOptions( domain_name="user.myapp.com", certificate=domain_cert ) )
Attributes
- cognito_domain
Associate a cognito prefix domain with your user pool Either
customDomainorcognitoDomainmust be specified.- Default:
not set if
customDomainis specified, otherwise, throws an error.
- See:
- custom_domain
Associate a custom domain with your user pool Either
customDomainorcognitoDomainmust be specified.- Default:
not set if
cognitoDomainis specified, otherwise, throws an error.
- See: