DomainOptions

class aws_cdk.aws_amplify_alpha.DomainOptions(*, auto_subdomain_creation_patterns=None, custom_certificate=None, domain_name=None, enable_auto_subdomain=None, sub_domains=None)

Bases: object

(experimental) Options to add a domain to an application.

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

  • custom_certificate (Optional[ICertificate]) – (experimental) 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

  • 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

Stability:

experimental

ExampleMetadata:

infused

Example:

# amplify_app: amplify.App
# main: amplify.Branch
# dev: amplify.Branch


domain = amplify_app.add_domain("example.com",
    enable_auto_subdomain=True,  # in case subdomains should be auto registered for branches
    auto_subdomain_creation_patterns=["*", "pr*"]
)
domain.map_root(main) # map main branch to domain root
domain.map_sub_domain(main, "www")
domain.map_sub_domain(dev)

Attributes

auto_subdomain_creation_patterns

(experimental) Branches which should automatically create subdomains.

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

Stability:

experimental

custom_certificate

(experimental) 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

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