Skip to content

Bedrock Agent  >  Operations  >  delete_knowledge_base

delete_knowledge_base

Operation

delete_knowledge_base async

delete_knowledge_base(input: DeleteKnowledgeBaseInput, plugins: list[Plugin] | None = None) -> DeleteKnowledgeBaseOutput

Deletes a knowledge base. Before deleting a knowledge base, you should disassociate the knowledge base from any agents that it is associated with by making a DisassociateAgentKnowledgeBase request.

Parameters:

Name Type Description Default
input DeleteKnowledgeBaseInput

An instance of DeleteKnowledgeBaseInput.

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
DeleteKnowledgeBaseOutput

An instance of DeleteKnowledgeBaseOutput.

Input

DeleteKnowledgeBaseInput dataclass

Dataclass for DeleteKnowledgeBaseInput structure.

Attributes

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

The unique identifier of the knowledge base to delete.

Output

DeleteKnowledgeBaseOutput dataclass

Dataclass for DeleteKnowledgeBaseOutput structure.

Attributes

knowledge_base_id instance-attribute
knowledge_base_id: str

The unique identifier of the knowledge base that was deleted.

status instance-attribute

The status of the knowledge base and whether it has been successfully deleted.