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 the AWS::QuickSight::DataSource Resource Type. |
| Id | awscc.quicksight.data_sources |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
status | string | |
created_time | string | The time that this data source was created. |
error_info | object | Error information for the data source creation or update. |
last_updated_time | string | The last time that this data source was updated. |
folder_arns | array | |
name | string | |
data_source_parameters | object | This is a variant type structure. For this structure to be valid, only one of the |
type | string | |
vpc_connection_properties | object | VPC connection properties. |
alternate_data_source_parameters | array | stored with this data source. The credentials are applied in tandem with the data source |
aws_account_id | string | |
permissions | array | |
arn | string | The Amazon Resource Name (ARN) of the data source. |
ssl_properties | object | underlying data source. |
credentials | object | valid, only one of the attributes can be non-null. |
data_source_id | string | |
tags | array | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
aws_account_id | string | |
data_source_id | string | |
region | string | AWS region. |
For more information, see AWS::QuickSight::DataSource.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | data_sources | INSERT | Name, 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,
status,
created_time,
error_info,
last_updated_time,
folder_arns,
name,
data_source_parameters,
type,
vpc_connection_properties,
alternate_data_source_parameters,
aws_account_id,
permissions,
arn,
ssl_properties,
credentials,
data_source_id,
tags
FROM awscc.quicksight.data_sources
WHERE
region = '{{ region }}' AND
Identifier = '{{ aws_account_id }}|{{ data_source_id }}';
Lists all data_sources in a region.
SELECT
region,
aws_account_id,
data_source_id
FROM awscc.quicksight.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.quicksight.data_sources (
Name,
Type,
region
)
SELECT
'{{ name }}',
'{{ type }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.quicksight.data_sources (
ErrorInfo,
FolderArns,
Name,
DataSourceParameters,
Type,
VpcConnectionProperties,
AlternateDataSourceParameters,
AwsAccountId,
Permissions,
SslProperties,
Credentials,
DataSourceId,
Tags,
region
)
SELECT
'{{ error_info }}',
'{{ folder_arns }}',
'{{ name }}',
'{{ data_source_parameters }}',
'{{ type }}',
'{{ vpc_connection_properties }}',
'{{ alternate_data_source_parameters }}',
'{{ aws_account_id }}',
'{{ permissions }}',
'{{ ssl_properties }}',
'{{ credentials }}',
'{{ data_source_id }}',
'{{ tags }}',
'{{ 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: error_info
value:
type: '{{ type }}'
message: '{{ message }}'
- name: folder_arns
value:
- '{{ folder_arns[0] }}'
- name: name
value: '{{ name }}'
- name: data_source_parameters
value:
aurora_postgre_sql_parameters:
port: null
database: '{{ database }}'
host: '{{ host }}'
teradata_parameters:
port: null
database: '{{ database }}'
host: '{{ host }}'
rds_parameters:
instance_id: '{{ instance_id }}'
database: '{{ database }}'
athena_parameters:
work_group: '{{ work_group }}'
identity_center_configuration:
enable_identity_propagation: '{{ enable_identity_propagation }}'
role_arn: '{{ role_arn }}'
spark_parameters:
port: null
host: '{{ host }}'
maria_db_parameters:
port: null
database: '{{ database }}'
host: '{{ host }}'
oracle_parameters:
use_service_name: '{{ use_service_name }}'
port: null
database: '{{ database }}'
host: '{{ host }}'
presto_parameters:
port: null
host: '{{ host }}'
catalog: '{{ catalog }}'
starburst_parameters:
port: null
database_access_control_role: '{{ database_access_control_role }}'
product_type: '{{ product_type }}'
oauth_parameters:
token_provider_url: '{{ token_provider_url }}'
oauth_scope: '{{ oauth_scope }}'
identity_provider_vpc_connection_properties:
vpc_connection_arn: '{{ vpc_connection_arn }}'
identity_provider_resource_uri: '{{ identity_provider_resource_uri }}'
host: '{{ host }}'
catalog: '{{ catalog }}'
authentication_type: '{{ authentication_type }}'
redshift_parameters:
iam_parameters:
auto_create_database_user: '{{ auto_create_database_user }}'
database_user: '{{ database_user }}'
role_arn: '{{ role_arn }}'
database_groups:
- '{{ database_groups[0] }}'
cluster_id: '{{ cluster_id }}'
port: null
database: '{{ database }}'
host: '{{ host }}'
identity_center_configuration: null
my_sql_parameters:
port: null
database: '{{ database }}'
host: '{{ host }}'
sql_server_parameters:
port: null
database: '{{ database }}'
host: '{{ host }}'
snowflake_parameters:
warehouse: '{{ warehouse }}'
database_access_control_role: '{{ database_access_control_role }}'
database: '{{ database }}'
oauth_parameters: null
host: '{{ host }}'
authentication_type: null
amazon_elasticsearch_parameters:
domain: '{{ domain }}'
amazon_open_search_parameters:
domain: '{{ domain }}'
postgre_sql_parameters:
port: null
database: '{{ database }}'
host: '{{ host }}'
aurora_parameters:
port: null
database: '{{ database }}'
host: '{{ host }}'
s3_parameters:
manifest_file_location:
bucket: '{{ bucket }}'
key: '{{ key }}'
role_arn: '{{ role_arn }}'
trino_parameters:
port: null
host: '{{ host }}'
catalog: '{{ catalog }}'
databricks_parameters:
port: null
host: '{{ host }}'
sql_endpoint_path: '{{ sql_endpoint_path }}'
- name: type
value: '{{ type }}'
- name: vpc_connection_properties
value: null
- name: alternate_data_source_parameters
value:
- null
- name: aws_account_id
value: '{{ aws_account_id }}'
- name: permissions
value:
- principal: '{{ principal }}'
actions:
- '{{ actions[0] }}'
- name: ssl_properties
value:
disable_ssl: '{{ disable_ssl }}'
- name: credentials
value:
secret_arn: '{{ secret_arn }}'
copy_source_arn: '{{ copy_source_arn }}'
credential_pair:
alternate_data_source_parameters:
- null
username: '{{ username }}'
password: '{{ password }}'
- name: data_source_id
value: '{{ data_source_id }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a data_source resource, using stack-deploy.
/*+ update */
UPDATE awscc.quicksight.data_sources
SET PatchDocument = string('{{ {
"ErrorInfo": error_info,
"FolderArns": folder_arns,
"Name": name,
"DataSourceParameters": data_source_parameters,
"VpcConnectionProperties": vpc_connection_properties,
"AlternateDataSourceParameters": alternate_data_source_parameters,
"Permissions": permissions,
"SslProperties": ssl_properties,
"Credentials": credentials,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ aws_account_id }}|{{ data_source_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.quicksight.data_sources
WHERE
Identifier = '{{ aws_account_id }}|{{ data_source_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:
- Read
- Create
- Update
- List
- Delete
quicksight:DescribeDataSource,
quicksight:DescribeDataSourcePermissions,
quicksight:ListTagsForResource
quicksight:CreateDataSource,
quicksight:DescribeDataSource,
quicksight:DescribeDataSourcePermissions,
quicksight:TagResource,
quicksight:ListTagsForResource,
quicksight:CreateFolderMembership,
quicksight:DeleteFolderMembership,
quicksight:ListFoldersForResource
quicksight:DescribeDataSource,
quicksight:DescribeDataSourcePermissions,
quicksight:UpdateDataSource,
quicksight:UpdateDataSourcePermissions,
quicksight:CreateFolderMembership,
quicksight:DeleteFolderMembership,
quicksight:ListFoldersForResource,
quicksight:TagResource,
quicksight:UntagResource,
quicksight:ListTagsForResource
quicksight:DescribeDataSource,
quicksight:ListDataSources
quicksight:DescribeDataSource,
quicksight:DescribeDataSourcePermissions,
quicksight:DeleteDataSource,
quicksight:ListTagsForResource