create_data_source¶
Operation¶
create_data_source
¶
create_data_source(request: CreateDataSourceInput | CreateDataSourceInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateDataSourceInputDict]) -> 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 |
|---|---|---|---|
request
|
CreateDataSourceInput | CreateDataSourceInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[CreateDataSourceInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
CreateDataSourceOutput
|
An instance of |
create_data_source
async
¶
create_data_source(request: CreateDataSourceInput | CreateDataSourceInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateDataSourceInputDict]) -> 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 |
|---|---|---|---|
request
|
CreateDataSourceInput | CreateDataSourceInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[CreateDataSourceInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
CreateDataSourceOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
CreateDataSourceInputDict
¶
Bases: TypedDict
Dictionary form of CreateDataSourceInput.
Attributes¶
client_token
instance-attribute
¶
client_token: str | 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.
This field is autopopulated if not provided.
data_deletion_policy
instance-attribute
¶
data_deletion_policy: str | 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
instance-attribute
¶
data_source_configuration: Required[DataSourceConfiguration | DataSourceConfigurationDict]
The connection configuration for the data source.
knowledge_base_id
instance-attribute
¶
The unique identifier of the knowledge base to which to add the data source.
server_side_encryption_configuration
instance-attribute
¶
server_side_encryption_configuration: ServerSideEncryptionConfiguration | ServerSideEncryptionConfigurationDict | None
Contains details about the server-side encryption for the data source.
vector_ingestion_configuration
instance-attribute
¶
vector_ingestion_configuration: VectorIngestionConfiguration | VectorIngestionConfigurationDict | None
Contains details about how to ingest the documents in the data source.
CreateDataSourceInput
dataclass
¶
Bases: _SerdeShape
Dataclass for CreateDataSourceInput structure.
Attributes¶
client_token
class-attribute
instance-attribute
¶
client_token: str | 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.
This field is autopopulated if not provided.
data_deletion_policy
class-attribute
instance-attribute
¶
data_deletion_policy: str | 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 = ...
The connection configuration for the data source.
description
class-attribute
instance-attribute
¶
description: str | None = ...
A description of the data source.
knowledge_base_id
class-attribute
instance-attribute
¶
knowledge_base_id: str | 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 = ...
Contains details about the server-side encryption for the data source.
vector_ingestion_configuration
class-attribute
instance-attribute
¶
vector_ingestion_configuration: VectorIngestionConfiguration | None = ...
Contains details about how to ingest the documents in the data source.
Output¶
CreateDataSourceOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for CreateDataSourceOutput structure.