

Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.

# x-amazon-apigateway-gatewayoggetto -response
<a name="api-gateway-swagger-extensions-gateway-responses"></a>

Definisce le risposte del gateway per un'API come una [GatewayResponse](https://docs.aws.amazon.com/apigateway/latest/api/API_GatewayResponse.html)mappa stringa-valore di coppie chiave-valore. L'estensione si applica alla struttura OpenAPI a livello root.


| Nome proprietà | Tipo | Description | 
| --- | --- | --- | 
| {{responseType}} | [x-amazon-apigateway-gateway-response.GatewayResponse](api-gateway-swagger-extensions-gateway-responses.gatewayResponse.md) | A sta per il specificato. `GatewayResponse` {{responseType}} | 

## x-amazon-apigateway-gateway-esempio di risposte
<a name="api-gateway-swagger-extensions-gateway-responses-example"></a>

 Il seguente esempio di estensione API Gateway a OpenAPI definisce una [GatewayResponses](https://docs.aws.amazon.com/apigateway/latest/api/API_GetGatewayResponses.html)mappa che contiene due [GatewayResponse](https://docs.aws.amazon.com/apigateway/latest/api/API_GatewayResponse.html)istanze, una per il tipo e l'altra per il `DEFAULT_4XX` tipo. `INVALID_API_KEY` 

```
{
  "x-amazon-apigateway-gateway-responses": {
    "DEFAULT_4XX": {
      "responseParameters": {
        "gatewayresponse.header.Access-Control-Allow-Origin": "'domain.com'"
      },
      "responseTemplates": {
        "application/json": "{\"message\": test 4xx b }"
      }
    },
    "INVALID_API_KEY": {
      "statusCode": "429",
      "responseTemplates": {
        "application/json": "{\"message\": test forbidden }"
      }
    }
  }
}
```