interface UserPoolDomainOptions
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Cognito.UserPoolDomainOptions |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscognito#UserPoolDomainOptions |
Java | software.amazon.awscdk.services.cognito.UserPoolDomainOptions |
Python | aws_cdk.aws_cognito.UserPoolDomainOptions |
TypeScript (source) | aws-cdk-lib » aws_cognito » UserPoolDomainOptions |
Options to create a UserPoolDomain.
Example
const pool = new cognito.UserPool(this, 'Pool');
pool.addDomain('CognitoDomain', {
cognitoDomain: {
domainPrefix: 'my-awesome-app',
},
});
const certificateArn = 'arn:aws:acm:us-east-1:123456789012:certificate/11-3336f1-44483d-adc7-9cd375c5169d';
const domainCert = certificatemanager.Certificate.fromCertificateArn(this, 'domainCert', certificateArn);
pool.addDomain('CustomDomain', {
customDomain: {
domainName: 'user.myapp.com',
certificate: domainCert,
},
});
Properties
Name | Type | Description |
---|---|---|
cognito | Cognito | Associate a cognito prefix domain with your user pool Either customDomain or cognitoDomain must be specified. |
custom | Custom | Associate a custom domain with your user pool Either customDomain or cognitoDomain must be specified. |
cognitoDomain?
Type:
Cognito
(optional, default: not set if customDomain
is specified, otherwise, throws an error.)
Associate a cognito prefix domain with your user pool Either customDomain
or cognitoDomain
must be specified.
customDomain?
Type:
Custom
(optional, default: not set if cognitoDomain
is specified, otherwise, throws an error.)
Associate a custom domain with your user pool Either customDomain
or cognitoDomain
must be specified.
See also: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-add-custom-domain.html