Skip to content

Qbusiness  >  Operations  >  batch_put_document

batch_put_document

Operation

batch_put_document async

batch_put_document(input: BatchPutDocumentInput, plugins: list[Plugin] | None = None) -> BatchPutDocumentOutput

Adds one or more documents to an Amazon Q Business index.

You use this API to:

  • ingest your structured and unstructured documents and documents stored in an Amazon S3 bucket into an Amazon Q Business index.

  • add custom attributes to documents in an Amazon Q Business index.

  • attach an access control list to the documents added to an Amazon Q Business index.

You can see the progress of the deletion, and any error messages related to the process, by using CloudWatch.

Parameters:

Name Type Description Default
input BatchPutDocumentInput

An instance of BatchPutDocumentInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
BatchPutDocumentOutput

An instance of BatchPutDocumentOutput.

Input

BatchPutDocumentInput dataclass

Dataclass for BatchPutDocumentInput structure.

Attributes

application_id class-attribute instance-attribute
application_id: str | None = None

The identifier of the Amazon Q Business application.

data_source_sync_id class-attribute instance-attribute
data_source_sync_id: str | None = None

The identifier of the data source sync during which the documents were added.

documents class-attribute instance-attribute
documents: list[Document] | None = None

One or more documents to add to the index.

Warning

Ensure that the name of your document doesn't contain any confidential information. Amazon Q Business returns document names in chat responses and citations when relevant.

index_id class-attribute instance-attribute
index_id: str | None = None

The identifier of the Amazon Q Business index to add the documents to.

role_arn class-attribute instance-attribute
role_arn: str | None = None

The Amazon Resource Name (ARN) of an IAM role with permission to access your S3 bucket.

Output

BatchPutDocumentOutput dataclass

Dataclass for BatchPutDocumentOutput structure.

Attributes

failed_documents class-attribute instance-attribute
failed_documents: list[FailedDocument] | None = None

A list of documents that were not added to the Amazon Q Business index because the document failed a validation check. Each document contains an error message that indicates why the document couldn't be added to the index.