# MappingValue

Represents a Mapping Value.

Extends: MappingValue
Implements: IMappingValue

- Source: [`aws-apigatewayv2/lib/parameter-mapping.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-apigatewayv2/lib/parameter-mapping.ts#L14)
- Type last changed: v2.112.0 · 1 Dec 2023

## Example

```ts
import { HttpAlbIntegration } from 'aws-cdk-lib/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'),
  }),
});
```

## Properties

- `NONE`: [MappingValue](/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.MappingValue.html) (static) — Creates an empty mapping value.

- `value`: string — Represents a Mapping Value.

## Methods

- `contextVariable(variableName: string): MappingValue // chainable` (static) — Creates a context variable mapping value.

- `custom(value: string): MappingValue // chainable` (static) — Creates a custom mapping value.

- `requestBody(name: string): MappingValue // chainable` (static) — Creates a request body mapping value.

- `requestHeader(name: string): MappingValue // chainable` (static) — Creates a header mapping value.

- `requestPath(): MappingValue // chainable` (static) — Creates a request path mapping value.

- `requestPathParam(name: string): MappingValue // chainable` (static) — Creates a request path parameter mapping value.

- `requestQueryString(name: string): MappingValue // chainable` (static) — Creates a query string mapping value.

- `stageVariable(variableName: string): MappingValue // chainable` (static) — Creates a stage variable mapping value.
