x-amazon-apigateway-gateway-responses.responseParameters オブジェクト - Amazon API Gateway

x-amazon-apigateway-gateway-responses.responseParameters オブジェクト

キーと値のペアの文字列間マップを定義し、ゲートウェイレスポンスパラメータを受信リクエストパラメータから生成するか、リテラル文字列を使用して生成します。REST API でのみサポートされます。

プロパティ名 タイプ 説明
gatewayresponse.param-position.param-name string

param-position は、headerpathquerystring のいずれかです。詳細については、「メソッドリクエストデータを統合リクエストパラメータにマッピングする」を参照してください。

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 }