Experimental
@aws-cdk/aws-amplify-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
DomainProps Struct
Properties for a Domain.
| Stability | Experimental |
|---|---|
| Source | lib/domain.ts |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as amplify_alpha from '@aws-cdk/aws-amplify-alpha';
import { aws_certificatemanager as certificatemanager } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';
declare const app: amplify_alpha.App;
declare const branch: amplify_alpha.Branch;
declare const certificate: certificatemanager.Certificate;
declare const role: iam.Role;
const domainProps: amplify_alpha.DomainProps = {
app: app,
// the properties below are optional
autoSubdomainCreationPatterns: ['autoSubdomainCreationPatterns'],
autoSubDomainIamRole: role,
customCertificate: certificate,
domainName: 'domainName',
enableAutoSubdomain: false,
subDomains: [{
branch: branch,
// the properties below are optional
prefix: 'prefix',
}],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_amplify_alpha as amplify_alpha
from aws_cdk import aws_certificatemanager as certificatemanager
from aws_cdk import aws_iam as iam
# app: amplify_alpha.App
# branch: amplify_alpha.Branch
# certificate: certificatemanager.Certificate
# role: iam.Role
domain_props = amplify_alpha.DomainProps(
app=app,
# the properties below are optional
auto_subdomain_creation_patterns=["autoSubdomainCreationPatterns"],
auto_sub_domain_iam_role=role,
custom_certificate=certificate,
domain_name="domainName",
enable_auto_subdomain=False,
sub_domains=[amplify_alpha.SubDomain(
branch=branch,
# the properties below are optional
prefix="prefix"
)]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.amplify.alpha.*;
import software.amazon.awscdk.services.certificatemanager.*;
import software.amazon.awscdk.services.iam.*;
App app;
Branch branch;
Certificate certificate;
Role role;
DomainProps domainProps = DomainProps.builder()
.app(app)
// the properties below are optional
.autoSubdomainCreationPatterns(List.of("autoSubdomainCreationPatterns"))
.autoSubDomainIamRole(role)
.customCertificate(certificate)
.domainName("domainName")
.enableAutoSubdomain(false)
.subDomains(List.of(SubDomain.builder()
.branch(branch)
// the properties below are optional
.prefix("prefix")
.build()))
.build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.Amplify.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Amplify.Alpha;
using Amazon.CDK.AWS.CertificateManager;
using Amazon.CDK.AWS.IAM;
App app;
Branch branch;
Certificate certificate;
Role role;
var domainProps = new DomainProps {
App = app,
// the properties below are optional
AutoSubdomainCreationPatterns = new [] { "autoSubdomainCreationPatterns" },
AutoSubDomainIamRole = role,
CustomCertificate = certificate,
DomainName = "domainName",
EnableAutoSubdomain = false,
SubDomains = new [] { new SubDomain {
Branch = branch,
// the properties below are optional
Prefix = "prefix"
} }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdkamplifyalpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import amplify_alpha "github.com/aws/aws-cdk-go/awscdkamplifyalpha"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
var app App
var branch Branch
var certificate Certificate
var role Role
domainProps := &DomainProps{
App: app,
// the properties below are optional
AutoSubdomainCreationPatterns: []*string{
jsii.String("autoSubdomainCreationPatterns"),
},
AutoSubDomainIamRole: role,
CustomCertificate: certificate,
DomainName: jsii.String("domainName"),
EnableAutoSubdomain: jsii.Boolean(false),
SubDomains: []SubDomain{
&SubDomain{
Branch: branch,
// the properties below are optional
Prefix: jsii.String("prefix"),
},
},
}
Properties
The application to which the domain must be connected.
autoSubdomainCreationPatternsoptionalstring[]auto_subdomain_creation_patternsoptionaltyping.List[str]autoSubdomainCreationPatternsoptionalList<String>AutoSubdomainCreationPatternsoptionalstring[]AutoSubdomainCreationPatternsoptional*[]*string #Branches which should automatically create subdomains.
Default: all repository branches ['', 'pr']
autoSubDomainIamRoleoptionalIRoleauto_sub_domain_iam_roleoptionalIRoleautoSubDomainIamRoleoptionalIRoleAutoSubDomainIamRoleoptionalIRoleAutoSubDomainIamRoleoptionalIRole #The IAM role with access to Route53 when using enableAutoSubdomain.
Default: the IAM role from App.grantPrincipal
customCertificateoptionalICertificatecustom_certificateoptionalICertificatecustomCertificateoptionalICertificateCustomCertificateoptionalICertificateCustomCertificateoptionalICertificate #The type of SSL/TLS certificate to use for your custom domain.
Default: Amplify uses the default certificate that it provisions and manages for you
domainNameoptionalstringdomain_nameoptionalstrdomainNameoptionalStringDomainNameoptionalstringDomainNameoptional*string #The name of the domain.
Default: the construct's id
enableAutoSubdomainoptionalbooleanenable_auto_subdomainoptionalboolenableAutoSubdomainoptionalBooleanEnableAutoSubdomainoptionalboolEnableAutoSubdomainoptional*bool = false #Automatically create subdomains for connected branches.