listDataSources method
Lists the Amazon Q Business data source connectors that you have created.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter applicationId :
The identifier of the Amazon Q Business application linked to the data
source connectors.
Parameter indexId :
The identifier of the index used with one or more data source connectors.
Parameter maxResults :
The maximum number of data source connectors to return.
Parameter nextToken :
If the maxResults response was incomplete because there is
more data to retrieve, Amazon Q Business returns a pagination token in the
response. You can use this pagination token to retrieve the next set of
Amazon Q Business data source connectors.
Implementation
Future<ListDataSourcesResponse> listDataSources({
required String applicationId,
required String indexId,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
10,
);
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/applications/${Uri.encodeComponent(applicationId)}/indices/${Uri.encodeComponent(indexId)}/datasources',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListDataSourcesResponse.fromJson(response);
}