Class ParameterMapping

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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:23:56.428Z") @Stability(Stable) public class ParameterMapping extends software.amazon.jsii.JsiiObject
Represents a Parameter Mapping.

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();
 
  • Constructor Details

    • ParameterMapping

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

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

      @Stability(Stable) public ParameterMapping()
  • Method Details

    • fromObject

      @Stability(Stable) @NotNull public static ParameterMapping fromObject(@NotNull Map<String,? extends MappingValue> obj)
      Creates a mapping from an object.

      Parameters:
      obj - This parameter is required.
    • appendHeader

      @Stability(Stable) @NotNull public ParameterMapping appendHeader(@NotNull String name, @NotNull MappingValue value)
      Creates a mapping to append a header.

      Parameters:
      name - This parameter is required.
      value - This parameter is required.
    • appendQueryString

      @Stability(Stable) @NotNull public ParameterMapping appendQueryString(@NotNull String name, @NotNull MappingValue value)
      Creates a mapping to append a query string.

      Parameters:
      name - This parameter is required.
      value - This parameter is required.
    • custom

      @Stability(Stable) @NotNull public ParameterMapping custom(@NotNull String key, @NotNull String value)
      Creates a custom mapping.

      Parameters:
      key - This parameter is required.
      value - This parameter is required.
    • overwriteHeader

      @Stability(Stable) @NotNull public ParameterMapping overwriteHeader(@NotNull String name, @NotNull MappingValue value)
      Creates a mapping to overwrite a header.

      Parameters:
      name - This parameter is required.
      value - This parameter is required.
    • overwritePath

      @Stability(Stable) @NotNull public ParameterMapping overwritePath(@NotNull MappingValue value)
      Creates a mapping to overwrite a path.

      Parameters:
      value - This parameter is required.
    • overwriteQueryString

      @Stability(Stable) @NotNull public ParameterMapping overwriteQueryString(@NotNull String name, @NotNull MappingValue value)
      Creates a mapping to overwrite a querystring.

      Parameters:
      name - This parameter is required.
      value - This parameter is required.
    • removeHeader

      @Stability(Stable) @NotNull public ParameterMapping removeHeader(@NotNull String name)
      Creates a mapping to remove a header.

      Parameters:
      name - This parameter is required.
    • removeQueryString

      @Stability(Stable) @NotNull public ParameterMapping removeQueryString(@NotNull String name)
      Creates a mapping to remove a querystring.

      Parameters:
      name - This parameter is required.
    • getMappings

      @Stability(Stable) @NotNull public Map<String,String> getMappings()
      Represents all created parameter mappings.