getRequestValidator method
Gets a RequestValidator of a given RestApi.
May throw UnauthorizedException. May throw NotFoundException. May throw TooManyRequestsException.
Parameter requestValidatorId
:
Required
The identifier of the RequestValidator to be retrieved.
Parameter restApiId
:
Required
The string identifier of the associated RestApi.
Implementation
Future<RequestValidator> getRequestValidator({
required String requestValidatorId,
required String restApiId,
}) async {
ArgumentError.checkNotNull(requestValidatorId, 'requestValidatorId');
ArgumentError.checkNotNull(restApiId, 'restApiId');
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/restapis/${Uri.encodeComponent(restApiId)}/requestvalidators/${Uri.encodeComponent(requestValidatorId)}',
exceptionFnMap: _exceptionFns,
);
return RequestValidator.fromJson(response);
}