java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.amplify.alpha.Domain
All Implemented Interfaces:
IResource, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-25T14:21:25.599Z") @Stability(Experimental) public class Domain extends Resource
(experimental) An Amplify Console domain.

Example:

 App amplifyApp;
 Branch main;
 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(main); // map main branch to domain root
 domain.mapSubDomain(main, "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.
    • 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.