Class MappingValue

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.apigatewayv2.MappingValue
All Implemented Interfaces:
IMappingValue, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-08-02T00:29:06.019Z") @Stability(Stable) public class MappingValue extends software.amazon.jsii.JsiiObject implements IMappingValue
Represents a Mapping Value.

Example:

 import software.amazon.awscdk.aws_apigatewayv2_integrations.HttpAlbIntegration;
 ApplicationLoadBalancer lb;
 ApplicationListener listener = lb.addListener("listener", BaseApplicationListenerProps.builder().port(80).build());
 listener.addTargets("target", AddApplicationTargetsProps.builder()
         .port(80)
         .build());
 HttpApi httpEndpoint = HttpApi.Builder.create(this, "HttpProxyPrivateApi")
         .defaultIntegration(HttpAlbIntegration.Builder.create("DefaultIntegration", listener)
                 .parameterMapping(new ParameterMapping().appendHeader("header2", MappingValue.requestHeader("header1")).removeHeader("header1"))
                 .build())
         .build();
 
  • Field Details

    • NONE

      @Stability(Stable) public static final MappingValue NONE
      Creates an empty mapping value.
  • Constructor Details

    • MappingValue

      protected MappingValue(software.amazon.jsii.JsiiObjectRef objRef)
    • MappingValue

      protected MappingValue(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • MappingValue

      @Stability(Stable) protected MappingValue(@NotNull String value)
      Parameters:
      value - Represents a Mapping Value. This parameter is required.
  • Method Details

    • contextVariable

      @Stability(Stable) @NotNull public static MappingValue contextVariable(@NotNull String variableName)
      Creates a context variable mapping value.

      Parameters:
      variableName - This parameter is required.
    • custom

      @Stability(Stable) @NotNull public static MappingValue custom(@NotNull String value)
      Creates a custom mapping value.

      Parameters:
      value - This parameter is required.
    • requestBody

      @Stability(Stable) @NotNull public static MappingValue requestBody(@NotNull String name)
      Creates a request body mapping value.

      Parameters:
      name - This parameter is required.
    • requestHeader

      @Stability(Stable) @NotNull public static MappingValue requestHeader(@NotNull String name)
      Creates a header mapping value.

      Parameters:
      name - This parameter is required.
    • requestPath

      @Stability(Stable) @NotNull public static MappingValue requestPath()
      Creates a request path mapping value.
    • requestPathParam

      @Stability(Stable) @NotNull public static MappingValue requestPathParam(@NotNull String name)
      Creates a request path parameter mapping value.

      Parameters:
      name - This parameter is required.
    • requestQueryString

      @Stability(Stable) @NotNull public static MappingValue requestQueryString(@NotNull String name)
      Creates a query string mapping value.

      Parameters:
      name - This parameter is required.
    • stageVariable

      @Stability(Stable) @NotNull public static MappingValue stageVariable(@NotNull String variableName)
      Creates a stage variable mapping value.

      Parameters:
      variableName - This parameter is required.
    • getValue

      @Stability(Stable) @NotNull public String getValue()
      Represents a Mapping Value.
      Specified by:
      getValue in interface IMappingValue