MappingValue

class aws_cdk.aws_apigatewayv2.MappingValue(value)

Bases: object

Represents a Mapping Value.

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) – Represents a Mapping Value.

Attributes

NONE = <aws_cdk.aws_apigatewayv2.MappingValue object>
value

Represents a Mapping Value.

Static Methods

classmethod context_variable(variable_name)

Creates a context variable mapping value.

Parameters:

variable_name (str) –

Return type:

MappingValue

classmethod custom(value)

Creates a custom mapping value.

Parameters:

value (str) –

Return type:

MappingValue

classmethod request_body(name)

Creates a request body mapping value.

Parameters:

name (str) –

Return type:

MappingValue

classmethod request_header(name)

Creates a header mapping value.

Parameters:

name (str) –

Return type:

MappingValue

classmethod request_path()

Creates a request path mapping value.

Return type:

MappingValue

classmethod request_path_param(name)

Creates a request path parameter mapping value.

Parameters:

name (str) –

Return type:

MappingValue

classmethod request_query_string(name)

Creates a query string mapping value.

Parameters:

name (str) –

Return type:

MappingValue

classmethod stage_variable(variable_name)

Creates a stage variable mapping value.

Parameters:

variable_name (str) –

Return type:

MappingValue