updateRequestValidator method
Future<RequestValidator>
updateRequestValidator({
- required String requestValidatorId,
- required String restApiId,
- List<
PatchOperation> ? patchOperations,
Updates a RequestValidator of a given RestApi.
May throw UnauthorizedException. May throw NotFoundException. May throw BadRequestException. May throw TooManyRequestsException.
Parameter requestValidatorId
:
Required
The identifier of RequestValidator to be updated.
Parameter restApiId
:
Required
The string identifier of the associated RestApi.
Parameter patchOperations
:
A list of update operations to be applied to the specified resource and in
the order specified in this list.
Implementation
Future<RequestValidator> updateRequestValidator({
required String requestValidatorId,
required String restApiId,
List<PatchOperation>? patchOperations,
}) async {
ArgumentError.checkNotNull(requestValidatorId, 'requestValidatorId');
ArgumentError.checkNotNull(restApiId, 'restApiId');
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);
}