本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
x-amazon-apigateway-gateway-responses.responseParameters 物件
定義鍵值對之字串對字串的對應,以從傳入請求參數或使用字串常值產生閘道回應參數。僅支援 REST API。
屬性名稱 | 類型 | 描述 |
---|---|---|
gatewayresponse. |
string |
|
x-amazon-apigateway-gateway-responses.responseParameters 範例
下列 OpenAPI 延伸範例示範 GatewayResponse 回應參數對應運算式,以允許 *.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 }