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 (IApiRef) – The Api to which this mapping is applied.

  • domain_name (IDomainNameRef) – 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
from aws_cdk.interfaces import aws_apigatewayv2 as interfaces_apigatewayv2

# api_ref: interfaces_apigatewayv2.IApiRef
# domain_name_ref: interfaces_apigatewayv2.IDomainNameRef
# stage: apigatewayv2.IStage

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

    # 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