GatewayResponse

class aws_cdk.aws_apigateway.GatewayResponse(scope, id, *, rest_api, type, response_headers=None, status_code=None, templates=None)

Bases: aws_cdk.core.Resource

Configure the response received by clients, produced from the API Gateway backend.

resource: :resource:: AWS::ApiGateway::GatewayResponse

__init__(scope, id, *, rest_api, type, response_headers=None, status_code=None, templates=None)
Parameters
  • scope (Construct) –

  • id (str) –

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

  • 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

Methods

to_string()

Returns a string representation of this construct.

Return type

str

Attributes

node

The construct tree node associated with this construct.

Return type

ConstructNode

stack

The stack in which this resource is defined.

Return type

Stack

Static Methods

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool