

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à.

# Configurazione di una risposta del gateway mediante l'API REST API Gateway
<a name="set-up-gateway-response-using-the-api"></a>

 Prima di personalizzare una risposta del gateway tramite l'API REST API Gateway, devi aver già creato un'API e aver ottenuto il relativo identificatore. Per recuperare l'identificatore dell'API puoi seguire la relazione di collegamento [restapi:gateway-responses](https://docs.aws.amazon.com/apigateway/latest/api/API_GetGatewayResponses.html) ed esaminare il risultato. 

**Per configurare una risposta del gateway mediante l'API REST API Gateway**

1. Per sovrascrivere un'intera [GatewayResponse](https://docs.aws.amazon.com/apigateway/latest/api/API_GatewayResponse.html)istanza, chiama il [gatewayresponse:put](https://docs.aws.amazon.com/apigateway/latest/api/API_PutGatewayResponse.html) action. Specificare un valore desiderato per [responseType](https://docs.aws.amazon.com/apigateway/latest/api/API_GatewayResponse.html#responseType) nel parametro di percorso URL e fornire nel payload della richiesta le mappature [statusCode](https://docs.aws.amazon.com/apigateway/latest/api/API_GatewayResponse.html#statusCode), [responseParameters](https://docs.aws.amazon.com/apigateway/latest/api/API_GatewayResponse.html#responseParameters) e [responseTemplates](https://docs.aws.amazon.com/apigateway/latest/api/API_GatewayResponse.html#responseTemplates).

1. Per aggiornare parte di un'istanza `GatewayResponse`, chiamare l'operazione [gatewayresponse:update](https://docs.aws.amazon.com/apigateway/latest/api/API_UpdateGatewayResponse.html). Specificare un valore desiderato per `responseType` nel parametro di percorso URL e fornire nel payload della richiesta le singole proprietà `GatewayResponse` desiderate, ad esempio la mappatura `responseParameters` o `responseTemplates`.