Menu
Amazon API Gateway
Developer Guide

x-amazon-apigateway-gateway-responses.responseParameters Object

Defines a string-to-string map of key-value pairs to generate gateway response parameters from the incoming request parameters or using literal strings.

Properties

Property Name Type Description
gatewayresponse.param-position.param-name string

param-position can be header, path or querystring. For more information, see Map Method Request Data to Integration Request Parameters.

x-amazon-apigateway-gateway-responses.repsonseParameters Example

The following Swagger extensions example shows a GatewayResponse response parameter mapping expression to enable CORS support for resources on the *.example.domain domains.

Copy
"responseParameters": { "gatewayresponse.header.Access-Control-Allow-Origin": '*.example.domain', "gatewayresponse.header.from-request-header" : method.request.header.Accept, "gatewayresponse.header.from-request-path" : method.request.path.petId, "gatewayresponse.header.from-request-query" : method.request.querystring.qname }