associate_agent_knowledge_base
async
¶
associate_agent_knowledge_base(
agent_id: Id,
agent_version: DraftVersion,
knowledge_base_id: Id,
description: Description,
*,
config_overrides: Optional[AsyncBedrockAgentClientConfig] = 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/async_bedrock_agent.py
4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 | |