getRestApi method

Future<RestApi> getRestApi({
  1. required String restApiId,
})

Lists the RestApi resource in the collection.

May throw UnauthorizedException. May throw NotFoundException. May throw TooManyRequestsException.

Parameter restApiId : Required The string identifier of the associated RestApi.

Implementation

Future<RestApi> getRestApi({
  required String restApiId,
}) async {
  ArgumentError.checkNotNull(restApiId, 'restApiId');
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/restapis/${Uri.encodeComponent(restApiId)}',
    exceptionFnMap: _exceptionFns,
  );
  return RestApi.fromJson(response);
}