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 | awscc.kendra.data_sources |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
| Name | Datatype | Description |
|---|---|---|
id | string | Unique ID of index |
index_id | string | Unique ID of Index |
region | string | AWS region. |
For more information, see AWS::Kendra::DataSource.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | data_sources | INSERT | Name, IndexId, Type, region |
delete_resource | data_sources | DELETE | Identifier, region |
update_resource | data_sources | UPDATE | Identifier, PatchDocument, region |
list_resources | data_sources_list_only | SELECT | region |
get_resource | data_sources | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 = '{{ region }}' AND
Identifier = '{{ id }}|{{ index_id }}';
Lists all data_sources in a region.
SELECT
region,
id,
index_id
FROM awscc.kendra.data_sources_list_only
WHERE
region = '{{ region }}';
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 awscc.kendra.data_sources (
Name,
IndexId,
Type,
region
)
SELECT
'{{ name }}',
'{{ index_id }}',
'{{ type }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.kendra.data_sources (
Name,
IndexId,
Type,
DataSourceConfiguration,
Description,
Schedule,
RoleArn,
Tags,
CustomDocumentEnrichmentConfiguration,
LanguageCode,
region
)
SELECT
'{{ name }}',
'{{ index_id }}',
'{{ type }}',
'{{ data_source_configuration }}',
'{{ description }}',
'{{ schedule }}',
'{{ role_arn }}',
'{{ tags }}',
'{{ custom_document_enrichment_configuration }}',
'{{ language_code }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
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: index_id
value: '{{ index_id }}'
- name: type
value: '{{ type }}'
- name: data_source_configuration
value:
s3_configuration:
bucket_name: '{{ bucket_name }}'
inclusion_prefixes:
- '{{ inclusion_prefixes[0] }}'
inclusion_patterns: null
exclusion_patterns: null
documents_metadata_configuration:
s3_prefix: '{{ s3_prefix }}'
access_control_list_configuration:
key_path: null
share_point_configuration:
share_point_version: '{{ share_point_version }}'
urls:
- '{{ urls[0] }}'
secret_arn: '{{ secret_arn }}'
crawl_attachments: '{{ crawl_attachments }}'
use_change_log: '{{ use_change_log }}'
inclusion_patterns: null
exclusion_patterns: null
vpc_configuration:
subnet_ids:
- '{{ subnet_ids[0] }}'
security_group_ids:
- '{{ security_group_ids[0] }}'
field_mappings:
- data_source_field_name: '{{ data_source_field_name }}'
date_field_format: '{{ date_field_format }}'
index_field_name: '{{ index_field_name }}'
document_title_field_name: null
disable_local_groups: '{{ disable_local_groups }}'
ssl_certificate_s3_path:
bucket: null
key: null
salesforce_configuration:
server_url: null
secret_arn: null
standard_object_configurations:
- name: '{{ name }}'
document_data_field_name: null
document_title_field_name: null
field_mappings: null
knowledge_article_configuration:
included_states:
- '{{ included_states[0] }}'
standard_knowledge_article_type_configuration:
document_data_field_name: null
document_title_field_name: null
field_mappings: null
custom_knowledge_article_type_configurations:
- name: '{{ name }}'
document_data_field_name: null
document_title_field_name: null
field_mappings: null
chatter_feed_configuration:
document_data_field_name: null
document_title_field_name: null
field_mappings: null
include_filter_types:
- '{{ include_filter_types[0] }}'
crawl_attachments: '{{ crawl_attachments }}'
standard_object_attachment_configuration:
document_title_field_name: null
field_mappings: null
include_attachment_file_patterns: null
exclude_attachment_file_patterns: null
one_drive_configuration:
tenant_domain: '{{ tenant_domain }}'
secret_arn: null
one_drive_users:
one_drive_user_list:
- '{{ one_drive_user_list[0] }}'
one_drive_user_s3_path: null
inclusion_patterns: null
exclusion_patterns: null
field_mappings: null
disable_local_groups: null
service_now_configuration:
host_url: '{{ host_url }}'
secret_arn: null
service_now_build_version: '{{ service_now_build_version }}'
authentication_type: '{{ authentication_type }}'
knowledge_article_configuration:
crawl_attachments: '{{ crawl_attachments }}'
include_attachment_file_patterns: null
exclude_attachment_file_patterns: null
document_data_field_name: null
document_title_field_name: null
field_mappings: null
filter_query: '{{ filter_query }}'
service_catalog_configuration:
crawl_attachments: '{{ crawl_attachments }}'
include_attachment_file_patterns: null
exclude_attachment_file_patterns: null
document_data_field_name: null
document_title_field_name: null
field_mappings: null
database_configuration:
database_engine_type: '{{ database_engine_type }}'
connection_configuration:
database_host: '{{ database_host }}'
database_port: '{{ database_port }}'
database_name: '{{ database_name }}'
table_name: '{{ table_name }}'
secret_arn: null
vpc_configuration: null
column_configuration:
document_id_column_name: '{{ document_id_column_name }}'
document_data_column_name: null
document_title_column_name: null
field_mappings: null
change_detecting_columns:
- null
acl_configuration:
allowed_groups_column_name: null
sql_configuration:
query_identifiers_enclosing_option: '{{ query_identifiers_enclosing_option }}'
confluence_configuration:
server_url: null
secret_arn: null
version: '{{ version }}'
space_configuration:
crawl_personal_spaces: '{{ crawl_personal_spaces }}'
crawl_archived_spaces: '{{ crawl_archived_spaces }}'
include_spaces:
- '{{ include_spaces[0] }}'
exclude_spaces: null
space_field_mappings:
- data_source_field_name: '{{ data_source_field_name }}'
date_field_format: null
index_field_name: null
page_configuration:
page_field_mappings:
- data_source_field_name: '{{ data_source_field_name }}'
date_field_format: null
index_field_name: null
blog_configuration:
blog_field_mappings:
- data_source_field_name: '{{ data_source_field_name }}'
date_field_format: null
index_field_name: null
attachment_configuration:
crawl_attachments: '{{ crawl_attachments }}'
attachment_field_mappings:
- data_source_field_name: '{{ data_source_field_name }}'
date_field_format: null
index_field_name: null
vpc_configuration: null
inclusion_patterns: null
exclusion_patterns: null
google_drive_configuration:
secret_arn: null
inclusion_patterns: null
exclusion_patterns: null
field_mappings: null
exclude_mime_types:
- '{{ exclude_mime_types[0] }}'
exclude_user_accounts:
- '{{ exclude_user_accounts[0] }}'
exclude_shared_drives:
- '{{ exclude_shared_drives[0] }}'
web_crawler_configuration:
urls:
seed_url_configuration:
seed_urls:
- '{{ seed_urls[0] }}'
web_crawler_mode: '{{ web_crawler_mode }}'
site_maps_configuration:
site_maps:
- '{{ site_maps[0] }}'
crawl_depth: '{{ crawl_depth }}'
max_links_per_page: '{{ max_links_per_page }}'
max_content_size_per_page_in_mega_bytes: null
max_urls_per_minute_crawl_rate: '{{ max_urls_per_minute_crawl_rate }}'
url_inclusion_patterns: null
url_exclusion_patterns: null
proxy_configuration:
host: '{{ host }}'
port: '{{ port }}'
credentials: null
authentication_configuration:
basic_authentication:
- host: '{{ host }}'
port: '{{ port }}'
credentials: null
work_docs_configuration:
organization_id: '{{ organization_id }}'
crawl_comments: '{{ crawl_comments }}'
use_change_log: '{{ use_change_log }}'
inclusion_patterns: null
exclusion_patterns: null
field_mappings: null
template_configuration:
template: {}
- name: description
value: '{{ description }}'
- name: schedule
value: '{{ schedule }}'
- name: role_arn
value: '{{ role_arn }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: custom_document_enrichment_configuration
value:
inline_configurations:
- condition:
condition_document_attribute_key: '{{ condition_document_attribute_key }}'
operator: '{{ operator }}'
condition_on_value:
string_value: '{{ string_value }}'
string_list_value:
- '{{ string_list_value[0] }}'
long_value: '{{ long_value }}'
date_value: '{{ date_value }}'
target:
target_document_attribute_key: null
target_document_attribute_value_deletion: '{{ target_document_attribute_value_deletion }}'
target_document_attribute_value: null
document_content_deletion: '{{ document_content_deletion }}'
pre_extraction_hook_configuration:
invocation_condition: null
lambda_arn: '{{ lambda_arn }}'
s3_bucket: null
post_extraction_hook_configuration: null
role_arn: null
- name: language_code
value: '{{ language_code }}'
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.kendra.data_sources
WHERE
Identifier = '{{ id }}|{{ index_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the data_sources resource, the following permissions are required:
- Create
- Read
- Delete
- List
- Update
kendra:CreateDataSource,
kendra:DescribeDataSource,
kendra:ListTagsForResource,
iam:PassRole,
kendra:TagResource
kendra:DescribeDataSource,
kendra:ListTagsForResource
kendra:DescribeDataSource,
kendra:DeleteDataSource
kendra:ListDataSources
kendra:DescribeDataSource,
kendra:UpdateDataSource,
kendra:ListTagsForResource,
kendra:TagResource,
kendra:UntagResource,
iam:PassRole