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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:43.241Z") @Stability(Experimental) public class DomainName extends Resource implements IDomainName
(experimental) Custom domain resource for the API.


 Function handler;
 String certArn = "arn:aws:acm:us-east-1:111111111111:certificate";
 String domainName = "";
 DomainName dn = DomainName.Builder.create(this, "DN")
         .certificate(Certificate.fromCertificateArn(this, "cert", certArn))
 HttpApi api = HttpApi.Builder.create(this, "HttpProxyProdApi")
         .defaultIntegration(new HttpLambdaIntegration("DefaultIntegration", handler))
         // https://${dn.domainName}/foo goes to prodApi $default stage
  • Constructor Details

    • DomainName

      protected DomainName( objRef)
    • DomainName

      protected DomainName( initializationMode)
    • DomainName

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

    • fromDomainNameAttributes

      @Stability(Experimental) @NotNull public static IDomainName fromDomainNameAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DomainNameAttributes attrs)
      (experimental) Import from attributes.

      scope - This parameter is required.
      id - This parameter is required.
      attrs - This parameter is required.
    • addEndpoint

      @Stability(Experimental) public void addEndpoint(@NotNull EndpointOptions options)
      (experimental) Adds an endpoint to a domain name.

      options - domain name endpoint properties to be set. This parameter is required.
    • getName

      @Stability(Experimental) @NotNull public String getName()
      (experimental) The custom domain name.
      Specified by:
      getName in interface IDomainName
    • getRegionalDomainName

      @Stability(Experimental) @NotNull public String getRegionalDomainName()
      (experimental) The domain name associated with the regional endpoint for this custom domain name.
      Specified by:
      getRegionalDomainName in interface IDomainName
    • getRegionalHostedZoneId

      @Stability(Experimental) @NotNull public String getRegionalHostedZoneId()
      (experimental) The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint.
      Specified by:
      getRegionalHostedZoneId in interface IDomainName