associate_agent_knowledge_base
¶
associate_agent_knowledge_base(
agent_id: Id,
agent_version: DraftVersion,
knowledge_base_id: Id,
description: Description,
*,
config_overrides: Optional[BedrockAgentClientConfig] = None,
knowledge_base_state: Optional[KnowledgeBaseState] = None,
) -> AssociateAgentKnowledgeBaseResponse
Associates a knowledge base with an agent. If a knowledge base is associated and its indexState is set to Enabled, the agent queries the knowledge base for information to augment its response to the user.
Parameters:
-
agent_id(Id) –The unique identifier of the agent with which you want to associate the knowledge base.
-
agent_version(DraftVersion) –The version of the agent with which you want to associate the knowledge base.
-
knowledge_base_id(Id) –The unique identifier of the knowledge base to associate with the agent.
-
description(Description) –A description of what the agent should use the knowledge base for.
-
knowledge_base_state(Optional[KnowledgeBaseState], default:None) –Specifies whether to use the knowledge base or not when sending an InvokeAgent request.
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.
-
ServiceQuotaExceededException–The number of requests exceeds the service quota. Resubmit your request later.
-
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/bedrock_agent.py
4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 | |