ParameterMapping

class aws_cdk.aws_apigatewayv2.ParameterMapping

Bases: object

(experimental) Represents a Parameter Mapping.

Stability:

experimental

ExampleMetadata:

infused

Example:

from aws_cdk.aws_apigatewayv2_integrations import HttpAlbIntegration

# lb: elbv2.ApplicationLoadBalancer

listener = lb.add_listener("listener", port=80)
listener.add_targets("target",
    port=80
)

http_endpoint = apigwv2.HttpApi(self, "HttpProxyPrivateApi",
    default_integration=HttpAlbIntegration("DefaultIntegration", listener,
        parameter_mapping=apigwv2.ParameterMapping().append_header("header2", apigwv2.MappingValue.request_header("header1")).remove_header("header1")
    )
)
Stability:

experimental

Methods

append_header(name, value)

(experimental) Creates a mapping to append a header.

Parameters:
Stability:

experimental

Return type:

ParameterMapping

append_query_string(name, value)

(experimental) Creates a mapping to append a query string.

Parameters:
Stability:

experimental

Return type:

ParameterMapping

custom(key, value)

(experimental) Creates a custom mapping.

Parameters:
  • key (str)

  • value (str)

Stability:

experimental

Return type:

ParameterMapping

overwrite_header(name, value)

(experimental) Creates a mapping to overwrite a header.

Parameters:
Stability:

experimental

Return type:

ParameterMapping

overwrite_path(value)

(experimental) Creates a mapping to overwrite a path.

Parameters:

value (MappingValue)

Stability:

experimental

Return type:

ParameterMapping

overwrite_query_string(name, value)

(experimental) Creates a mapping to overwrite a querystring.

Parameters:
Stability:

experimental

Return type:

ParameterMapping

remove_header(name)

(experimental) Creates a mapping to remove a header.

Parameters:

name (str)

Stability:

experimental

Return type:

ParameterMapping

remove_query_string(name)

(experimental) Creates a mapping to remove a querystring.

Parameters:

name (str)

Stability:

experimental

Return type:

ParameterMapping

Attributes

mappings

(experimental) Represents all created parameter mappings.

Stability:

experimental

Static Methods

classmethod from_object(obj)

(experimental) Creates a mapping from an object.

Parameters:

obj (Mapping[str, MappingValue])

Stability:

experimental

Return type:

ParameterMapping