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 | Definition of AWS::QBusiness::DataSource Resource Type |
Id | aws.qbusiness.data_sources |
Fields
Name | Datatype | Description |
---|---|---|
application_id | string | |
configuration |
| |
created_at | string | |
data_source_arn | string | |
data_source_id | string | |
description | string | |
display_name | string | |
document_enrichment_configuration | object | |
index_id | string | |
role_arn | string | |
status | string | |
sync_schedule | string | |
tags | array | |
type | string | |
updated_at | string | |
vpc_configuration | object | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ApplicationId, IndexId, Configuration, DisplayName, 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,
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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.qbusiness.data_sources (
ApplicationId,
Configuration,
DisplayName,
IndexId,
region
)
SELECT
'{{ ApplicationId }}',
'{{ Configuration }}',
'{{ DisplayName }}',
'{{ IndexId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.qbusiness.data_sources (
ApplicationId,
Configuration,
Description,
DisplayName,
DocumentEnrichmentConfiguration,
IndexId,
RoleArn,
SyncSchedule,
Tags,
VpcConfiguration,
region
)
SELECT
'{{ ApplicationId }}',
'{{ Configuration }}',
'{{ Description }}',
'{{ DisplayName }}',
'{{ DocumentEnrichmentConfiguration }}',
'{{ IndexId }}',
'{{ RoleArn }}',
'{{ SyncSchedule }}',
'{{ Tags }}',
'{{ VpcConfiguration }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: data_source
props:
- name: ApplicationId
value: '{{ ApplicationId }}'
- name: Configuration
value: null
- name: Description
value: '{{ Description }}'
- name: DisplayName
value: '{{ DisplayName }}'
- name: DocumentEnrichmentConfiguration
value:
InlineConfigurations:
- Condition:
Key: '{{ Key }}'
Operator: '{{ Operator }}'
Value: null
Target:
Key: '{{ Key }}'
Value: null
AttributeValueOperator: '{{ AttributeValueOperator }}'
DocumentContentOperator: '{{ DocumentContentOperator }}'
PreExtractionHookConfiguration:
InvocationCondition: null
LambdaArn: '{{ LambdaArn }}'
S3BucketName: '{{ S3BucketName }}'
RoleArn: '{{ RoleArn }}'
PostExtractionHookConfiguration: null
- name: IndexId
value: '{{ IndexId }}'
- name: RoleArn
value: '{{ RoleArn }}'
- name: SyncSchedule
value: '{{ SyncSchedule }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: VpcConfiguration
value:
SubnetIds:
- '{{ SubnetIds[0] }}'
SecurityGroupIds:
- '{{ SecurityGroupIds[0] }}'
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