Skip to content

GetDocumentContentRequest

Source code in docs_src/capo_bedrock_agent_runtime/types/get_document_content_request.py
class GetDocumentContentRequest(TypedDict, closed=True):
    knowledge_base_id: "capo_bedrock_agent_runtime.types.knowledge_base_identifier.KnowledgeBaseIdentifier"
    """<p>The unique identifier of the knowledge base that contains the document.</p>"""
    data_source_id: "capo_bedrock_agent_runtime.types.data_source_id.DataSourceId"
    """<p>The unique identifier of the data source that contains the document.</p>"""
    document_id: "capo_bedrock_agent_runtime.types.document_id.DocumentId"
    """<p>The unique identifier of the document to retrieve content for.</p>"""
    media_id: NotRequired["capo_bedrock_agent_runtime.types.media_id.MediaId"]
    """<p>The unique identifier (in UUID format) of an image embedded in the specified document. Set this parameter to the <code>_media_id</code> value in the metadata of the corresponding <code>Retrieve</code> result. If you specify this parameter, the response contains a pre-signed URL for the image instead of the document, and you must omit <code>outputFormat</code> or set it to <code>RAW</code>.</p>"""
    output_format: NotRequired[
        "capo_bedrock_agent_runtime.types.document_output_format.DocumentOutputFormat"
    ]
    """<p>The output format for the content. You can specify one of the following values:</p> <dl> <dt>RAW</dt> <dd> <p>Returns the original document, or the selected image if you specify <code>mediaId</code>.</p> </dd> <dt>EXTRACTED</dt> <dd> <p>Returns parsed document text as JSON.</p> </dd> </dl> <p>If you omit this parameter, the default is <code>RAW</code>. You can't use <code>EXTRACTED</code> with <code>mediaId</code>.</p>"""
    user_context: NotRequired[
        "capo_bedrock_agent_runtime.types.user_context.UserContext"
    ]
    """<p>Contains information about the user making the request. This is used for access control filtering to ensure that results only include documents the user is authorized to access.</p>"""

data_source_id instance-attribute

data_source_id: DataSourceId

The unique identifier of the data source that contains the document.

document_id instance-attribute

document_id: DocumentId

The unique identifier of the document to retrieve content for.

knowledge_base_id instance-attribute

knowledge_base_id: KnowledgeBaseIdentifier

The unique identifier of the knowledge base that contains the document.

media_id instance-attribute

media_id: NotRequired[MediaId]

The unique identifier (in UUID format) of an image embedded in the specified document. Set this parameter to the _media_id value in the metadata of the corresponding Retrieve result. If you specify this parameter, the response contains a pre-signed URL for the image instead of the document, and you must omit outputFormat or set it to RAW.

output_format instance-attribute

output_format: NotRequired[DocumentOutputFormat]

The output format for the content. You can specify one of the following values:

RAW

Returns the original document, or the selected image if you specify mediaId.

EXTRACTED

Returns parsed document text as JSON.

If you omit this parameter, the default is RAW. You can't use EXTRACTED with mediaId.

user_context instance-attribute

user_context: NotRequired[UserContext]

Contains information about the user making the request. This is used for access control filtering to ensure that results only include documents the user is authorized to access.