class MappingValue
| Language | Type name | 
|---|---|
|  .NET | Amazon.CDK.AWS.APIGatewayv2.MappingValue | 
|  Java | software.amazon.awscdk.services.apigatewayv2.MappingValue | 
|  Python | aws_cdk.aws_apigatewayv2.MappingValue | 
|  TypeScript (source) | @aws-cdk/aws-apigatewayv2»MappingValue | 
Implements
IMapping
Represents a Mapping Value.
Example
import { HttpAlbIntegration } from '@aws-cdk/aws-apigatewayv2-integrations';
declare const lb: elbv2.ApplicationLoadBalancer;
const listener = lb.addListener('listener', { port: 80 });
listener.addTargets('target', {
  port: 80,
});
const httpEndpoint = new apigwv2.HttpApi(this, 'HttpProxyPrivateApi', {
  defaultIntegration: new HttpAlbIntegration('DefaultIntegration', listener, {
    parameterMapping: new apigwv2.ParameterMapping()
      .appendHeader('header2', apigwv2.MappingValue.requestHeader('header1'))
      .removeHeader('header1'),
  }),
});
Initializer (protected)
super(value: string)
Parameters
- value string
Properties
| Name | Type | Description | 
|---|---|---|
| value | string | Represents a Mapping Value. | 
| static NONE | Mapping | Creates an empty mapping value. | 
value
Type:
string
Represents a Mapping Value.
static NONE
Type:
Mapping
Creates an empty mapping value.
Methods
| Name | Description | 
|---|---|
| static context | Creates a context variable mapping value. | 
| static custom(value) | Creates a custom mapping value. | 
| static request | Creates a request body mapping value. | 
| static request | Creates a header mapping value. | 
| static request | Creates a request path mapping value. | 
| static request | Creates a request path parameter mapping value. | 
| static request | Creates a query string mapping value. | 
| static stage | Creates a stage variable mapping value. | 
static contextVariable(variableName) 
public static contextVariable(variableName: string): MappingValue
Parameters
- variableName string
Returns
Creates a context variable mapping value.
static custom(value)
public static custom(value: string): MappingValue
Parameters
- value string
Returns
Creates a custom mapping value.
static requestBody(name) 
public static requestBody(name: string): MappingValue
Parameters
- name string
Returns
Creates a request body mapping value.
static requestHeader(name) 
public static requestHeader(name: string): MappingValue
Parameters
- name string
Returns
Creates a header mapping value.
static requestPath() 
public static requestPath(): MappingValue
Returns
Creates a request path mapping value.
static requestPathParam(name)  
public static requestPathParam(name: string): MappingValue
Parameters
- name string
Returns
Creates a request path parameter mapping value.
static requestQueryString(name)  
public static requestQueryString(name: string): MappingValue
Parameters
- name string
Returns
Creates a query string mapping value.
static stageVariable(variableName) 
public static stageVariable(variableName: string): MappingValue
Parameters
- variableName string
Returns
Creates a stage variable mapping value.
