Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Adds one or more documents to an index.
The BatchPutDocument
API enables you to ingest inline documents or a
set of documents stored in an Amazon S3 bucket. Use this API to ingest
your text and unstructured text into an index, add custom attributes to
the documents, and to attach an access control list to the documents
added to the index.
The documents are indexed asynchronously. You can see the progress of the batch using Amazon Web Services CloudWatch. Any error messages related to processing the batch are sent to your Amazon Web Services CloudWatch log.
For an example of ingesting inline documents using Python and Java SDKs, see Adding files directly to an index.
Synopsis
- data BatchPutDocument = BatchPutDocument' {}
- newBatchPutDocument :: Text -> NonEmpty Document -> BatchPutDocument
- batchPutDocument_customDocumentEnrichmentConfiguration :: Lens' BatchPutDocument (Maybe CustomDocumentEnrichmentConfiguration)
- batchPutDocument_roleArn :: Lens' BatchPutDocument (Maybe Text)
- batchPutDocument_indexId :: Lens' BatchPutDocument Text
- batchPutDocument_documents :: Lens' BatchPutDocument (NonEmpty Document)
- data BatchPutDocumentResponse = BatchPutDocumentResponse' {}
- newBatchPutDocumentResponse :: Int -> BatchPutDocumentResponse
- batchPutDocumentResponse_failedDocuments :: Lens' BatchPutDocumentResponse (Maybe [BatchPutDocumentResponseFailedDocument])
- batchPutDocumentResponse_httpStatus :: Lens' BatchPutDocumentResponse Int
Creating a Request
data BatchPutDocument Source #
See: newBatchPutDocument
smart constructor.
BatchPutDocument' | |
|
Instances
:: Text | |
-> NonEmpty Document | |
-> BatchPutDocument |
Create a value of BatchPutDocument
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:customDocumentEnrichmentConfiguration:BatchPutDocument'
, batchPutDocument_customDocumentEnrichmentConfiguration
- Configuration information for altering your document metadata and
content during the document ingestion process when you use the
BatchPutDocument
API.
For more information on how to create, modify and delete document metadata, or make other content alterations when you ingest documents into Amazon Kendra, see Customizing document metadata during the ingestion process.
BatchPutDocument
, batchPutDocument_roleArn
- The Amazon Resource Name (ARN) of a role that is allowed to run the
BatchPutDocument
API. For more information, see
IAM Roles for Amazon Kendra.
$sel:indexId:BatchPutDocument'
, batchPutDocument_indexId
- The identifier of the index to add the documents to. You need to create
the index first using the CreateIndex
API.
$sel:documents:BatchPutDocument'
, batchPutDocument_documents
- One or more documents to add to the index.
Documents have the following file size limits.
- 5 MB total size for inline documents
- 50 MB total size for files from an S3 bucket
- 5 MB extracted text for any file
For more information about file size and transaction per second quotas, see Quotas.
Request Lenses
batchPutDocument_customDocumentEnrichmentConfiguration :: Lens' BatchPutDocument (Maybe CustomDocumentEnrichmentConfiguration) Source #
Configuration information for altering your document metadata and
content during the document ingestion process when you use the
BatchPutDocument
API.
For more information on how to create, modify and delete document metadata, or make other content alterations when you ingest documents into Amazon Kendra, see Customizing document metadata during the ingestion process.
batchPutDocument_roleArn :: Lens' BatchPutDocument (Maybe Text) Source #
The Amazon Resource Name (ARN) of a role that is allowed to run the
BatchPutDocument
API. For more information, see
IAM Roles for Amazon Kendra.
batchPutDocument_indexId :: Lens' BatchPutDocument Text Source #
The identifier of the index to add the documents to. You need to create
the index first using the CreateIndex
API.
batchPutDocument_documents :: Lens' BatchPutDocument (NonEmpty Document) Source #
One or more documents to add to the index.
Documents have the following file size limits.
- 5 MB total size for inline documents
- 50 MB total size for files from an S3 bucket
- 5 MB extracted text for any file
For more information about file size and transaction per second quotas, see Quotas.
Destructuring the Response
data BatchPutDocumentResponse Source #
See: newBatchPutDocumentResponse
smart constructor.
BatchPutDocumentResponse' | |
|
Instances
newBatchPutDocumentResponse Source #
Create a value of BatchPutDocumentResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:failedDocuments:BatchPutDocumentResponse'
, batchPutDocumentResponse_failedDocuments
- A list of documents that were not added to the 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.
If there was an error adding a document to an index the error is reported in your Amazon Web Services CloudWatch log. For more information, see Monitoring Amazon Kendra with Amazon CloudWatch Logs
$sel:httpStatus:BatchPutDocumentResponse'
, batchPutDocumentResponse_httpStatus
- The response's http status code.
Response Lenses
batchPutDocumentResponse_failedDocuments :: Lens' BatchPutDocumentResponse (Maybe [BatchPutDocumentResponseFailedDocument]) Source #
A list of documents that were not added to the 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.
If there was an error adding a document to an index the error is reported in your Amazon Web Services CloudWatch log. For more information, see Monitoring Amazon Kendra with Amazon CloudWatch Logs
batchPutDocumentResponse_httpStatus :: Lens' BatchPutDocumentResponse Int Source #
The response's http status code.