@aws-cdk_aws-apigatewayv2-alpha.MappingValue

class MappingValue ๐Ÿ”น

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

Implements IMappingValue

Represents a Mapping Value.

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 (protected)

super(value: string)

Parameters

  • value string โ€” Represents a Mapping Value.

Properties

NameTypeDescription
value๐Ÿ”นstringRepresents a Mapping Value.
static NONE๐Ÿ”นMappingValueCreates an empty mapping value.

value๐Ÿ”น

Type: string

Represents a Mapping Value.


static NONE๐Ÿ”น

Type: MappingValue

Creates an empty mapping value.

Methods

NameDescription
static contextVariable(variableName)๐Ÿ”นCreates a context variable mapping value.
static custom(value)๐Ÿ”นCreates a custom mapping value.
static requestBody(name)๐Ÿ”นCreates a request body mapping value.
static requestHeader(name)๐Ÿ”นCreates a header mapping value.
static requestPath()๐Ÿ”นCreates a request path mapping value.
static requestPathParam(name)๐Ÿ”นCreates a request path parameter mapping value.
static requestQueryString(name)๐Ÿ”นCreates a query string mapping value.
static stageVariable(variableName)๐Ÿ”นCreates a stage variable mapping value.

static contextVariable(variableName)๐Ÿ”น

public static contextVariable(variableName: string): MappingValue

Parameters

  • variableName string

Returns

  • MappingValue

Creates a context variable mapping value.


static custom(value)๐Ÿ”น

public static custom(value: string): MappingValue

Parameters

  • value string

Returns

  • MappingValue

Creates a custom mapping value.


static requestBody(name)๐Ÿ”น

public static requestBody(name: string): MappingValue

Parameters

  • name string

Returns

  • MappingValue

Creates a request body mapping value.


static requestHeader(name)๐Ÿ”น

public static requestHeader(name: string): MappingValue

Parameters

  • name string

Returns

  • MappingValue

Creates a header mapping value.


static requestPath()๐Ÿ”น

public static requestPath(): MappingValue

Returns

  • MappingValue

Creates a request path mapping value.


static requestPathParam(name)๐Ÿ”น

public static requestPathParam(name: string): MappingValue

Parameters

  • name string

Returns

  • MappingValue

Creates a request path parameter mapping value.


static requestQueryString(name)๐Ÿ”น

public static requestQueryString(name: string): MappingValue

Parameters

  • name string

Returns

  • MappingValue

Creates a query string mapping value.


static stageVariable(variableName)๐Ÿ”น

public static stageVariable(variableName: string): MappingValue

Parameters

  • variableName string

Returns

  • MappingValue

Creates a stage variable mapping value.