# ParameterMapping

Represents a Parameter Mapping.

- 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#L73)
- 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'),
  }),
});
```

## Initializer

```ts
new ParameterMapping()
```

## Properties

- `mappings`: { [key: string]: string } — Represents all created parameter mappings.

## Methods

- `appendHeader(name: string, value: MappingValue): ParameterMapping // chainable` — Creates a mapping to append a header.

- `appendQueryString(name: string, value: MappingValue): ParameterMapping // chainable` — Creates a mapping to append a query string.

- `custom(key: string, value: string): ParameterMapping // chainable` — Creates a custom mapping.

- `fromObject(obj: { [key: string]: MappingValue }): ParameterMapping // chainable` (static) — Creates a mapping from an object.

- `overwriteHeader(name: string, value: MappingValue): ParameterMapping // chainable` — Creates a mapping to overwrite a header.

- `overwritePath(value: MappingValue): ParameterMapping // chainable` — Creates a mapping to overwrite a path.

- `overwriteQueryString(name: string, value: MappingValue): ParameterMapping // chainable` — Creates a mapping to overwrite a querystring.

- `removeHeader(name: string): ParameterMapping // chainable` — Creates a mapping to remove a header.

- `removeQueryString(name: string): ParameterMapping // chainable` — Creates a mapping to remove a querystring.
