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',
    dataSourceSyncId='string',
    documents=[
        {
            'documentId': 'string'
        },
    ],
    indexId='string'
)
Parameters:
  • applicationId (string) –

    [REQUIRED]

    The identifier of the Amazon Q Business application.

  • dataSourceSyncId (string) – The identifier of the data source sync during which the documents were deleted.

  • 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.

  • indexId (string) –

    [REQUIRED]

    The identifier of the Amazon Q Business index that contains the documents to delete.

Return type:

dict

Returns:

Response Syntax

{
    'failedDocuments': [
        {
            'dataSourceId': 'string',
            'error': {
                'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound',
                'errorMessage': 'string'
            },
            'id': '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.

        • dataSourceId (string) –

          The identifier of the Amazon Q Business data source connector that contains the failed document.

        • error (dict) –

          An explanation for why the document couldn’t be removed from the index.

          • errorCode (string) –

            The code associated with the data source sync error.

          • errorMessage (string) –

            The message explaining the data source sync error.

        • id (string) –

          The identifier of the document that couldn’t be removed from the Amazon Q Business index.

Exceptions