쿠키 기본 설정 선택

당사는 사이트와 서비스를 제공하는 데 필요한 필수 쿠키 및 유사한 도구를 사용합니다. 고객이 사이트를 어떻게 사용하는지 파악하고 개선할 수 있도록 성능 쿠키를 사용해 익명의 통계를 수집합니다. 필수 쿠키는 비활성화할 수 없지만 '사용자 지정' 또는 ‘거부’를 클릭하여 성능 쿠키를 거부할 수 있습니다.

사용자가 동의하는 경우 AWS와 승인된 제3자도 쿠키를 사용하여 유용한 사이트 기능을 제공하고, 사용자의 기본 설정을 기억하고, 관련 광고를 비롯한 관련 콘텐츠를 표시합니다. 필수가 아닌 모든 쿠키를 수락하거나 거부하려면 ‘수락’ 또는 ‘거부’를 클릭하세요. 더 자세한 내용을 선택하려면 ‘사용자 정의’를 클릭하세요.

BatchPutDocument - Amazon Kendra API Reference
이 페이지는 귀하의 언어로 번역되지 않았습니다. 번역 요청

BatchPutDocument

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 AWS CloudWatch. Any error messages related to processing the batch are sent to your AWS CloudWatch log. You can also use the BatchGetDocumentStatus API to monitor the progress of indexing your documents.

For an example of ingesting inline documents using Python and Java SDKs, see Adding files directly to an index.

Request Syntax

{ "CustomDocumentEnrichmentConfiguration": { "InlineConfigurations": [ { "Condition": { "ConditionDocumentAttributeKey": "string", "ConditionOnValue": { "DateValue": number, "LongValue": number, "StringListValue": [ "string" ], "StringValue": "string" }, "Operator": "string" }, "DocumentContentDeletion": boolean, "Target": { "TargetDocumentAttributeKey": "string", "TargetDocumentAttributeValue": { "DateValue": number, "LongValue": number, "StringListValue": [ "string" ], "StringValue": "string" }, "TargetDocumentAttributeValueDeletion": boolean } } ], "PostExtractionHookConfiguration": { "InvocationCondition": { "ConditionDocumentAttributeKey": "string", "ConditionOnValue": { "DateValue": number, "LongValue": number, "StringListValue": [ "string" ], "StringValue": "string" }, "Operator": "string" }, "LambdaArn": "string", "S3Bucket": "string" }, "PreExtractionHookConfiguration": { "InvocationCondition": { "ConditionDocumentAttributeKey": "string", "ConditionOnValue": { "DateValue": number, "LongValue": number, "StringListValue": [ "string" ], "StringValue": "string" }, "Operator": "string" }, "LambdaArn": "string", "S3Bucket": "string" }, "RoleArn": "string" }, "Documents": [ { "AccessControlConfigurationId": "string", "AccessControlList": [ { "Access": "string", "DataSourceId": "string", "Name": "string", "Type": "string" } ], "Attributes": [ { "Key": "string", "Value": { "DateValue": number, "LongValue": number, "StringListValue": [ "string" ], "StringValue": "string" } } ], "Blob": blob, "ContentType": "string", "HierarchicalAccessControlList": [ { "PrincipalList": [ { "Access": "string", "DataSourceId": "string", "Name": "string", "Type": "string" } ] } ], "Id": "string", "S3Path": { "Bucket": "string", "Key": "string" }, "Title": "string" } ], "IndexId": "string", "RoleArn": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

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.

Type: CustomDocumentEnrichmentConfiguration object

Required: No

Documents

One or more documents to add to the index.

Documents have the following file size limits.

  • 50 MB total size for any file

  • 5 MB extracted text for any file

For more information, see Quotas.

Type: Array of Document objects

Array Members: Minimum number of 1 item. Maximum number of 10 items.

Required: Yes

IndexId

The identifier of the index to add the documents to. You need to create the index first using the CreateIndex API.

Type: String

Length Constraints: Fixed length of 36.

Pattern: [a-zA-Z0-9][a-zA-Z0-9-]*

Required: Yes

RoleArn

The Amazon Resource Name (ARN) of an IAM role with permission to access your S3 bucket. For more information, see IAM access roles for Amazon Kendra.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1284.

Pattern: arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}:[^/].{0,1023}

Required: No

Response Syntax

{ "FailedDocuments": [ { "DataSourceId": "string", "ErrorCode": "string", "ErrorMessage": "string", "Id": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

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 AWS CloudWatch log. For more information, see Monitoring Amazon Kendra with Amazon CloudWatch logs.

Type: Array of BatchPutDocumentResponseFailedDocument objects

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

You don't have sufficient access to perform this action. Please ensure you have the required permission policies and user accounts and try again.

HTTP Status Code: 400

ConflictException

A conflict occurred with the request. Please fix any inconsistences with your resources and try again.

HTTP Status Code: 400

InternalServerException

An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes and try again, or contact Support for help.

HTTP Status Code: 500

ResourceNotFoundException

The resource you want to use doesn’t exist. Please check you have provided the correct resource and try again.

HTTP Status Code: 400

ServiceQuotaExceededException

You have exceeded the set limits for your Amazon Kendra service. Please see Quotas for more information, or contact Support to inquire about an increase of limits.

HTTP Status Code: 400

ThrottlingException

The request was denied due to request throttling. Please reduce the number of requests and try again.

HTTP Status Code: 400

ValidationException

The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct input and try again.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

프라이버시사이트 이용 약관쿠키 기본 설정
© 2025, Amazon Web Services, Inc. 또는 계열사. All rights reserved.