ApiMappingProps

class aws_cdk.aws_apigatewayv2.ApiMappingProps(*, api, api_mapping_key=None, domain_name, stage=None)

Bases: object

(experimental) Properties used to create the ApiMapping resource.

Parameters
  • api (IApi) – (experimental) The Api to which this mapping is applied.

  • api_mapping_key (Optional[str]) – (experimental) Api mapping key. The path where this stage should be mapped to on the domain Default: - undefined for the root path mapping.

  • domain_name (IDomainName) – (experimental) custom domain name of the mapping target.

  • stage (Optional[IStage]) – (experimental) stage for the ApiMapping resource required for WebSocket API defaults to default stage of an HTTP API. Default: - Default stage of the passed API for HTTP API, required for WebSocket API

Stability

experimental

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apigatewayv2 as apigatewayv2

# api is of type IApi
# domain_name is of type DomainName
# stage is of type IStage

api_mapping_props = apigatewayv2.ApiMappingProps(
    api=api,
    domain_name=domain_name,

    # the properties below are optional
    api_mapping_key="apiMappingKey",
    stage=stage
)

Attributes

api

(experimental) The Api to which this mapping is applied.

Stability

experimental

Return type

IApi

api_mapping_key

(experimental) Api mapping key.

The path where this stage should be mapped to on the domain

Default
  • undefined for the root path mapping.

Stability

experimental

Return type

Optional[str]

domain_name

(experimental) custom domain name of the mapping target.

Stability

experimental

Return type

IDomainName

stage

(experimental) stage for the ApiMapping resource required for WebSocket API defaults to default stage of an HTTP API.

Default
  • Default stage of the passed API for HTTP API, required for WebSocket API

Stability

experimental

Return type

Optional[IStage]