data_sources
Creates, updates, deletes or gets a data_source
resource or lists data_sources
in a region
Overview
Name | data_sources |
Type | Resource |
Description | Kendra DataSource |
Id | aws.kendra.data_sources |
Fields
Name | Datatype | Description |
---|---|---|
id | string | Unique ID of index |
arn | string | |
name | string | Name of index |
index_id | string | Unique ID of Index |
type | string | Data source type |
data_source_configuration | object | |
description | string | |
schedule | string | Schedule |
role_arn | string | Role Arn |
tags | array | Tags for labeling the data source |
custom_document_enrichment_configuration | object | |
language_code | string | The code for a language. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, IndexId, Type, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.kendra.data_sources (
Name,
IndexId,
Type,
region
)
SELECT
'{{ Name }}',
'{{ IndexId }}',
'{{ Type }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.kendra.data_sources (
Name,
IndexId,
Type,
DataSourceConfiguration,
Description,
Schedule,
RoleArn,
Tags,
CustomDocumentEnrichmentConfiguration,
LanguageCode,
region
)
SELECT
'{{ Name }}',
'{{ IndexId }}',
'{{ Type }}',
'{{ DataSourceConfiguration }}',
'{{ Description }}',
'{{ Schedule }}',
'{{ RoleArn }}',
'{{ Tags }}',
'{{ CustomDocumentEnrichmentConfiguration }}',
'{{ LanguageCode }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: data_source
props:
- name: Name
value: '{{ Name }}'
- name: IndexId
value: '{{ IndexId }}'
- name: Type
value: '{{ Type }}'
- name: DataSourceConfiguration
value:
S3Configuration:
BucketName: '{{ BucketName }}'
InclusionPrefixes:
- '{{ InclusionPrefixes[0] }}'
InclusionPatterns: null
ExclusionPatterns: null
DocumentsMetadataConfiguration:
S3Prefix: '{{ S3Prefix }}'
AccessControlListConfiguration:
KeyPath: null
SharePointConfiguration:
SharePointVersion: '{{ SharePointVersion }}'
Urls:
- '{{ Urls[0] }}'
SecretArn: '{{ SecretArn }}'
CrawlAttachments: '{{ CrawlAttachments }}'
UseChangeLog: '{{ UseChangeLog }}'
InclusionPatterns: null
ExclusionPatterns: null
VpcConfiguration:
SubnetIds:
- '{{ SubnetIds[0] }}'
SecurityGroupIds:
- '{{ SecurityGroupIds[0] }}'
FieldMappings:
- DataSourceFieldName: '{{ DataSourceFieldName }}'
DateFieldFormat: '{{ DateFieldFormat }}'
IndexFieldName: '{{ IndexFieldName }}'
DocumentTitleFieldName: null
DisableLocalGroups: '{{ DisableLocalGroups }}'
SslCertificateS3Path:
Bucket: null
Key: null
SalesforceConfiguration:
ServerUrl: null
SecretArn: null
StandardObjectConfigurations:
- Name: '{{ Name }}'
DocumentDataFieldName: null
DocumentTitleFieldName: null
FieldMappings: null
KnowledgeArticleConfiguration:
IncludedStates:
- '{{ IncludedStates[0] }}'
StandardKnowledgeArticleTypeConfiguration:
DocumentDataFieldName: null
DocumentTitleFieldName: null
FieldMappings: null
CustomKnowledgeArticleTypeConfigurations:
- Name: '{{ Name }}'
DocumentDataFieldName: null
DocumentTitleFieldName: null
FieldMappings: null
ChatterFeedConfiguration:
DocumentDataFieldName: null
DocumentTitleFieldName: null
FieldMappings: null
IncludeFilterTypes:
- '{{ IncludeFilterTypes[0] }}'
CrawlAttachments: '{{ CrawlAttachments }}'
StandardObjectAttachmentConfiguration:
DocumentTitleFieldName: null
FieldMappings: null
IncludeAttachmentFilePatterns: null
ExcludeAttachmentFilePatterns: null
OneDriveConfiguration:
TenantDomain: '{{ TenantDomain }}'
SecretArn: null
OneDriveUsers:
OneDriveUserList:
- '{{ OneDriveUserList[0] }}'
OneDriveUserS3Path: null
InclusionPatterns: null
ExclusionPatterns: null
FieldMappings: null
DisableLocalGroups: null
ServiceNowConfiguration:
HostUrl: '{{ HostUrl }}'
SecretArn: null
ServiceNowBuildVersion: '{{ ServiceNowBuildVersion }}'
AuthenticationType: '{{ AuthenticationType }}'
KnowledgeArticleConfiguration:
CrawlAttachments: '{{ CrawlAttachments }}'
IncludeAttachmentFilePatterns: null
ExcludeAttachmentFilePatterns: null
DocumentDataFieldName: null
DocumentTitleFieldName: null
FieldMappings: null
FilterQuery: '{{ FilterQuery }}'
ServiceCatalogConfiguration:
CrawlAttachments: '{{ CrawlAttachments }}'
IncludeAttachmentFilePatterns: null
ExcludeAttachmentFilePatterns: null
DocumentDataFieldName: null
DocumentTitleFieldName: null
FieldMappings: null
DatabaseConfiguration:
DatabaseEngineType: '{{ DatabaseEngineType }}'
ConnectionConfiguration:
DatabaseHost: '{{ DatabaseHost }}'
DatabasePort: '{{ DatabasePort }}'
DatabaseName: '{{ DatabaseName }}'
TableName: '{{ TableName }}'
SecretArn: null
VpcConfiguration: null
ColumnConfiguration:
DocumentIdColumnName: '{{ DocumentIdColumnName }}'
DocumentDataColumnName: null
DocumentTitleColumnName: null
FieldMappings: null
ChangeDetectingColumns:
- null
AclConfiguration:
AllowedGroupsColumnName: null
SqlConfiguration:
QueryIdentifiersEnclosingOption: '{{ QueryIdentifiersEnclosingOption }}'
ConfluenceConfiguration:
ServerUrl: null
SecretArn: null
Version: '{{ Version }}'
SpaceConfiguration:
CrawlPersonalSpaces: '{{ CrawlPersonalSpaces }}'
CrawlArchivedSpaces: '{{ CrawlArchivedSpaces }}'
IncludeSpaces:
- '{{ IncludeSpaces[0] }}'
ExcludeSpaces: null
SpaceFieldMappings:
- DataSourceFieldName: '{{ DataSourceFieldName }}'
DateFieldFormat: null
IndexFieldName: null
PageConfiguration:
PageFieldMappings:
- DataSourceFieldName: '{{ DataSourceFieldName }}'
DateFieldFormat: null
IndexFieldName: null
BlogConfiguration:
BlogFieldMappings:
- DataSourceFieldName: '{{ DataSourceFieldName }}'
DateFieldFormat: null
IndexFieldName: null
AttachmentConfiguration:
CrawlAttachments: '{{ CrawlAttachments }}'
AttachmentFieldMappings:
- DataSourceFieldName: '{{ DataSourceFieldName }}'
DateFieldFormat: null
IndexFieldName: null
VpcConfiguration: null
InclusionPatterns: null
ExclusionPatterns: null
GoogleDriveConfiguration:
SecretArn: null
InclusionPatterns: null
ExclusionPatterns: null
FieldMappings: null
ExcludeMimeTypes:
- '{{ ExcludeMimeTypes[0] }}'
ExcludeUserAccounts:
- '{{ ExcludeUserAccounts[0] }}'
ExcludeSharedDrives:
- '{{ ExcludeSharedDrives[0] }}'
WebCrawlerConfiguration:
Urls:
SeedUrlConfiguration:
SeedUrls:
- '{{ SeedUrls[0] }}'
WebCrawlerMode: '{{ WebCrawlerMode }}'
SiteMapsConfiguration:
SiteMaps:
- '{{ SiteMaps[0] }}'
CrawlDepth: '{{ CrawlDepth }}'
MaxLinksPerPage: '{{ MaxLinksPerPage }}'
MaxContentSizePerPageInMegaBytes: null
MaxUrlsPerMinuteCrawlRate: '{{ MaxUrlsPerMinuteCrawlRate }}'
UrlInclusionPatterns: null
UrlExclusionPatterns: null
ProxyConfiguration:
Host: '{{ Host }}'
Port: '{{ Port }}'
Credentials: null
AuthenticationConfiguration:
BasicAuthentication:
- Host: '{{ Host }}'
Port: '{{ Port }}'
Credentials: null
WorkDocsConfiguration:
OrganizationId: '{{ OrganizationId }}'
CrawlComments: '{{ CrawlComments }}'
UseChangeLog: '{{ UseChangeLog }}'
InclusionPatterns: null
ExclusionPatterns: null
FieldMappings: null
- name: Description
value: '{{ Description }}'
- name: Schedule
value: '{{ Schedule }}'
- name: RoleArn
value: '{{ RoleArn }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: CustomDocumentEnrichmentConfiguration
value:
InlineConfigurations:
- Condition:
ConditionDocumentAttributeKey: '{{ ConditionDocumentAttributeKey }}'
Operator: '{{ Operator }}'
ConditionOnValue:
StringValue: '{{ StringValue }}'
StringListValue:
- '{{ StringListValue[0] }}'
LongValue: '{{ LongValue }}'
DateValue: '{{ DateValue }}'
Target:
TargetDocumentAttributeKey: null
TargetDocumentAttributeValueDeletion: '{{ TargetDocumentAttributeValueDeletion }}'
TargetDocumentAttributeValue: null
DocumentContentDeletion: '{{ DocumentContentDeletion }}'
PreExtractionHookConfiguration:
InvocationCondition: null
LambdaArn: '{{ LambdaArn }}'
S3Bucket: null
PostExtractionHookConfiguration: null
RoleArn: null
- name: LanguageCode
value: '{{ LanguageCode }}'
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