update_knowledge_base
async
¶
update_knowledge_base(
knowledge_base_id: Id,
name: Name,
role_arn: KnowledgeBaseRoleArn,
knowledge_base_configuration: KnowledgeBaseConfiguration,
*,
config_overrides: Optional[AsyncBedrockAgentClientConfig] = None,
description: Optional[Description] = None,
storage_configuration: Optional[StorageConfiguration] = None,
metadata_configurations: Optional[MetadataConfigurations] = None,
user_context_mode_for_retrieval: Optional[UserContextModeForRetrieval] = None,
trusted_identity_sources: Optional[TrustedIdentitySources] = None,
) -> UpdateKnowledgeBaseResponse
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:
-
knowledge_base_id(Id) –The unique identifier of the knowledge base to update.
-
name(Name) –Specifies a new name for the knowledge base.
-
description(Optional[Description], default:None) –Specifies a new description for the knowledge base.
-
role_arn(KnowledgeBaseRoleArn) –Specifies a different Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base.
-
knowledge_base_configuration(KnowledgeBaseConfiguration) –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.
-
storage_configuration(Optional[StorageConfiguration], default: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.
-
metadata_configurations(Optional[MetadataConfigurations], default: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.
-
user_context_mode_for_retrieval(Optional[UserContextModeForRetrieval], default:None) –Specifies the end-user identity that you want the knowledge base to use to filter retrieval results by document access controls. If you don't specify a value, the knowledge base keeps its current value.
-
trusted_identity_sources(Optional[TrustedIdentitySources], default:None) –Specifies up to 5 identity sources that you want the knowledge base to trust for identity-enhanced sessions. An identity source is an AWS IAM Identity Center identity store or an AWS Identity and Access Management (IAM) identity provider.
The list that you specify replaces the existing list. To remove all identity sources, specify an empty list. If you don't specify a list, the knowledge base keeps its current identity sources.
Raises:
-
AccessDeniedException–The request is denied because of missing access permissions.
-
ConflictException–There was a conflict performing an operation.
-
InternalServerException–An internal server error occurred. Retry your request.
-
ResourceNotFoundException–The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
-
ThrottlingException–The number of requests exceeds the limit. Resubmit your request later.
-
ValidationException–Input validation failed. Check your request parameters and retry the request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_bedrock_agent/_services/async_bedrock_agent.py
5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 | |