AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

ApiMapping

Create a new API mapping for API Gateway API endpoint.

Import

import { ApiMapping } from 'aws-cdk-lib/aws-apigatewayv2';

Or use the module namespace:

import * as apigatewayv2 from 'aws-cdk-lib/aws-apigatewayv2';
// apigatewayv2.ApiMapping

Properties

Configuration passed to the constructor as ApiMappingProps.

apiRequired
IApiRef

The Api to which this mapping is applied.

domainNameRequired
IDomainNameRef

custom domain name of the mapping target.

apiMappingKeyOptional
string

Api mapping key. The path where this stage should be mapped to on the domain

Default: - undefined for the root path mapping.

stageOptional
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

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter