startDataSourceSyncJob method

Future<StartDataSourceSyncJobResponse> startDataSourceSyncJob({
  1. required String id,
  2. required String indexId,
})

Starts a synchronization job for a data source connector. If a synchronization job is already in progress, Amazon Kendra returns a ResourceInUseException exception.

Re-syncing your data source with your index after modifying, adding, or deleting documents from your data source respository could take up to an hour or more, depending on the number of documents to sync.

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

Parameter id : The identifier of the data source connector to synchronize.

Parameter indexId : The identifier of the index used with the data source connector.

Implementation

Future<StartDataSourceSyncJobResponse> startDataSourceSyncJob({
  required String id,
  required String indexId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSKendraFrontendService.StartDataSourceSyncJob'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Id': id,
      'IndexId': indexId,
    },
  );

  return StartDataSourceSyncJobResponse.fromJson(jsonResponse.body);
}