MappingValue

class aws_cdk.aws_apigatewayv2.MappingValue(value)

Bases: object

(experimental) Represents a Mapping Value.

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")
    )
)
Parameters:

value (str) –

Stability:

experimental

Attributes

NONE = <aws_cdk.aws_apigatewayv2.MappingValue object>
value

(experimental) Represents a Mapping Value.

Stability:

experimental

Static Methods

classmethod context_variable(variable_name)

(experimental) Creates a context variable mapping value.

Parameters:

variable_name (str) –

Stability:

experimental

Return type:

MappingValue

classmethod custom(value)

(experimental) Creates a custom mapping value.

Parameters:

value (str) –

Stability:

experimental

Return type:

MappingValue

classmethod request_body(name)

(experimental) Creates a request body mapping value.

Parameters:

name (str) –

Stability:

experimental

Return type:

MappingValue

classmethod request_header(name)

(experimental) Creates a header mapping value.

Parameters:

name (str) –

Stability:

experimental

Return type:

MappingValue

classmethod request_path()

(experimental) Creates a request path mapping value.

Stability:

experimental

Return type:

MappingValue

classmethod request_path_param(name)

(experimental) Creates a request path parameter mapping value.

Parameters:

name (str) –

Stability:

experimental

Return type:

MappingValue

classmethod request_query_string(name)

(experimental) Creates a query string mapping value.

Parameters:

name (str) –

Stability:

experimental

Return type:

MappingValue

classmethod stage_variable(variable_name)

(experimental) Creates a stage variable mapping value.

Parameters:

variable_name (str) –

Stability:

experimental

Return type:

MappingValue