BatchPutDocument
Source:
src/AWS/Kendra/BatchPutDocument.ts
Runtime binding for the BatchPutDocument operation (IAM action
kendra:BatchPutDocument), scoped to one Index.
Adds documents directly to the index (inline blobs or S3 paths) —
the push-API alternative to a data-source sync. Check the response’s
FailedDocuments for per-document errors; documents index
asynchronously (poll with BatchGetDocumentStatus).
Provide the implementation with
Effect.provide(AWS.Kendra.BatchPutDocumentHttp).
Indexing Documents
Section titled “Indexing Documents”const putDocuments = yield* AWS.Kendra.BatchPutDocument(index);
const result = yield* putDocuments({ Documents: [ { Id: "welcome", Title: "Welcome", Blob: new TextEncoder().encode("Hello from Alchemy"), ContentType: "PLAIN_TEXT", }, ],});// result.FailedDocuments is empty on success