Class BasePathMapping.Builder

java.lang.Object
software.amazon.awscdk.services.apigateway.BasePathMapping.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<BasePathMapping>
Enclosing class:
BasePathMapping

@Stability(Stable) public static final class BasePathMapping.Builder extends Object implements software.amazon.jsii.Builder<BasePathMapping>
A fluent builder for BasePathMapping.
  • Method Details

    • create

      @Stability(Stable) public static BasePathMapping.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of BasePathMapping.Builder.
    • attachToStage

      @Stability(Stable) public BasePathMapping.Builder attachToStage(Boolean attachToStage)
      Whether to attach the base path mapping to a stage.

      Use this property to create a base path mapping without attaching it to the Rest API default stage. This property is ignored if stage is provided.

      Default: - true

      Parameters:
      attachToStage - Whether to attach the base path mapping to a stage. This parameter is required.
      Returns:
      this
    • basePath

      @Stability(Stable) public BasePathMapping.Builder basePath(String basePath)
      The base 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.

      Default: - map requests from the domain root (e.g. `example.com`). If this is undefined, no additional mappings will be allowed on this domain name.

      Parameters:
      basePath - The base 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. This parameter is required.
      Returns:
      this
    • stage

      @Stability(Stable) public BasePathMapping.Builder stage(Stage stage)
      The Deployment stage of API [disable-awslint:ref-via-interface].

      Default: - map to deploymentStage of restApi otherwise stage needs to pass in URL

      Parameters:
      stage - The Deployment stage of API [disable-awslint:ref-via-interface]. This parameter is required.
      Returns:
      this
    • domainName

      @Stability(Stable) public BasePathMapping.Builder domainName(IDomainName domainName)
      The DomainName to associate with this base path mapping.

      Parameters:
      domainName - The DomainName to associate with this base path mapping. This parameter is required.
      Returns:
      this
    • restApi

      @Stability(Stable) public BasePathMapping.Builder restApi(IRestApi restApi)
      The RestApi resource to target.

      Parameters:
      restApi - The RestApi resource to target. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public BasePathMapping build()
      Specified by:
      build in interface software.amazon.jsii.Builder<BasePathMapping>
      Returns:
      a newly built instance of BasePathMapping.