QBusiness / Client / list_documents
list_documents#
- QBusiness.Client.list_documents(**kwargs)#
A list of documents attached to an index.
See also: AWS API Documentation
Request Syntax
response = client.list_documents( applicationId='string', dataSourceIds=[ 'string', ], indexId='string', maxResults=123, nextToken='string' )
- Parameters:
applicationId (string) –
[REQUIRED]
The identifier of the application id the documents are attached to.
dataSourceIds (list) –
The identifier of the data sources the documents are attached to.
(string) –
indexId (string) –
[REQUIRED]
The identifier of the index the documents are attached to.
maxResults (integer) – The maximum number of documents to return.
nextToken (string) – If the
maxResults
response was incomplete because there is more data to retrieve, Amazon Q Business returns a pagination token in the response. You can use this pagination token to retrieve the next set of documents.
- Return type:
dict
- Returns:
Response Syntax
{ 'documentDetailList': [ { 'createdAt': datetime(2015, 1, 1), 'documentId': 'string', 'error': { 'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound', 'errorMessage': 'string' }, 'status': 'RECEIVED'|'PROCESSING'|'INDEXED'|'UPDATED'|'FAILED'|'DELETING'|'DELETED'|'DOCUMENT_FAILED_TO_INDEX', 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' }
Response Structure
(dict) –
documentDetailList (list) –
A list of document details.
(dict) –
The details of a document within an Amazon Q Business index.
createdAt (datetime) –
The timestamp for when the document was created.
documentId (string) –
The identifier of the document.
error (dict) –
An error message associated with the document.
errorCode (string) –
The code associated with the data source sync error.
errorMessage (string) –
The message explaining the data source sync error.
status (string) –
The current status of the document.
updatedAt (datetime) –
The timestamp for when the document was last updated.
nextToken (string) –
If the
maxResults
response was incomplete because there is more data to retrieve, Amazon Q Business returns a pagination token in the response. You can use this pagination token to retrieve the next set of documents.
Exceptions
QBusiness.Client.exceptions.ResourceNotFoundException
QBusiness.Client.exceptions.InternalServerException
QBusiness.Client.exceptions.ThrottlingException
QBusiness.Client.exceptions.ValidationException
QBusiness.Client.exceptions.AccessDeniedException