CfnRouteResponseProps

class aws_cdk.aws_apigatewayv2.CfnRouteResponseProps(*, api_id, route_id, route_response_key, model_selection_expression=None, response_models=None, response_parameters=None)

Bases: object

Properties for defining a CfnRouteResponse.

Parameters:
  • api_id (str) – The API identifier.

  • route_id (str) – The route ID.

  • route_response_key (str) – The route response key.

  • model_selection_expression (Optional[str]) – The model selection expression for the route response. Supported only for WebSocket APIs.

  • response_models (Optional[Any]) – The response models for the route response.

  • response_parameters (Union[IResolvable, Mapping[str, Union[IResolvable, ParameterConstraintsProperty, Dict[str, Any]]], None]) – The route response parameters.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-routeresponse.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apigatewayv2 as apigatewayv2

# response_models: Any

cfn_route_response_props = apigatewayv2.CfnRouteResponseProps(
    api_id="apiId",
    route_id="routeId",
    route_response_key="routeResponseKey",

    # the properties below are optional
    model_selection_expression="modelSelectionExpression",
    response_models=response_models,
    response_parameters={
        "response_parameters_key": apigatewayv2.CfnRouteResponse.ParameterConstraintsProperty(
            required=False
        )
    }
)

Attributes

api_id

The API identifier.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-routeresponse.html#cfn-apigatewayv2-routeresponse-apiid

model_selection_expression

The model selection expression for the route response.

Supported only for WebSocket APIs.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-routeresponse.html#cfn-apigatewayv2-routeresponse-modelselectionexpression

response_models

The response models for the route response.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-routeresponse.html#cfn-apigatewayv2-routeresponse-responsemodels

response_parameters

The route response parameters.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-routeresponse.html#cfn-apigatewayv2-routeresponse-responseparameters

route_id

The route ID.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-routeresponse.html#cfn-apigatewayv2-routeresponse-routeid

route_response_key

The route response key.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-routeresponse.html#cfn-apigatewayv2-routeresponse-routeresponsekey