Skip to content

update_knowledge_base

Operation

update_knowledge_base

update_knowledge_base(request: UpdateKnowledgeBaseInput | UpdateKnowledgeBaseInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[UpdateKnowledgeBaseInputDict]) -> UpdateKnowledgeBaseOutput

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 created the knowledge base. You can send a GetKnowledgeBase request and copy the same configurations.

Parameters:

Name Type Description Default
request UpdateKnowledgeBaseInput | UpdateKnowledgeBaseInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
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
**kwargs Unpack[UpdateKnowledgeBaseInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
UpdateKnowledgeBaseOutput

An instance of UpdateKnowledgeBaseOutput.

update_knowledge_base async

update_knowledge_base(request: UpdateKnowledgeBaseInput | UpdateKnowledgeBaseInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[UpdateKnowledgeBaseInputDict]) -> UpdateKnowledgeBaseOutput

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 created the knowledge base. You can send a GetKnowledgeBase request and copy the same configurations.

Parameters:

Name Type Description Default
request UpdateKnowledgeBaseInput | UpdateKnowledgeBaseInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
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
**kwargs Unpack[UpdateKnowledgeBaseInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
UpdateKnowledgeBaseOutput

An instance of UpdateKnowledgeBaseOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

UpdateKnowledgeBaseInputDict

Bases: TypedDict

Dictionary form of UpdateKnowledgeBaseInput.

Attributes

description instance-attribute
description: str | None

Specifies a new description for the knowledge base.

knowledge_base_configuration instance-attribute

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.

knowledge_base_id instance-attribute
knowledge_base_id: Required[str]

The unique identifier of the knowledge base to update.

metadata_configurations instance-attribute
metadata_configurations: Sequence[MetadataConfiguration | MetadataConfigurationDict] | None

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.

name instance-attribute
name: Required[str]

Specifies a new name for the knowledge base.

role_arn instance-attribute
role_arn: Required[str]

Specifies a different Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base.

storage_configuration instance-attribute
storage_configuration: StorageConfiguration | StorageConfigurationDict | None

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.

UpdateKnowledgeBaseInput dataclass

Bases: _SerdeShape

Dataclass for UpdateKnowledgeBaseInput structure.

Attributes

description class-attribute instance-attribute
description: str | None = ...

Specifies a new description for the knowledge base.

knowledge_base_configuration class-attribute instance-attribute
knowledge_base_configuration: KnowledgeBaseConfiguration | None = ...

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.

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

The unique identifier of the knowledge base to update.

metadata_configurations class-attribute instance-attribute
metadata_configurations: list[MetadataConfiguration] | None = ...

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.

name class-attribute instance-attribute
name: str | None = ...

Specifies a new name for the knowledge base.

role_arn class-attribute instance-attribute
role_arn: str | None = ...

Specifies a different Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base.

storage_configuration class-attribute instance-attribute
storage_configuration: StorageConfiguration | None = ...

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.

Output

UpdateKnowledgeBaseOutput dataclass

Bases: _SerdeShape

Dataclass for UpdateKnowledgeBaseOutput structure.

Attributes

knowledge_base instance-attribute
knowledge_base: KnowledgeBase

Contains details about the knowledge base.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.