ApiMappingProps

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

Bases: object

Properties used to create the ApiMapping resource.

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

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

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

  • stage (Optional[IStage]) – 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

ExampleMetadata:

fixture=_generated

Example:

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

# api: apigatewayv2.IApi
# domain_name: apigatewayv2.DomainName
# stage: apigatewayv2.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

The Api to which this mapping is applied.

api_mapping_key

Api mapping key.

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

Default:
  • undefined for the root path mapping.

domain_name

custom domain name of the mapping target.

stage

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