CfnGatewayResponseProps

class aws_cdk.aws_apigateway.CfnGatewayResponseProps(*, response_type, rest_api_id, response_parameters=None, response_templates=None, status_code=None)

Bases: object

Properties for defining a CfnGatewayResponse.

Parameters
  • response_type (str) – The response type. For valid values, see GatewayResponse in the API Gateway API Reference .

  • rest_api_id (str) – The identifier of the API.

  • response_parameters (Union[IResolvable, Mapping[str, str], None]) – The response parameters (paths, query strings, and headers) for the response. Duplicates not allowed.

  • response_templates (Union[IResolvable, Mapping[str, str], None]) – The response templates for the response. Duplicates not allowed.

  • status_code (Optional[str]) – The HTTP status code for the response.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-gatewayresponse.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_apigateway as apigateway

cfn_gateway_response_props = apigateway.CfnGatewayResponseProps(
    response_type="responseType",
    rest_api_id="restApiId",

    # the properties below are optional
    response_parameters={
        "response_parameters_key": "responseParameters"
    },
    response_templates={
        "response_templates_key": "responseTemplates"
    },
    status_code="statusCode"
)

Attributes

response_parameters

The response parameters (paths, query strings, and headers) for the response.

Duplicates not allowed.

Link

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

Return type

Union[IResolvable, Mapping[str, str], None]

response_templates

The response templates for the response.

Duplicates not allowed.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-gatewayresponse.html#cfn-apigateway-gatewayresponse-responsetemplates

Return type

Union[IResolvable, Mapping[str, str], None]

response_type

The response type.

For valid values, see GatewayResponse in the API Gateway API Reference .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-gatewayresponse.html#cfn-apigateway-gatewayresponse-responsetype

Return type

str

rest_api_id

The identifier of the API.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-gatewayresponse.html#cfn-apigateway-gatewayresponse-restapiid

Return type

str

status_code

The HTTP status code for the response.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-gatewayresponse.html#cfn-apigateway-gatewayresponse-statuscode

Return type

Optional[str]