getDataSource method
Retrieves a DataSource
object.
May throw BadRequestException. May throw ConcurrentModificationException. May throw NotFoundException. May throw UnauthorizedException. May throw InternalFailureException.
Parameter apiId
:
The API ID.
Parameter name
:
The name of the data source.
Implementation
Future<GetDataSourceResponse> getDataSource({
required String apiId,
required String name,
}) async {
ArgumentError.checkNotNull(apiId, 'apiId');
ArgumentError.checkNotNull(name, 'name');
_s.validateStringLength(
'name',
name,
1,
65536,
isRequired: true,
);
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/v1/apis/${Uri.encodeComponent(apiId)}/datasources/${Uri.encodeComponent(name)}',
exceptionFnMap: _exceptionFns,
);
return GetDataSourceResponse.fromJson(response);
}