deleteDataSource method
Deletes an Amazon Kendra data source connector. An exception is not thrown
if the data source is already being deleted. While the data source is
being deleted, the Status field returned by a call to the
DescribeDataSource API is set to DELETING. For
more information, see Deleting
Data Sources.
Deleting an entire data source or re-syncing your index after deleting specific documents from a data source could take up to an hour or more, depending on the number of documents you want to delete.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter id :
The identifier of the data source connector you want to delete.
Parameter indexId :
The identifier of the index used with the data source connector.
Implementation
Future<void> deleteDataSource({
required String id,
required String indexId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSKendraFrontendService.DeleteDataSource'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Id': id,
'IndexId': indexId,
},
);
}