interface DomainProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Amplify.DomainProps |
Java | software.amazon.awscdk.services.amplify.DomainProps |
Python | aws_cdk.aws_amplify.DomainProps |
TypeScript (source) | @aws-cdk/aws-amplify » DomainProps |
Properties for a Domain.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as amplify from '@aws-cdk/aws-amplify';
import * as iam from '@aws-cdk/aws-iam';
declare const app: amplify.App;
declare const branch: amplify.Branch;
declare const role: iam.Role;
const domainProps: amplify.DomainProps = {
app: app,
// the properties below are optional
autoSubdomainCreationPatterns: ['autoSubdomainCreationPatterns'],
autoSubDomainIamRole: role,
domainName: 'domainName',
enableAutoSubdomain: false,
subDomains: [{
branch: branch,
// the properties below are optional
prefix: 'prefix',
}],
};
Properties
Name | Type | Description |
---|---|---|
app | IApp | The application to which the domain must be connected. |
auto | IRole | The IAM role with access to Route53 when using enableAutoSubdomain. |
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. |
app
Type:
IApp
The application to which the domain must be connected.
autoSubDomainIamRole?
Type:
IRole
(optional, default: the IAM role from App.grantPrincipal)
The IAM role with access to Route53 when using enableAutoSubdomain.
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.