interface DomainOptions
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Amplify.DomainOptions |
Java | software.amazon.awscdk.services.amplify.DomainOptions |
Python | aws_cdk.aws_amplify.DomainOptions |
TypeScript (source) | @aws-cdk/aws-amplify » DomainOptions |
Options to add a domain to an application.
Example
declare const amplifyApp: amplify.App;
declare const master: amplify.Branch;
declare const dev: amplify.Branch;
const domain = amplifyApp.addDomain('example.com', {
enableAutoSubdomain: true, // in case subdomains should be auto registered for branches
autoSubdomainCreationPatterns: ['*', 'pr*'], // regex for branches that should auto register subdomains
});
domain.mapRoot(master); // map master branch to domain root
domain.mapSubDomain(master, 'www');
domain.mapSubDomain(dev); // sub domain prefix defaults to branch name
Properties
Name | Type | Description |
---|---|---|
auto | string[] | Branches which should automatically create subdomains. |
domain | string | The name of the domain. |
enable | boolean | Automatically create subdomains for connected branches. |
sub | Sub [] | Subdomains. |
autoSubdomainCreationPatterns?
Type:
string[]
(optional, default: all repository branches ['', 'pr'])
Branches which should automatically create subdomains.
domainName?
Type:
string
(optional, default: the construct's id)
The name of the domain.
enableAutoSubdomain?
Type:
boolean
(optional, default: false)
Automatically create subdomains for connected branches.
subDomains?
Type:
Sub
[]
(optional, default: use addSubDomain()
to add subdomains)
Subdomains.