UserPoolDomainOptions Struct
Options to create a UserPoolDomain.
Example
ts
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
cognitoDomainCognitoDomainOptionscognito_domainCognitoDomainOptionscognitoDomainCognitoDomainOptionsCognitoDomainCognitoDomainOptionsCognitoDomainCognitoDomainOptions#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.
customDomainCustomDomainOptionscustom_domainCustomDomainOptionscustomDomainCustomDomainOptionsCustomDomainCustomDomainOptionsCustomDomainCustomDomainOptions#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.
managedLoginVersionManagedLoginVersionmanaged_login_versionManagedLoginVersionmanagedLoginVersionManagedLoginVersionManagedLoginVersionManagedLoginVersionManagedLoginVersionManagedLoginVersion#A version that indicates the state of managed login.
Default: undefined - Cognito default setting is ManagedLoginVersion.CLASSIC_HOSTED_UI
This choice applies to all app clients that host services at the domain.