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::QBusiness::DataSource Resource Type
Idaws.qbusiness.data_sources

Fields

NameDatatypeDescription
application_idstring
configuration
created_atstring
data_source_arnstring
data_source_idstring
descriptionstring
display_namestring
document_enrichment_configurationobject
index_idstring
role_arnstring
statusstring
sync_schedulestring
tagsarray
typestring
updated_atstring
vpc_configurationobject
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTApplicationId, IndexId, Configuration, DisplayName, 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,
application_id,
configuration,
created_at,
data_source_arn,
data_source_id,
description,
display_name,
document_enrichment_configuration,
index_id,
role_arn,
status,
sync_schedule,
tags,
type,
updated_at,
vpc_configuration
FROM aws.qbusiness.data_sources
WHERE region = 'us-east-1';

Gets all properties from an individual data_source.

SELECT
region,
application_id,
configuration,
created_at,
data_source_arn,
data_source_id,
description,
display_name,
document_enrichment_configuration,
index_id,
role_arn,
status,
sync_schedule,
tags,
type,
updated_at,
vpc_configuration
FROM aws.qbusiness.data_sources
WHERE region = 'us-east-1' AND data__Identifier = '<ApplicationId>|<DataSourceId>|<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.qbusiness.data_sources (
ApplicationId,
Configuration,
DisplayName,
IndexId,
region
)
SELECT
'{{ ApplicationId }}',
'{{ Configuration }}',
'{{ DisplayName }}',
'{{ IndexId }}',
'{{ region }}';

DELETE example

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

Permissions

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

Create

iam:PassRole,
qbusiness:CreateDataSource,
qbusiness:GetDataSource,
qbusiness:ListTagsForResource,
qbusiness:TagResource

Read

qbusiness:GetDataSource,
qbusiness:ListTagsForResource

Update

iam:PassRole,
qbusiness:GetDataSource,
qbusiness:ListTagsForResource,
qbusiness:TagResource,
qbusiness:UntagResource,
qbusiness:UpdateDataSource

Delete

qbusiness:DeleteDataSource,
qbusiness:GetDataSource

List

qbusiness:ListDataSources