BasePathMappingOptions

class aws_cdk.aws_apigateway.BasePathMappingOptions(*, base_path=None, stage=None)

Bases: object

Parameters:
  • base_path (Optional[str]) – 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.

  • stage (Optional[Stage]) – The Deployment stage of API [disable-awslint:ref-via-interface]. Default: - map to deploymentStage of restApi otherwise stage needs to pass in URL

ExampleMetadata:

infused

Example:

# domain: apigateway.DomainName
# api1: apigateway.RestApi
# api2: apigateway.RestApi


domain.add_base_path_mapping(api1, base_path="go-to-api1")
domain.add_base_path_mapping(api2, base_path="boom")

Attributes

base_path

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.

stage

ref-via-interface].

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

Type:

The Deployment stage of API [disable-awslint