@aws-cdk_aws-amplify-alpha.DomainOptions

interface DomainOptions ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Amplify.Alpha.DomainOptions
Gogithub.com/aws/aws-cdk-go/awscdkamplifyalpha/v2#DomainOptions
Javasoftware.amazon.awscdk.services.amplify.alpha.DomainOptions
Pythonaws_cdk.aws_amplify_alpha.DomainOptions
TypeScript (source)@aws-cdk/aws-amplify-alpha ยป DomainOptions

Options to add a domain to an application.

Example

declare const amplifyApp: amplify.App;
declare const main: 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(main); // map main branch to domain root
domain.mapSubDomain(main, 'www');
domain.mapSubDomain(dev); // sub domain prefix defaults to branch name

Properties

NameTypeDescription
autoSubdomainCreationPatterns?๐Ÿ”นstring[]Branches which should automatically create subdomains.
domainName?๐Ÿ”นstringThe name of the domain.
enableAutoSubdomain?๐Ÿ”นbooleanAutomatically create subdomains for connected branches.
subDomains?๐Ÿ”นSubDomain[]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: SubDomain[] (optional, default: use addSubDomain() to add subdomains)

Subdomains.