updateRequestValidator method

Future<RequestValidator> updateRequestValidator({
  1. required String requestValidatorId,
  2. required String restApiId,
  3. List<PatchOperation>? patchOperations,
})

Updates a RequestValidator of a given RestApi.

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

Parameter requestValidatorId : The identifier of RequestValidator to be updated.

Parameter restApiId : The string identifier of the associated RestApi.

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

Implementation

Future<RequestValidator> updateRequestValidator({
  required String requestValidatorId,
  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)}/requestvalidators/${Uri.encodeComponent(requestValidatorId)}',
    exceptionFnMap: _exceptionFns,
  );
  return RequestValidator.fromJson(response);
}