All Implemented Interfaces:
IConstruct, IDependable, IResource,, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:42.134Z") @Stability(Experimental) public class Domain extends Resource
(experimental) An Amplify Console domain.


 App amplifyApp;
 Branch master;
 Branch dev;
 Domain domain = amplifyApp.addDomain("", DomainOptions.builder()
         .enableAutoSubdomain(true) // in case subdomains should be auto registered for branches
         .autoSubdomainCreationPatterns(List.of("*", "pr*"))
 domain.mapRoot(master); // map master branch to domain root
 domain.mapSubDomain(master, "www");
  • Constructor Details

    • Domain

      protected Domain( objRef)
    • Domain

      protected Domain( initializationMode)
    • Domain

      @Stability(Experimental) public Domain(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DomainProps props)
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • mapRoot

      @Stability(Experimental) @NotNull public Domain mapRoot(@NotNull IBranch branch)
      (experimental) Maps a branch to the domain root.

      branch - This parameter is required.
    • mapSubDomain

      @Stability(Experimental) @NotNull public Domain mapSubDomain(@NotNull IBranch branch, @Nullable String prefix)
      (experimental) Maps a branch to a sub domain.

      branch - The branch. This parameter is required.
      prefix - The prefix.
    • mapSubDomain

      @Stability(Experimental) @NotNull public Domain mapSubDomain(@NotNull IBranch branch)
      (experimental) Maps a branch to a sub domain.

      branch - The branch. This parameter is required.
    • validate

      @Stability(Experimental) @NotNull protected List<String> validate()
      (experimental) Validate the current construct.

      This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.

      validate in class Construct
      An array of validation error messages, or an empty array if the construct is valid.
    • getArn

      @Stability(Experimental) @NotNull public String getArn()
      (experimental) The ARN of the domain.
    • getCertificateRecord

      @Stability(Experimental) @NotNull public String getCertificateRecord()
      (experimental) The DNS Record for certificate verification.
    • getDomainAutoSubDomainCreationPatterns

      @Stability(Experimental) @NotNull public List<String> getDomainAutoSubDomainCreationPatterns()
      (experimental) Branch patterns for the automatically created subdomain.
    • getDomainAutoSubDomainIamRole

      @Stability(Experimental) @NotNull public String getDomainAutoSubDomainIamRole()
      (experimental) The IAM service role for the subdomain.
    • getDomainEnableAutoSubDomain

      @Stability(Experimental) @NotNull public IResolvable getDomainEnableAutoSubDomain()
      (experimental) Specifies whether the automated creation of subdomains for branches is enabled.
    • getDomainName

      @Stability(Experimental) @NotNull public String getDomainName()
      (experimental) The name of the domain.
    • getDomainStatus

      @Stability(Experimental) @NotNull public String getDomainStatus()
      (experimental) The status of the domain association.
    • getStatusReason

      @Stability(Experimental) @NotNull public String getStatusReason()
      (experimental) The reason for the current status of the domain.