DomainProps

class aws_cdk.aws_amplify.DomainProps(*, auto_subdomain_creation_patterns=None, domain_name=None, enable_auto_subdomain=None, sub_domains=None, app, auto_sub_domain_iam_role=None)

Bases: DomainOptions

(experimental) Properties for a Domain.

Parameters:
  • auto_subdomain_creation_patterns (Optional[Sequence[str]]) – (experimental) Branches which should automatically create subdomains. Default: - all repository branches [‘*’, ‘pr*’]

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

  • enable_auto_subdomain (Optional[bool]) – (experimental) Automatically create subdomains for connected branches. Default: false

  • sub_domains (Optional[Sequence[Union[SubDomain, Dict[str, Any]]]]) – (experimental) Subdomains. Default: - use addSubDomain() to add subdomains

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

  • auto_sub_domain_iam_role (Optional[IRole]) – (experimental) The IAM role with access to Route53 when using enableAutoSubdomain. Default: the IAM role from App.grantPrincipal

Stability:

experimental

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_amplify as amplify
import aws_cdk.aws_iam as iam

# app: amplify.App
# branch: amplify.Branch
# role: iam.Role

domain_props = amplify.DomainProps(
    app=app,

    # the properties below are optional
    auto_subdomain_creation_patterns=["autoSubdomainCreationPatterns"],
    auto_sub_domain_iam_role=role,
    domain_name="domainName",
    enable_auto_subdomain=False,
    sub_domains=[amplify.SubDomain(
        branch=branch,

        # the properties below are optional
        prefix="prefix"
    )]
)

Attributes

app

(experimental) The application to which the domain must be connected.

Stability:

experimental

auto_sub_domain_iam_role

(experimental) The IAM role with access to Route53 when using enableAutoSubdomain.

Default:

the IAM role from App.grantPrincipal

Stability:

experimental

auto_subdomain_creation_patterns

(experimental) Branches which should automatically create subdomains.

Default:
  • all repository branches [‘*’, ‘pr*’]

Stability:

experimental

domain_name

(experimental) The name of the domain.

Default:
  • the construct’s id

Stability:

experimental

enable_auto_subdomain

(experimental) Automatically create subdomains for connected branches.

Default:

false

Stability:

experimental

sub_domains

(experimental) Subdomains.

Default:
  • use addSubDomain() to add subdomains

Stability:

experimental