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 | A data source is used to import technical metadata of assets (data) from the source databases or data warehouses into Amazon DataZone. |
| Id | awscc.datazone.data_sources |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
asset_forms_input | array | The metadata forms that are to be attached to the assets that this data source works with. |
connection_id | string | The unique identifier of a connection used to fetch relevant parameters from connection during Datasource run |
connection_identifier | string | The unique identifier of a connection used to fetch relevant parameters from connection during Datasource run |
created_at | string | The timestamp of when the data source was created. |
description | string | The description of the data source. |
domain_id | string | The ID of the Amazon DataZone domain where the data source is created. |
domain_identifier | string | The ID of the Amazon DataZone domain where the data source is created. |
enable_setting | string | Specifies whether the data source is enabled. |
environment_id | string | The unique identifier of the Amazon DataZone environment to which the data source publishes assets. |
environment_identifier | string | The unique identifier of the Amazon DataZone environment to which the data source publishes assets. |
id | string | The unique identifier of the data source. |
configuration | object | Configuration of the data source. It can be set to either glueRunConfiguration or redshiftRunConfiguration. |
last_run_asset_count | number | The number of assets created by the data source during its last run. |
last_run_at | string | The timestamp that specifies when the data source was last run. |
last_run_status | string | The status of the last run of this data source. |
name | string | The name of the data source. |
project_id | string | The ID of the Amazon DataZone project to which the data source is added. |
project_identifier | string | The identifier of the Amazon DataZone project in which you want to add the data source. |
publish_on_import | boolean | Specifies whether the assets that this data source creates in the inventory are to be also automatically published to the catalog. |
recommendation | object | Specifies whether the business name generation is to be enabled for this data source. |
schedule | object | The schedule of the data source runs. |
status | string | The status of the data source. |
type | string | The type of the data source. |
updated_at | string | The timestamp of when this data source was updated. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
domain_id | string | The ID of the Amazon DataZone domain where the data source is created. |
id | string | The unique identifier of the data source. |
region | string | AWS region. |
For more information, see AWS::DataZone::DataSource.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | data_sources | INSERT | Name, DomainIdentifier, ProjectIdentifier, 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,
asset_forms_input,
connection_id,
connection_identifier,
created_at,
description,
domain_id,
domain_identifier,
enable_setting,
environment_id,
environment_identifier,
id,
configuration,
last_run_asset_count,
last_run_at,
last_run_status,
name,
project_id,
project_identifier,
publish_on_import,
recommendation,
schedule,
status,
type,
updated_at
FROM awscc.datazone.data_sources
WHERE
region = 'us-east-1' AND
Identifier = '{{ domain_id }}|{{ id }}';
Lists all data_sources in a region.
SELECT
region,
domain_id,
id
FROM awscc.datazone.data_sources_list_only
WHERE
region = 'us-east-1';
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.datazone.data_sources (
DomainIdentifier,
Name,
ProjectIdentifier,
Type,
region
)
SELECT
'{{ domain_identifier }}',
'{{ name }}',
'{{ project_identifier }}',
'{{ type }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.datazone.data_sources (
AssetFormsInput,
ConnectionIdentifier,
Description,
DomainIdentifier,
EnableSetting,
EnvironmentIdentifier,
Configuration,
Name,
ProjectIdentifier,
PublishOnImport,
Recommendation,
Schedule,
Type,
region
)
SELECT
'{{ asset_forms_input }}',
'{{ connection_identifier }}',
'{{ description }}',
'{{ domain_identifier }}',
'{{ enable_setting }}',
'{{ environment_identifier }}',
'{{ configuration }}',
'{{ name }}',
'{{ project_identifier }}',
'{{ publish_on_import }}',
'{{ recommendation }}',
'{{ schedule }}',
'{{ type }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: data_source
props:
- name: asset_forms_input
value:
- form_name: '{{ form_name }}'
type_identifier: '{{ type_identifier }}'
type_revision: '{{ type_revision }}'
content: '{{ content }}'
- name: connection_identifier
value: '{{ connection_identifier }}'
- name: description
value: '{{ description }}'
- name: domain_identifier
value: '{{ domain_identifier }}'
- name: enable_setting
value: '{{ enable_setting }}'
- name: environment_identifier
value: '{{ environment_identifier }}'
- name: configuration
value: null
- name: name
value: '{{ name }}'
- name: project_identifier
value: '{{ project_identifier }}'
- name: publish_on_import
value: '{{ publish_on_import }}'
- name: recommendation
value:
enable_business_name_generation: '{{ enable_business_name_generation }}'
- name: schedule
value:
timezone: '{{ timezone }}'
schedule: '{{ schedule }}'
- name: type
value: '{{ type }}'
UPDATE example
Use the following StackQL query and manifest file to update a data_source resource, using stack-deploy.
/*+ update */
UPDATE awscc.datazone.data_sources
SET PatchDocument = string('{{ {
"AssetFormsInput": asset_forms_input,
"Description": description,
"EnableSetting": enable_setting,
"Configuration": configuration,
"Name": name,
"PublishOnImport": publish_on_import,
"Recommendation": recommendation,
"Schedule": schedule
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ domain_id }}|{{ id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.datazone.data_sources
WHERE
Identifier = '{{ domain_id }}|{{ id }}' AND
region = 'us-east-1';
Permissions
To operate on the data_sources resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
datazone:CreateDataSource,
iam:PassRole,
datazone:GetDataSource,
datazone:DeleteDataSource
datazone:GetDataSource
datazone:UpdateDataSource,
datazone:GetDataSource,
datazone:DeleteDataSource
datazone:DeleteDataSource,
datazone:GetDataSource
datazone:ListDataSources