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
DescriptionKendra DataSource
Idawscc.kendra.data_sources

Fields

NameDatatypeDescription
idstringUnique ID of index
arnstring
namestringName of index
index_idstringUnique ID of Index
typestringData source type
data_source_configurationobject
descriptionstring
schedulestringSchedule
role_arnstringRole Arn
tagsarrayTags for labeling the data source
custom_document_enrichment_configurationobject
language_codestringThe code for a language.
regionstringAWS region.

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

Methods

NameResourceAccessible byRequired Params
create_resourcedata_sourcesINSERTName, IndexId, Type, 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,
id,
arn,
name,
index_id,
type,
data_source_configuration,
description,
schedule,
role_arn,
tags,
custom_document_enrichment_configuration,
language_code
FROM awscc.kendra.data_sources
WHERE
region = 'us-east-1' AND
Identifier = '{{ id }}|{{ index_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.kendra.data_sources (
Name,
IndexId,
Type,
region
)
SELECT
'{{ name }}',
'{{ index_id }}',
'{{ type }}',
'{{ region }}';

UPDATE example

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

/*+ update */
UPDATE awscc.kendra.data_sources
SET PatchDocument = string('{{ {
"Name": name,
"DataSourceConfiguration": data_source_configuration,
"Description": description,
"Schedule": schedule,
"RoleArn": role_arn,
"Tags": tags,
"CustomDocumentEnrichmentConfiguration": custom_document_enrichment_configuration,
"LanguageCode": language_code
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}|{{ index_id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.kendra.data_sources
WHERE
Identifier = '{{ id }}|{{ index_id }}' AND
region = 'us-east-1';

Permissions

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

kendra:CreateDataSource,
kendra:DescribeDataSource,
kendra:ListTagsForResource,
iam:PassRole,
kendra:TagResource