@aws-cdk_aws-apigatewayv2-alpha.ParameterMapping

class ParameterMapping ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Apigatewayv2.Alpha.ParameterMapping
Gogithub.com/aws/aws-cdk-go/awscdkapigatewayv2alpha/v2#ParameterMapping
Javasoftware.amazon.awscdk.services.apigatewayv2.alpha.ParameterMapping
Pythonaws_cdk.aws_apigatewayv2_alpha.ParameterMapping
TypeScript (source)@aws-cdk/aws-apigatewayv2-alpha ยป ParameterMapping

Represents a Parameter Mapping.

Example

import { HttpAlbIntegration } from '@aws-cdk/aws-apigatewayv2-integrations-alpha';

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

new ParameterMapping()

Properties

NameTypeDescription
mappings๐Ÿ”น{ [string]: string }Represents all created parameter mappings.

mappings๐Ÿ”น

Type: { [string]: string }

Represents all created parameter mappings.

Methods

NameDescription
appendHeader(name, value)๐Ÿ”นCreates a mapping to append a header.
appendQueryString(name, value)๐Ÿ”นCreates a mapping to append a query string.
custom(key, value)๐Ÿ”นCreates a custom mapping.
overwriteHeader(name, value)๐Ÿ”นCreates a mapping to overwrite a header.
overwritePath(value)๐Ÿ”นCreates a mapping to overwrite a path.
overwriteQueryString(name, value)๐Ÿ”นCreates a mapping to overwrite a querystring.
removeHeader(name)๐Ÿ”นCreates a mapping to remove a header.
removeQueryString(name)๐Ÿ”นCreates a mapping to remove a querystring.
static fromObject(obj)๐Ÿ”นCreates a mapping from an object.

appendHeader(name, value)๐Ÿ”น

public appendHeader(name: string, value: MappingValue): ParameterMapping

Parameters

  • name string
  • value MappingValue

Returns

  • ParameterMapping

Creates a mapping to append a header.


appendQueryString(name, value)๐Ÿ”น

public appendQueryString(name: string, value: MappingValue): ParameterMapping

Parameters

  • name string
  • value MappingValue

Returns

  • ParameterMapping

Creates a mapping to append a query string.


custom(key, value)๐Ÿ”น

public custom(key: string, value: string): ParameterMapping

Parameters

  • key string
  • value string

Returns

  • ParameterMapping

Creates a custom mapping.


overwriteHeader(name, value)๐Ÿ”น

public overwriteHeader(name: string, value: MappingValue): ParameterMapping

Parameters

  • name string
  • value MappingValue

Returns

  • ParameterMapping

Creates a mapping to overwrite a header.


overwritePath(value)๐Ÿ”น

public overwritePath(value: MappingValue): ParameterMapping

Parameters

  • value MappingValue

Returns

  • ParameterMapping

Creates a mapping to overwrite a path.


overwriteQueryString(name, value)๐Ÿ”น

public overwriteQueryString(name: string, value: MappingValue): ParameterMapping

Parameters

  • name string
  • value MappingValue

Returns

  • ParameterMapping

Creates a mapping to overwrite a querystring.


removeHeader(name)๐Ÿ”น

public removeHeader(name: string): ParameterMapping

Parameters

  • name string

Returns

  • ParameterMapping

Creates a mapping to remove a header.


removeQueryString(name)๐Ÿ”น

public removeQueryString(name: string): ParameterMapping

Parameters

  • name string

Returns

  • ParameterMapping

Creates a mapping to remove a querystring.


static fromObject(obj)๐Ÿ”น

public static fromObject(obj: { [string]: MappingValue }): ParameterMapping

Parameters

  • obj { [string]: MappingValue }

Returns

  • ParameterMapping

Creates a mapping from an object.