Class CognitoDomainOptions
Options while specifying a cognito prefix domain.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.Cognito
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CognitoDomainOptions : ICognitoDomainOptions
Syntax (vb)
Public Class CognitoDomainOptions Implements ICognitoDomainOptions
Remarks
ExampleMetadata: infused
Examples
var pool = new UserPool(this, "Pool");
pool.AddDomain("CognitoDomain", new UserPoolDomainOptions {
CognitoDomain = new CognitoDomainOptions {
DomainPrefix = "my-awesome-app"
}
});
var certificateArn = "arn:aws:acm:us-east-1:123456789012:certificate/11-3336f1-44483d-adc7-9cd375c5169d";
var domainCert = Certificate.FromCertificateArn(this, "domainCert", certificateArn);
pool.AddDomain("CustomDomain", new UserPoolDomainOptions {
CustomDomain = new CustomDomainOptions {
DomainName = "user.myapp.com",
Certificate = domainCert
}
});
Synopsis
Constructors
| CognitoDomainOptions() | Options while specifying a cognito prefix domain. |
Properties
| DomainPrefix | The prefix to the Cognito hosted domain name that will be associated with the user pool. |
Constructors
CognitoDomainOptions()
Options while specifying a cognito prefix domain.
public CognitoDomainOptions()
Remarks
ExampleMetadata: infused
Examples
var pool = new UserPool(this, "Pool");
pool.AddDomain("CognitoDomain", new UserPoolDomainOptions {
CognitoDomain = new CognitoDomainOptions {
DomainPrefix = "my-awesome-app"
}
});
var certificateArn = "arn:aws:acm:us-east-1:123456789012:certificate/11-3336f1-44483d-adc7-9cd375c5169d";
var domainCert = Certificate.FromCertificateArn(this, "domainCert", certificateArn);
pool.AddDomain("CustomDomain", new UserPoolDomainOptions {
CustomDomain = new CustomDomainOptions {
DomainName = "user.myapp.com",
Certificate = domainCert
}
});
Properties
DomainPrefix
The prefix to the Cognito hosted domain name that will be associated with the user pool.
public string DomainPrefix { get; set; }
Property Value
Remarks
ExampleMetadata: infused