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
Idaws.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.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, IndexId, Type, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all data_sources in a region.

SELECT
region,
id,
arn,
name,
index_id,
type,
data_source_configuration,
description,
schedule,
role_arn,
tags,
custom_document_enrichment_configuration,
language_code
FROM aws.kendra.data_sources
WHERE region = 'us-east-1';

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 aws.kendra.data_sources
WHERE region = 'us-east-1' AND data__Identifier = '<Id>|<IndexId>';

INSERT example

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

/*+ create */
INSERT INTO aws.kendra.data_sources (
Name,
IndexId,
Type,
region
)
SELECT
'{{ Name }}',
'{{ IndexId }}',
'{{ Type }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.kendra.data_sources
WHERE data__Identifier = '<Id|IndexId>'
AND region = 'us-east-1';

Permissions

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

Create

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

Read

kendra:DescribeDataSource,
kendra:ListTagsForResource

Delete

kendra:DescribeDataSource,
kendra:DeleteDataSource

List

kendra:ListDataSources

Update

kendra:DescribeDataSource,
kendra:UpdateDataSource,
kendra:ListTagsForResource,
kendra:TagResource,
kendra:UntagResource,
iam:PassRole