Skip to content

Document

Source code in docs_src/capo_kendra/types/document.py
class Document(TypedDict, closed=True):
    id: "capo_kendra.types.document_id.DocumentId"
    """<p>A identifier of the document in the index.</p> <p>Note, each document ID must be unique per index. You cannot create a data source to index your documents with their unique IDs and then use the <code>BatchPutDocument</code> API to index the same documents, or vice versa. You can delete a data source and then use the <code>BatchPutDocument</code> API to index the same documents, or vice versa.</p>"""
    title: NotRequired["capo_kendra.types.title.Title"]
    """<p>The title of the document.</p>"""
    blob: NotRequired["capo_kendra.types.blob.Blob"]
    """<p>The contents of the document. </p> <p>Documents passed to the <code>Blob</code> parameter must be base64 encoded. Your code might not need to encode the document file bytes if you're using an Amazon Web Services SDK to call Amazon Kendra APIs. If you are calling the Amazon Kendra endpoint directly using REST, you must base64 encode the contents before sending.</p>"""
    s3_path: NotRequired["capo_kendra.types.s3_path.S3Path"]
    attributes: NotRequired[
        "capo_kendra.types.document_attribute_list.DocumentAttributeList"
    ]
    """<p>Custom attributes to apply to the document. Use the custom attributes to provide additional information for searching, to provide facets for refining searches, and to provide additional information in the query response.</p> <p>For example, 'DataSourceId' and 'DataSourceSyncJobId' are custom attributes that provide information on the synchronization of documents running on a data source. Note, 'DataSourceSyncJobId' could be an optional custom attribute as Amazon Kendra will use the ID of a running sync job.</p>"""
    access_control_list: NotRequired["capo_kendra.types.principal_list.PrincipalList"]
    """<p>Information on principals (users and/or groups) and which documents they should have access to. This is useful for user context filtering, where search results are filtered based on the user or their group access to documents.</p>"""
    hierarchical_access_control_list: NotRequired[
        "capo_kendra.types.hierarchical_principal_list.HierarchicalPrincipalList"
    ]
    """<p>The list of <a href="https://docs.aws.amazon.com/kendra/latest/dg/API_Principal.html">principal</a> lists that define the hierarchy for which documents users should have access to.</p>"""
    content_type: NotRequired["capo_kendra.types.content_type.ContentType"]
    """<p>The file type of the document in the <code>Blob</code> field.</p> <p>If you want to index snippets or subsets of HTML documents instead of the entirety of the HTML documents, you must add the <code>HTML</code> start and closing tags (<code><HTML>content</HTML></code>) around the content.</p>"""
    access_control_configuration_id: NotRequired[
        "capo_kendra.types.access_control_configuration_id.AccessControlConfigurationId"
    ]
    """<p>The identifier of the access control configuration that you want to apply to the document.</p>"""

access_control_configuration_id instance-attribute

access_control_configuration_id: NotRequired[AccessControlConfigurationId]

The identifier of the access control configuration that you want to apply to the document.

access_control_list instance-attribute

access_control_list: NotRequired[PrincipalList]

Information on principals (users and/or groups) and which documents they should have access to. This is useful for user context filtering, where search results are filtered based on the user or their group access to documents.

attributes instance-attribute

attributes: NotRequired[DocumentAttributeList]

Custom attributes to apply to the document. Use the custom attributes to provide additional information for searching, to provide facets for refining searches, and to provide additional information in the query response.

For example, 'DataSourceId' and 'DataSourceSyncJobId' are custom attributes that provide information on the synchronization of documents running on a data source. Note, 'DataSourceSyncJobId' could be an optional custom attribute as Amazon Kendra will use the ID of a running sync job.

blob instance-attribute

blob: NotRequired[Blob]

The contents of the document.

Documents passed to the Blob parameter must be base64 encoded. Your code might not need to encode the document file bytes if you're using an Amazon Web Services SDK to call Amazon Kendra APIs. If you are calling the Amazon Kendra endpoint directly using REST, you must base64 encode the contents before sending.

content_type instance-attribute

content_type: NotRequired[ContentType]

The file type of the document in the Blob field.

If you want to index snippets or subsets of HTML documents instead of the entirety of the HTML documents, you must add the HTML start and closing tags (content) around the content.

hierarchical_access_control_list instance-attribute

hierarchical_access_control_list: NotRequired[HierarchicalPrincipalList]

The list of principal lists that define the hierarchy for which documents users should have access to.

id instance-attribute

A identifier of the document in the index.

Note, each document ID must be unique per index. You cannot create a data source to index your documents with their unique IDs and then use the BatchPutDocument API to index the same documents, or vice versa. You can delete a data source and then use the BatchPutDocument API to index the same documents, or vice versa.

s3_path instance-attribute

s3_path: NotRequired[S3Path]

title instance-attribute

title: NotRequired[Title]

The title of the document.