listDataSourceSyncJobs method
Get information about an Amazon Q Business data source connector synchronization.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter applicationId :
The identifier of the Amazon Q Business application connected to the data
source.
Parameter dataSourceId :
The identifier of the data source connector.
Parameter indexId :
The identifier of the index used with the Amazon Q Business data source
connector.
Parameter endTime :
The end time of the data source connector sync.
Parameter maxResults :
The maximum number of synchronization jobs to return in the response.
Parameter nextToken :
If the maxResults response was incpmplete because there is
more data to retriever, Amazon Q Business returns a pagination token in
the response. You can use this pagination token to retrieve the next set
of responses.
Parameter startTime :
The start time of the data source connector sync.
Parameter statusFilter :
Only returns synchronization jobs with the Status field equal
to the specified status.
Implementation
Future<ListDataSourceSyncJobsResponse> listDataSourceSyncJobs({
required String applicationId,
required String dataSourceId,
required String indexId,
DateTime? endTime,
int? maxResults,
String? nextToken,
DateTime? startTime,
DataSourceSyncJobStatus? statusFilter,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
10,
);
final $query = <String, List<String>>{
if (endTime != null) 'endTime': [_s.iso8601ToJson(endTime).toString()],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (startTime != null)
'startTime': [_s.iso8601ToJson(startTime).toString()],
if (statusFilter != null) 'syncStatus': [statusFilter.value],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/applications/${Uri.encodeComponent(applicationId)}/indices/${Uri.encodeComponent(indexId)}/datasources/${Uri.encodeComponent(dataSourceId)}/syncjobs',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListDataSourceSyncJobsResponse.fromJson(response);
}