GatewayResponseOptions

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

Bases: object

__init__(*, type, response_headers=None, status_code=None, templates=None)

Options to add 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.

Return type

None

Attributes

response_headers

Custom headers parameters for response.

default :default: - no headers

Return type

Optional[Mapping[str, str]]

status_code

Http status code for response.

default :default: - standard http status code for the response type.

Return type

Optional[str]

templates

Custom templates to get mapped as response.

default :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 :see: https://docs.aws.amazon.com/apigateway/latest/developerguide/supported-gateway-response-types.html

Return type

ResponseType