java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.amplify.Domain
All Implemented Interfaces:
IConstruct, IDependable, IResource, software.amazon.jsii.JsiiSerializable, 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.

Example:

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

    • Domain

      protected Domain(software.amazon.jsii.JsiiObjectRef objRef)
    • Domain

      protected Domain(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • Domain

      @Stability(Experimental) public Domain(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DomainProps props)
      Parameters:
      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.

      Parameters:
      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.

      Parameters:
      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.

      Parameters:
      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.

      Overrides:
      validate in class Construct
      Returns:
      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.