Skip to content

BedrockAgentClient.update_knowledge_base

rboto-bedrock-agent==0.4.0 · Service index · Types

Model summary (excerpt): Updates the configuration of a knowledge base with the fields that you specify. Because all fields will be overwritten, you must include the same values for fields that you want to keep the same. You can change the following fields: name description roleArn You can't change the knowledgeBaseConfiguration or storageConfiguration fields, so you must specify the same configurations as when you...

Install and imports

python -m pip install "rboto[bedrock-agent]==0.4.0"
from rboto import BedrockAgentClient
from collections.abc import Sequence
from rboto_bedrock_agent.types import (
    KnowledgeBaseConfiguration,
    MetadataConfiguration,
    StorageConfiguration,
    UpdateKnowledgeBaseOutput,
)

Signature

async def update_knowledge_base(
    *,
    knowledge_base_id: str,
    name: str,
    role_arn: str,
    knowledge_base_configuration: KnowledgeBaseConfiguration,
    description: str | None = None,
    storage_configuration: StorageConfiguration | None = None,
    metadata_configurations: Sequence[MetadataConfiguration] | None = None,
) -> UpdateKnowledgeBaseOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
knowledge_base_id Yes The unique identifier of the knowledge base to update.
name Yes Specifies a new name for the knowledge base.
role_arn Yes Specifies a different Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base.
knowledge_base_configuration Yes Specifies the configuration for the embeddings model used for the knowledge base. You must use the same configuration as when the knowledge base was created.
description No Specifies a new description for the knowledge base.
storage_configuration No Specifies the configuration for the vector store used for the knowledge base. You must use the same configuration as when the knowledge base was created.
metadata_configurations No Specifies up to 30 custom metadata field configurations for a managed knowledge base. The list that you specify replaces the existing configurations. The update removes any configuration that you leave out, and its field is no longer searchable. An empty list removes all configurations. If you don't specify a list, the existing configurations don't change.

Output

UpdateKnowledgeBaseOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
knowledge_base KnowledgeBaseOutput | None Always present KnowledgeBaseOutput

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

KnowledgeBaseConfiguration, MetadataConfiguration, StorageConfiguration, UpdateKnowledgeBaseOutput

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_bedrock_agent.exceptions:

AccessDeniedError, ConflictError, InternalServerError, ResourceNotFoundError, ThrottlingError, ValidationError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model