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', indexId='string', dataSourceIds=[ 'string', ], nextToken='string', maxResults=123 ) - Parameters:
- applicationId (string) – - [REQUIRED] - The identifier of the application id the documents are attached to. 
- indexId (string) – - [REQUIRED] - The identifier of the index the documents are attached to. 
- dataSourceIds (list) – - The identifier of the data sources the documents are attached to. - (string) – 
 
- nextToken (string) – If the - maxResultsresponse 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.
- maxResults (integer) – The maximum number of documents to return. 
 
- Return type:
- dict 
- Returns:
- Response Syntax- { 'documentDetailList': [ { 'documentId': 'string', 'status': 'RECEIVED'|'PROCESSING'|'INDEXED'|'UPDATED'|'FAILED'|'DELETING'|'DELETED'|'DOCUMENT_FAILED_TO_INDEX', 'error': { 'errorMessage': 'string', 'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound' }, 'createdAt': datetime(2015, 1, 1), '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. - documentId (string) – - The identifier of the document. 
- status (string) – - The current status of the document. 
- error (dict) – - An error message associated with the document. - errorMessage (string) – - The message explaining the data source sync error. 
- errorCode (string) – - The code associated with the data source sync error. 
 
- createdAt (datetime) – - The timestamp for when the document was created. 
- updatedAt (datetime) – - The timestamp for when the document was last updated. 
 
 
- nextToken (string) – - If the - maxResultsresponse 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