getDataSource method

Future<GetDataSourceResponse> getDataSource({
  1. required String dataSourceId,
  2. required String knowledgeBaseId,
})

Gets information about a data source.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter dataSourceId : The unique identifier of the data source.

Parameter knowledgeBaseId : The unique identifier of the knowledge base for the data source.

Implementation

Future<GetDataSourceResponse> getDataSource({
  required String dataSourceId,
  required String knowledgeBaseId,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/knowledgebases/${Uri.encodeComponent(knowledgeBaseId)}/datasources/${Uri.encodeComponent(dataSourceId)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetDataSourceResponse.fromJson(response);
}