Interface ApiMappingOptions

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

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:11.754Z") @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