create_data_source
async
¶
create_data_source(
knowledge_base_id: Id,
name: Name,
data_source_configuration: DataSourceConfiguration,
*,
config_overrides: Optional[AsyncBedrockAgentClientConfig] = None,
client_token: Optional[ClientToken] = None,
description: Optional[Description] = None,
data_deletion_policy: Optional[DataDeletionPolicy] = None,
server_side_encryption_configuration: Optional[
ServerSideEncryptionConfiguration
] = None,
vector_ingestion_configuration: Optional[VectorIngestionConfiguration] = None,
) -> CreateDataSourceResponse
Connects a knowledge base to a data source. You specify the configuration for the specific data source service in the dataSourceConfiguration field.
You can't change the chunkingConfiguration after you create the data source connector.
Parameters:
-
knowledge_base_id(Id) –The unique identifier of the knowledge base to which to add the data source.
-
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.
-
name(Name) –The name of the data source.
-
description(Optional[Description], default:None) –A description of the data source.
-
data_source_configuration(DataSourceConfiguration) –The connection configuration for the data source.
-
data_deletion_policy(Optional[DataDeletionPolicy], default:None) –The data deletion policy for the data source.
You can set the data deletion policy to:
-
DELETE: Deletes all data from your data source that’s converted into vector embeddings upon deletion of a knowledge base or data source resource. Note that the vector store itself is not deleted, only the data. This flag is ignored if an Amazon Web Services account is deleted.
-
RETAIN: Retains all data from your data source that’s converted into vector embeddings upon deletion of a knowledge base or data source resource. Note that the vector store itself is not deleted if you delete a knowledge base or data source resource.
For managed knowledge bases, the only supported option is
DELETE, which is also the default. -
-
server_side_encryption_configuration(Optional[ServerSideEncryptionConfiguration], default:None) –Contains details about the server-side encryption for the data source.
-
vector_ingestion_configuration(Optional[VectorIngestionConfiguration], default:None) –Contains details about how to ingest the documents in the data source.
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
2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 | |