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

Example:

 import software.amazon.awscdk.services.certificatemanager.*;
 import software.amazon.awscdk.services.apigatewayv2.integrations.HttpLambdaIntegration;
 Function handler;
 String certArn = "arn:aws:acm:us-east-1:111111111111:certificate";
 String domainName = "example.com";
 DomainName dn = DomainName.Builder.create(this, "DN")
         .domainName(domainName)
         .certificate(Certificate.fromCertificateArn(this, "cert", certArn))
         .build();
 HttpApi api = HttpApi.Builder.create(this, "HttpProxyProdApi")
         .defaultIntegration(new HttpLambdaIntegration("DefaultIntegration", handler))
         // https://${dn.domainName}/foo goes to prodApi $default stage
         .defaultDomainMapping(DomainMappingOptions.builder()
                 .domainName(dn)
                 .mappingKey("foo")
                 .build())
         .build();
 
  • Constructor Details

    • DomainName

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

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

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

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

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