data_sources
Creates, updates, deletes, gets or lists a data_sources resource.
Overview
| Name | data_sources |
| Type | Resource |
| Id | aws.qbusiness.data_sources |
Fields
The following fields are returned by SELECT queries:
- get_data_source
- list_data_sources
| Name | Datatype | Description |
|---|---|---|
application_id | string | The identifier of the Amazon Q Business application. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9-]{35}</code>) |
configuration | object | Provides the configuration information for an Amazon Q Business data source. |
created_at | string (date-time) | The Unix timestamp when the data source connector was created. |
data_source_arn | string | The Amazon Resource Name (ARN) of the data source. (pattern: <code>arn:[a-z0-9-.]{1,63}:[a-z0-9-.]{0,63}:[a-z0-9-.]{0,63}:[a-z0-9-.]{0,63}:[^/].{0,1023}</code>) |
data_source_id | string | The identifier of the data source connector. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9-]{35}</code>) |
description | string | The description for the data source connector. (pattern: <code>[\s\S]*</code>) |
display_name | string | The name for the data source connector. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9_-]*</code>) |
document_enrichment_configuration | object | Provides the configuration information for altering document metadata and content during the document ingestion process. For more information, see Custom document enrichment. |
error | object | Provides information about a Amazon Q Business request error. |
index_id | string | The identifier of the index linked to the data source connector. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9-]{35}</code>) |
media_extraction_configuration | object | The configuration for extracting information from media in documents. |
role_arn | string | The Amazon Resource Name (ARN) of the role with permission to access the data source and required resources. (pattern: <code>arn:[a-z0-9-.]{1,63}:[a-z0-9-.]{0,63}:[a-z0-9-.]{0,63}:[a-z0-9-.]{0,63}:[^/].{0,1023}</code>) |
status | string | The current status of the data source connector. When the Status field value is FAILED, the ErrorMessage field contains a description of the error that caused the data source connector to fail. (PENDING_CREATION, CREATING, ACTIVE, DELETING, FAILED, UPDATING) |
sync_schedule | string | The schedule for Amazon Q Business to update the index. (pattern: <code>[\s\S]*</code>) |
type_ | string | The type of the data source connector. For example, S3. |
updated_at | string (date-time) | The Unix timestamp when the data source connector was last updated. |
vpc_configuration | object | Provides configuration information needed to connect to an Amazon VPC (Virtual Private Cloud). |
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The Unix timestamp when the Amazon Q Business data source was created. |
data_source_id | string | The identifier of the Amazon Q Business data source. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9-]{35}</code>) |
display_name | string | The name of the Amazon Q Business data source. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9_-]*</code>) |
status | string | The status of the Amazon Q Business data source. (PENDING_CREATION, CREATING, ACTIVE, DELETING, FAILED, UPDATING) |
type_ | string | The type of the Amazon Q Business data source. |
updated_at | string (date-time) | The Unix timestamp when the Amazon Q Business data source was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_data_source | select | application_id, index_id, data_source_id, region | Gets information about an existing Amazon Q Business data source connector. | |
list_data_sources | select | application_id, index_id, region | nextToken, maxResults | Lists the Amazon Q Business data source connectors that you have created. |
create_data_source | insert | application_id, index_id, region, displayName, configuration | Creates a data source connector for an Amazon Q Business application. CreateDataSource is a synchronous operation. The operation returns 200 if the data source was successfully created. Otherwise, an exception is raised. | |
update_data_source | update | application_id, index_id, data_source_id, region | Updates an existing Amazon Q Business data source connector. | |
delete_data_source | delete | application_id, index_id, data_source_id, region | Deletes an Amazon Q Business data source connector. While the data source is being deleted, the Status field returned by a call to the DescribeDataSource API is set to DELETING. | |
start_data_source_sync_job | exec | data_source_id, application_id, index_id, region | Starts a data source connector synchronization job. If a synchronization job is already in progress, Amazon Q Business returns a ConflictException. | |
stop_data_source_sync_job | exec | data_source_id, application_id, index_id, region | Stops an Amazon Q Business data source connector synchronization job already in progress. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
application_id | string | The identifier of the Amazon Q Business application that the data source is connected to. |
data_source_id | string | The identifier of the data source connector. |
index_id | string | The identifier of the index used with the Amazon Q Business data source connector. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of data source connectors to return. |
nextToken | string | If the maxResults response was incomplete because there is more data to retrieve, Amazon Q Business returns a pagination token in the response. You can use this pagination token to retrieve the next set of Amazon Q Business data source connectors. |
SELECT examples
- get_data_source
- list_data_sources
Gets information about an existing Amazon Q Business data source connector.
SELECT
application_id,
configuration,
created_at,
data_source_arn,
data_source_id,
description,
display_name,
document_enrichment_configuration,
error,
index_id,
media_extraction_configuration,
role_arn,
status,
sync_schedule,
type_,
updated_at,
vpc_configuration
FROM aws.qbusiness.data_sources
WHERE application_id = '{{ application_id }}' -- required
AND index_id = '{{ index_id }}' -- required
AND data_source_id = '{{ data_source_id }}' -- required
AND region = '{{ region }}' -- required
;
Lists the Amazon Q Business data source connectors that you have created.
SELECT
created_at,
data_source_id,
display_name,
status,
type_,
updated_at
FROM aws.qbusiness.data_sources
WHERE application_id = '{{ application_id }}' -- required
AND index_id = '{{ index_id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_data_source
- Manifest
Creates a data source connector for an Amazon Q Business application. CreateDataSource is a synchronous operation. The operation returns 200 if the data source was successfully created. Otherwise, an exception is raised.
INSERT INTO aws.qbusiness.data_sources (
displayName,
configuration,
vpcConfiguration,
description,
tags,
syncSchedule,
roleArn,
clientToken,
documentEnrichmentConfiguration,
mediaExtractionConfiguration,
application_id,
index_id,
region
)
SELECT
'{{ displayName }}' /* required */,
'{{ configuration }}' /* required */,
'{{ vpcConfiguration }}',
'{{ description }}',
'{{ tags }}',
'{{ syncSchedule }}',
'{{ roleArn }}',
'{{ clientToken }}',
'{{ documentEnrichmentConfiguration }}',
'{{ mediaExtractionConfiguration }}',
'{{ application_id }}',
'{{ index_id }}',
'{{ region }}'
RETURNING
data_source_arn,
data_source_id
;
# Description fields are for documentation purposes
- name: data_sources
props:
- name: application_id
value: "{{ application_id }}"
description: Required parameter for the data_sources resource.
- name: index_id
value: "{{ index_id }}"
description: Required parameter for the data_sources resource.
- name: region
value: "{{ region }}"
description: Required parameter for the data_sources resource.
- name: displayName
value: "{{ displayName }}"
- name: configuration
value: "{{ configuration }}"
description: |
Provides the configuration information for an Amazon Q Business data source.
- name: vpcConfiguration
description: |
Provides configuration information needed to connect to an Amazon VPC (Virtual Private Cloud).
value:
subnetIds:
- "{{ subnetIds }}"
securityGroupIds:
- "{{ securityGroupIds }}"
- name: description
value: "{{ description }}"
- name: tags
value:
- key: "{{ key }}"
value: "{{ value }}"
- name: syncSchedule
value: "{{ syncSchedule }}"
- name: roleArn
value: "{{ roleArn }}"
- name: clientToken
value: "{{ clientToken }}"
- name: documentEnrichmentConfiguration
description: |
Provides the configuration information for altering document metadata and content during the document ingestion process. For more information, see Custom document enrichment.
value:
inlineConfigurations:
- condition:
key: "{{ key }}"
operator: "{{ operator }}"
value:
stringValue: "{{ stringValue }}"
stringListValue:
- "{{ stringListValue }}"
longValue: {{ longValue }}
dateValue: "{{ dateValue }}"
target:
key: "{{ key }}"
value:
stringValue: "{{ stringValue }}"
stringListValue:
- "{{ stringListValue }}"
longValue: {{ longValue }}
dateValue: "{{ dateValue }}"
attributeValueOperator: "{{ attributeValueOperator }}"
documentContentOperator: "{{ documentContentOperator }}"
preExtractionHookConfiguration:
invocationCondition:
key: "{{ key }}"
operator: "{{ operator }}"
value:
stringValue: "{{ stringValue }}"
stringListValue:
- "{{ stringListValue }}"
longValue: {{ longValue }}
dateValue: "{{ dateValue }}"
lambdaArn: "{{ lambdaArn }}"
s3BucketName: "{{ s3BucketName }}"
roleArn: "{{ roleArn }}"
postExtractionHookConfiguration:
invocationCondition:
key: "{{ key }}"
operator: "{{ operator }}"
value:
stringValue: "{{ stringValue }}"
stringListValue:
- "{{ stringListValue }}"
longValue: {{ longValue }}
dateValue: "{{ dateValue }}"
lambdaArn: "{{ lambdaArn }}"
s3BucketName: "{{ s3BucketName }}"
roleArn: "{{ roleArn }}"
- name: mediaExtractionConfiguration
description: |
The configuration for extracting information from media in documents.
value:
imageExtractionConfiguration:
imageExtractionStatus: "{{ imageExtractionStatus }}"
audioExtractionConfiguration:
audioExtractionStatus: "{{ audioExtractionStatus }}"
videoExtractionConfiguration:
videoExtractionStatus: "{{ videoExtractionStatus }}"
UPDATE examples
- update_data_source
Updates an existing Amazon Q Business data source connector.
UPDATE aws.qbusiness.data_sources
SET
displayName = '{{ displayName }}',
configuration = '{{ configuration }}',
vpcConfiguration = '{{ vpcConfiguration }}',
description = '{{ description }}',
syncSchedule = '{{ syncSchedule }}',
roleArn = '{{ roleArn }}',
documentEnrichmentConfiguration = '{{ documentEnrichmentConfiguration }}',
mediaExtractionConfiguration = '{{ mediaExtractionConfiguration }}'
WHERE
application_id = '{{ application_id }}' --required
AND index_id = '{{ index_id }}' --required
AND data_source_id = '{{ data_source_id }}' --required
AND region = '{{ region }}' --required;
DELETE examples
- delete_data_source
Deletes an Amazon Q Business data source connector. While the data source is being deleted, the Status field returned by a call to the DescribeDataSource API is set to DELETING.
DELETE FROM aws.qbusiness.data_sources
WHERE application_id = '{{ application_id }}' --required
AND index_id = '{{ index_id }}' --required
AND data_source_id = '{{ data_source_id }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- start_data_source_sync_job
- stop_data_source_sync_job
Starts a data source connector synchronization job. If a synchronization job is already in progress, Amazon Q Business returns a ConflictException.
EXEC aws.qbusiness.data_sources.start_data_source_sync_job
@data_source_id='{{ data_source_id }}' --required,
@application_id='{{ application_id }}' --required,
@index_id='{{ index_id }}' --required,
@region='{{ region }}' --required
;
Stops an Amazon Q Business data source connector synchronization job already in progress.
EXEC aws.qbusiness.data_sources.stop_data_source_sync_job
@data_source_id='{{ data_source_id }}' --required,
@application_id='{{ application_id }}' --required,
@index_id='{{ index_id }}' --required,
@region='{{ region }}' --required
;