Domain

class aws_cdk.aws_amplify.Domain(scope, id, *, app, domain_name=None, sub_domains=None)

Bases: aws_cdk.core.Resource

(experimental) An Amplify Console domain.

Stability

experimental

Parameters
  • scope (Construct) –

  • id (str) –

  • app (IApp) – (experimental) The application to which the domain must be connected.

  • domain_name (Optional[str]) – (experimental) The name of the domain. Default: - the construct’s id

  • sub_domains (Optional[List[SubDomain]]) – (experimental) Subdomains. Default: - use addSubDomain() to add subdomains

Stability

experimental

Methods

map_root(branch)

(experimental) Maps a branch to the domain root.

Parameters

branch (IBranch) –

Stability

experimental

Return type

Domain

map_sub_domain(branch, prefix=None)

(experimental) Maps a branch to a sub domain.

Parameters
  • branch (IBranch) – The branch.

  • prefix (Optional[str]) – The prefix. Use ‘’ to map to the root of the domain. Defaults to branch name.

Stability

experimental

Return type

Domain

to_string()

Returns a string representation of this construct.

Return type

str

Attributes

arn

(experimental) The ARN of the domain.

Stability

experimental

Attribute

true

Return type

str

certificate_record

(experimental) The DNS Record for certificate verification.

Stability

experimental

Attribute

true

Return type

str

domain_auto_sub_domain_creation_patterns

(experimental) Branch patterns for the automatically created subdomain.

Stability

experimental

Attribute

true

Return type

List[str]

domain_auto_sub_domain_iam_role

(experimental) The IAM service role for the subdomain.

Stability

experimental

Attribute

true

Return type

str

domain_enable_auto_sub_domain

(experimental) Specifies whether the automated creation of subdomains for branches is enabled.

Stability

experimental

Attribute

true

Return type

IResolvable

domain_name

(experimental) The name of the domain.

Stability

experimental

Attribute

true

Return type

str

domain_status

(experimental) The status of the domain association.

Stability

experimental

Attribute

true

Return type

str

env

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.

Return type

ResourceEnvironment

node

The construct tree node associated with this construct.

Return type

ConstructNode

stack

The stack in which this resource is defined.

Return type

Stack

status_reason

(experimental) The reason for the current status of the domain.

Stability

experimental

Attribute

true

Return type

str

Static Methods

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool