create_data_source¶
Operation¶
create_data_source
async
¶
create_data_source(input: CreateDataSourceInput, plugins: list[Plugin] | None = None) -> CreateDataSourceOutput
Connects a knowledge base to a data source. You specify the
configuration for the specific data source service in the
dataSourceConfiguration field.
Warning
You can't change the chunkingConfiguration after you create the data
source connector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
CreateDataSourceInput
|
An instance of |
required |
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
CreateDataSourceOutput
|
An instance of |
Input¶
CreateDataSourceInput
dataclass
¶
Dataclass for CreateDataSourceInput structure.
Attributes¶
client_token
class-attribute
instance-attribute
¶
client_token: str | None = 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.
data_deletion_policy
class-attribute
instance-attribute
¶
data_deletion_policy: DataDeletionPolicy | None = 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.
Note
For managed knowledge bases, the only supported option is DELETE,
which is also the default.
data_source_configuration
class-attribute
instance-attribute
¶
data_source_configuration: DataSourceConfiguration | None = None
The connection configuration for the data source.
description
class-attribute
instance-attribute
¶
description: str | None = None
A description of the data source.
knowledge_base_id
class-attribute
instance-attribute
¶
knowledge_base_id: str | None = None
The unique identifier of the knowledge base to which to add the data source.
server_side_encryption_configuration
class-attribute
instance-attribute
¶
server_side_encryption_configuration: ServerSideEncryptionConfiguration | None = None
Contains details about the server-side encryption for the data source.
vector_ingestion_configuration
class-attribute
instance-attribute
¶
vector_ingestion_configuration: VectorIngestionConfiguration | None = None
Contains details about how to ingest the documents in the data source.