QBusiness / Client / batch_delete_document
batch_delete_document#
- QBusiness.Client.batch_delete_document(**kwargs)#
Asynchronously deletes one or more documents added using the
BatchPutDocument
API from an Amazon Q Business index.You can see the progress of the deletion, and any error messages related to the process, by using CloudWatch.
See also: AWS API Documentation
Request Syntax
response = client.batch_delete_document( applicationId='string', indexId='string', documents=[ { 'documentId': 'string' }, ], dataSourceSyncId='string' )
- Parameters:
applicationId (string) –
[REQUIRED]
The identifier of the Amazon Q Business application.
indexId (string) –
[REQUIRED]
The identifier of the Amazon Q Business index that contains the documents to delete.
documents (list) –
[REQUIRED]
Documents deleted from the Amazon Q Business index.
(dict) –
A document deleted from an Amazon Q Business data source connector.
documentId (string) – [REQUIRED]
The identifier of the deleted document.
dataSourceSyncId (string) – The identifier of the data source sync during which the documents were deleted.
- Return type:
dict
- Returns:
Response Syntax
{ 'failedDocuments': [ { 'id': 'string', 'error': { 'errorMessage': 'string', 'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound' }, 'dataSourceId': 'string' }, ] }
Response Structure
(dict) –
failedDocuments (list) –
A list of documents that couldn’t be removed from the Amazon Q Business index. Each entry contains an error message that indicates why the document couldn’t be removed from the index.
(dict) –
A list of documents that could not be removed from an Amazon Q Business index. Each entry contains an error message that indicates why the document couldn’t be removed from the index.
id (string) –
The identifier of the document that couldn’t be removed from the Amazon Q Business index.
error (dict) –
An explanation for why the document couldn’t be removed from the index.
errorMessage (string) –
The message explaining the data source sync error.
errorCode (string) –
The code associated with the data source sync error.
dataSourceId (string) –
The identifier of the Amazon Q Business data source connector that contains the failed document.
Exceptions
QBusiness.Client.exceptions.ResourceNotFoundException
QBusiness.Client.exceptions.InternalServerException
QBusiness.Client.exceptions.ConflictException
QBusiness.Client.exceptions.ThrottlingException
QBusiness.Client.exceptions.ValidationException
QBusiness.Client.exceptions.AccessDeniedException