x-amazon-apigateway-gateway-responses.responseParameters object - Amazon API Gateway
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User 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. Supported only for REST APIs.

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

param-position can be header, path, or querystring. For more information, see Parameter mapping for REST APIs in API Gateway.

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

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

"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 }