Interface ApiMappingOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
ApiMappingOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-06T23:25:03.376Z") @Stability(Stable) public interface ApiMappingOptions extends software.amazon.jsii.JsiiSerializable
Options for creating an api mapping.

Example:

 Object acmCertificateForExampleCom;
 RestApi restApi;
 RestApi secondRestApi;
 DomainName domain = DomainName.Builder.create(this, "custom-domain")
         .domainName("example.com")
         .certificate(acmCertificateForExampleCom)
         .mapping(restApi)
         .build();
 domain.addApiMapping(secondRestApi.getDeploymentStage(), ApiMappingOptions.builder()
         .basePath("orders/v2/api")
         .build());
 
  • Method Details

    • getBasePath

      @Stability(Stable) @Nullable default String getBasePath()
      The api path name that callers of the API must provide in the URL after the domain name (e.g. example.com/base-path). If you specify this property, it can't be an empty string.

      If this is undefined, a mapping will be added for the empty path. Any request that does not match a mapping will get sent to the API that has been mapped to the empty path.

      Default: - map requests from the domain root (e.g. `example.com`).

    • builder

      @Stability(Stable) static ApiMappingOptions.Builder builder()
      Returns:
      a ApiMappingOptions.Builder of ApiMappingOptions