Skip to content

Bedrock Agent  >  Operations  >  get_knowledge_base_documents

get_knowledge_base_documents

Operation

get_knowledge_base_documents async

get_knowledge_base_documents(input: GetKnowledgeBaseDocumentsInput, plugins: list[Plugin] | None = None) -> GetKnowledgeBaseDocumentsOutput

Retrieves specific documents from a data source that is connected to a knowledge base. For more information, see Ingest changes directly into a knowledge base in the Amazon Bedrock User Guide.

Parameters:

Name Type Description Default
input GetKnowledgeBaseDocumentsInput

An instance of GetKnowledgeBaseDocumentsInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
GetKnowledgeBaseDocumentsOutput

An instance of GetKnowledgeBaseDocumentsOutput.

Input

GetKnowledgeBaseDocumentsInput dataclass

Dataclass for GetKnowledgeBaseDocumentsInput structure.

Attributes

data_source_id class-attribute instance-attribute
data_source_id: str | None = None

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

document_identifiers class-attribute instance-attribute
document_identifiers: list[DocumentIdentifier] | None = None

A list of objects, each of which contains information to identify a document for which to retrieve information.

knowledge_base_id class-attribute instance-attribute
knowledge_base_id: str | None = None

The unique identifier of the knowledge base that is connected to the data source.

Output

GetKnowledgeBaseDocumentsOutput dataclass

Dataclass for GetKnowledgeBaseDocumentsOutput structure.

Attributes

document_details class-attribute instance-attribute
document_details: list[KnowledgeBaseDocumentDetail] | None = None

A list of objects, each of which contains information about the documents that were retrieved.