updateGatewayResponse method

Future<GatewayResponse> updateGatewayResponse({
  1. required GatewayResponseType responseType,
  2. required String restApiId,
  3. List<PatchOperation>? patchOperations,
})

Updates a GatewayResponse of a specified response type on the given RestApi.

May throw BadRequestException. May throw ConflictException. May throw LimitExceededException. May throw NotFoundException. May throw TooManyRequestsException. May throw UnauthorizedException.

Parameter responseType : The response type of the associated GatewayResponse.

Parameter restApiId : The string identifier of the associated RestApi.

Parameter patchOperations : For more information about supported patch operations, see Patch Operations.

Implementation

Future<GatewayResponse> updateGatewayResponse({
  required GatewayResponseType responseType,
  required String restApiId,
  List<PatchOperation>? patchOperations,
}) async {
  final $payload = <String, dynamic>{
    if (patchOperations != null) 'patchOperations': patchOperations,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/restapis/${Uri.encodeComponent(restApiId)}/gatewayresponses/${Uri.encodeComponent(responseType.value)}',
    exceptionFnMap: _exceptionFns,
  );
  return GatewayResponse.fromJson(response);
}