Skip to content

BatchPutDocument

Source: src/AWS/QBusiness/BatchPutDocument.ts

Runtime binding for the BatchPutDocument operation (IAM action qbusiness:BatchPutDocument), scoped to one Index.

Adds or updates documents in the index directly (the CUSTOM data source path), with optional access controls and enrichment. Provide the implementation with Effect.provide(AWS.QBusiness.BatchPutDocumentHttp).

const putDocuments = yield* AWS.QBusiness.BatchPutDocument(index);
const { failedDocuments } = yield* putDocuments({
documents: [
{
id: "welcome",
title: "Welcome",
content: { blob: new TextEncoder().encode("Hello Q!") },
contentType: "PLAIN_TEXT",
},
],
});