Skip to main content

data_sources

Creates, updates, deletes or gets a data_source resource or lists data_sources in a region

Overview

Namedata_sources
TypeResource
DescriptionDefinition of AWS::Bedrock::DataSource Resource Type
Idawscc.bedrock.data_sources

Fields

NameDatatypeDescription
data_source_configurationobjectSpecifies a raw data source location to ingest.
data_source_idstringIdentifier for a resource.
descriptionstringDescription of the Resource.
knowledge_base_idstringThe unique identifier of the knowledge base to which to add the data source.
data_source_statusstringThe status of a data source.
namestringThe name of the data source.
server_side_encryption_configurationobjectContains details about the server-side encryption for the data source.
vector_ingestion_configurationobjectDetails about how to chunk the documents in the data source. A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried.
data_deletion_policystringThe deletion policy for the data source.
created_atstringThe time at which the data source was created.
updated_atstringThe time at which the knowledge base was last updated.
failure_reasonsarrayThe details of the failure reasons related to the data source.
regionstringAWS region.

For more information, see AWS::Bedrock::DataSource.

Methods

NameResourceAccessible byRequired Params
create_resourcedata_sourcesINSERTDataSourceConfiguration, Name, KnowledgeBaseId, region
delete_resourcedata_sourcesDELETEIdentifier, region
update_resourcedata_sourcesUPDATEIdentifier, PatchDocument, region
list_resourcesdata_sources_list_onlySELECTregion
get_resourcedata_sourcesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual data_source.

SELECT
region,
data_source_configuration,
data_source_id,
description,
knowledge_base_id,
data_source_status,
name,
server_side_encryption_configuration,
vector_ingestion_configuration,
data_deletion_policy,
created_at,
updated_at,
failure_reasons
FROM awscc.bedrock.data_sources
WHERE
region = 'us-east-1' AND
Identifier = '{{ knowledge_base_id }}|{{ data_source_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new data_source resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.bedrock.data_sources (
DataSourceConfiguration,
KnowledgeBaseId,
Name,
region
)
SELECT
'{{ data_source_configuration }}',
'{{ knowledge_base_id }}',
'{{ name }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a data_source resource, using stack-deploy.

/*+ update */
UPDATE awscc.bedrock.data_sources
SET PatchDocument = string('{{ {
"Description": description,
"Name": name,
"ServerSideEncryptionConfiguration": server_side_encryption_configuration,
"DataDeletionPolicy": data_deletion_policy
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ knowledge_base_id }}|{{ data_source_id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.bedrock.data_sources
WHERE
Identifier = '{{ knowledge_base_id }}|{{ data_source_id }}' AND
region = 'us-east-1';

Permissions

To operate on the data_sources resource, the following permissions are required:

bedrock:CreateDataSource,
bedrock:GetDataSource,
bedrock:GetKnowledgeBase,
kms:GenerateDataKey