

# x-amazon-apigateway-gateway-responses.responseParameters 对象
<a name="api-gateway-swagger-extensions-gateway-responses.responseParameters"></a>

定义键/值对的字符串到字符串映射，从传入请求参数或使用文本字符串生成网关响应参数。仅支持用于 REST API 。


| 属性名称 | 类型 | 说明 | 
| --- | --- | --- | 
| gatewayresponse.param-position.param-name | string |  `param-position` 可以是 `header`、`path` 或 `querystring`。有关更多信息，请参阅 [API Gateway 中 REST API 的参数映射](rest-api-parameter-mapping.md)。  | 

## x-amazon-apigateway-gateway-responses.responseParameters 示例
<a name="api-gateway-swagger-extensions-gateway-responses.responseParameters-example"></a>

 以下 OpenAPI 扩展示例显示了一个 [GatewayResponse](https://docs.aws.amazon.com/apigateway/latest/api/API_GatewayResponse.html) 响应参数映射表达式，可用于为 `*.example.domain` 域中的资源启用 CORS 支持。

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