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
Idawscc.qbusiness.data_sources

Fields

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

For more information, see AWS::QBusiness::DataSource.

Methods

NameResourceAccessible byRequired Params
create_resourcedata_sourcesINSERTApplicationId, IndexId, Configuration, DisplayName, region
delete_resourcedata_sourcesDELETEIdentifier, region
update_resourcedata_sourcesUPDATEIdentifier, PatchDocument, region
list_resourcesdata_sources_list_onlySELECTregion
get_resourcedata_sourcesSELECTIdentifier, region

SELECT examples

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,
media_extraction_configuration,
index_id,
role_arn,
status,
sync_schedule,
tags,
type,
updated_at,
vpc_configuration
FROM awscc.qbusiness.data_sources
WHERE
region = '{{ region }}' AND
Identifier = '{{ application_id }}|{{ data_source_id }}|{{ index_id }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.qbusiness.data_sources (
ApplicationId,
Configuration,
DisplayName,
IndexId,
region
)
SELECT
'{{ application_id }}',
'{{ configuration }}',
'{{ display_name }}',
'{{ index_id }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

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

/*+ update */
UPDATE awscc.qbusiness.data_sources
SET PatchDocument = string('{{ {
"Configuration": configuration,
"Description": description,
"DisplayName": display_name,
"DocumentEnrichmentConfiguration": document_enrichment_configuration,
"MediaExtractionConfiguration": media_extraction_configuration,
"RoleArn": role_arn,
"SyncSchedule": sync_schedule,
"Tags": tags,
"VpcConfiguration": vpc_configuration
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ application_id }}|{{ data_source_id }}|{{ index_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.qbusiness.data_sources
WHERE
Identifier = '{{ application_id }}|{{ data_source_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:

ParameterDescription
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:

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