Menu
AWS CloudFormation
User Guide (API Version 2010-05-15)

Amazon API Gateway Method Integration IntegrationResponse

IntegrationResponse is a property of the Amazon API Gateway Method Integration IntegrationResponse property that specifies the response that Amazon API Gateway (API Gateway) sends after a method's backend finishes processing a request.

Syntax

JSON

Copy
{ "ContentHandling" : String, "ResponseParameters" : { String:String, ... }, "ResponseTemplates" : { String:String, ... }, "SelectionPattern" : String, "StatusCode" : String }

YAML

Copy
ContentHandling: String ResponseParameters: String: String ResponseTemplates: String: String SelectionPattern: String StatusCode: String

Properties

ContentHandling

Specifies how to handle request payload content type conversions. Valid values are:

  • CONVERT_TO_BINARY: Converts a request payload from a base64-encoded string to a binary blob.

  • CONVERT_TO_TEXT: Converts a request payload from a binary blob to a base64-encoded string.

If this property isn't defined, the request payload is passed through from the method request to the integration request without modification.

Required: No

Type: String

Update requires: No interruption

ResponseParameters

The response parameters from the backend response that API Gateway sends to the method response. Specify response parameters as key-value pairs (string-to-string mappings).

Use the destination as the key and the source as the value:

  • The destination must be an existing response parameter in the MethodResponse property.

  • The source must be an existing method request parameter or a static value. You must enclose static values in single quotation marks and pre-encode these values based on the destination specified in the request.

For more information, see API Gateway API Request and Response Parameter-Mapping Reference in the API Gateway Developer Guide.

Required: No

Type: Mapping of key-value pairs

ResponseTemplates

The templates that are used to transform the integration response body. Specify templates as key-value pairs (string-to-string mappings), with a content type as the key and a template as the value. For more information, see API Gateway API Request and Response Payload-Mapping Template Reference in the API Gateway Developer Guide.

Required: No

Type: Mapping of key-value pairs

SelectionPattern

A regular expression that specifies which error strings or status codes from the backend map to the integration response.

Required: No

Type: String

StatusCode

The status code that API Gateway uses to map the integration response to a MethodResponse status code.

Required: Yes

Type: String

On this page: