ingest_knowledge_base_documents
async
¶
ingest_knowledge_base_documents(
knowledge_base_id: Id,
data_source_id: Id,
documents: KnowledgeBaseDocuments,
*,
config_overrides: Optional[AsyncBedrockAgentClientConfig] = None,
client_token: Optional[ClientToken] = None,
) -> IngestKnowledgeBaseDocumentsResponse
Ingests documents directly into the knowledge base that is connected to the data source. The dataSourceType specified in the content for each document must match the type of the data source that you specify in the header. For more information, see Ingest changes directly into a knowledge base in the Amazon Bedrock User Guide.
Parameters:
-
knowledge_base_id(Id) –The unique identifier of the knowledge base to ingest the documents into.
-
data_source_id(Id) –The unique identifier of the data source connected to the knowledge base that you're adding documents to.
-
client_token(Optional[ClientToken], default:None) –A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
-
documents(KnowledgeBaseDocuments) –A list of objects, each of which contains information about the documents to add.
Raises:
-
AccessDeniedException–The request is denied because of missing access permissions.
-
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
4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 | |