Skip to main content

documents

Creates, updates, deletes, gets or lists a documents resource.

Overview

Namedocuments
TypeResource
Idaws.qbusiness.documents

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_atstring (date-time)The timestamp for when the document was created.
document_idstringThe identifier of the document. (pattern: <code>\P{C}*</code>)
errorobjectProvides information about a Amazon Q Business request error.
statusstringThe current status of the document. (RECEIVED, PROCESSING, INDEXED, UPDATED, FAILED, DELETING, DELETED, DOCUMENT_FAILED_TO_INDEX)
updated_atstring (date-time)The timestamp for when the document was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_documentsselectapplication_id, index_id, regiondataSourceIds, nextToken, maxResultsA list of documents attached to an index.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
application_idstringThe identifier of the application id the documents are attached to.
index_idstringThe identifier of the index the documents are attached to.
regionstringAWS region (default: us-east-1)
dataSourceIdsarrayThe identifier of the data sources the documents are attached to.
maxResultsintegerThe maximum number of documents to return.
nextTokenstringIf 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.

SELECT examples

A list of documents attached to an index.

SELECT
created_at,
document_id,
error,
status,
updated_at
FROM aws.qbusiness.documents
WHERE application_id = '{{ application_id }}' -- required
AND index_id = '{{ index_id }}' -- required
AND region = '{{ region }}' -- required
AND dataSourceIds = '{{ dataSourceIds }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;