GatewayResponseProps

class aws_cdk.aws_apigateway.GatewayResponseProps(*, type, response_headers=None, status_code=None, templates=None, rest_api)

Bases: aws_cdk.aws_apigateway.GatewayResponseOptions

Properties for a new gateway response.

Parameters
  • type (ResponseType) – Response type to associate with gateway response.

  • response_headers (Optional[Mapping[str, str]]) – Custom headers parameters for response. Default: - no headers

  • status_code (Optional[str]) – Http status code for response. Default: - standard http status code for the response type.

  • templates (Optional[Mapping[str, str]]) – Custom templates to get mapped as response. Default: - Response from api will be returned without applying any transformation.

  • rest_api (IRestApi) – Rest api resource to target.

Attributes

response_headers

Custom headers parameters for response.

Default
  • no headers

Return type

Optional[Mapping[str, str]]

rest_api

Rest api resource to target.

Return type

IRestApi

status_code

Http status code for response.

Default
  • standard http status code for the response type.

Return type

Optional[str]

templates

Custom templates to get mapped as response.

Default
  • Response from api will be returned without applying any transformation.

Return type

Optional[Mapping[str, str]]

type

Response type to associate with gateway response.

See

https://docs.aws.amazon.com/apigateway/latest/developerguide/supported-gateway-response-types.html

Return type

ResponseType