AWS::ApiGateway::Method MethodResponse
MethodResponse
is a property of the AWS::ApiGateway::Method resource that defines the responses that can be sent to the client that calls a method.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "ResponseModels" :
{
, "ResponseParameters" :Key
:Value
, ...}{
, "StatusCode" :Key
:Value
, ...}String
}
YAML
ResponseModels:
ResponseParameters:
Key
:Value
StatusCode:
Key
:Value
String
Properties
ResponseModels
-
The resources used for the response's content type. Specify response models as key-value pairs (string-to-string maps), with a content type as the key and a Model resource name as the value.
Required: No
Type: Map of String
Update requires: No interruption
ResponseParameters
-
Response parameters that API Gateway sends to the client that called a method. Specify response parameters as key-value pairs (string-to-Boolean maps), with a destination as the key and a Boolean as the value. Specify the destination using the following pattern:
method.response.header.name
, where name is a valid, unique header name. The Boolean specifies whether a parameter is required.Required: No
Type: Map of Boolean
Update requires: No interruption
StatusCode
-
The method response's status code, which you map to an IntegrationResponse.
Required: Yes
Type: String
Update requires: No interruption
See also
-
Method in the Amazon API Gateway REST API Reference