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 | aws.datazone.data_sources |
Fields
Name | Datatype | Description |
---|---|---|
asset_forms_input | array | The metadata forms that are to be attached to the assets that this data source works with. |
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 | undefined | 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. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, DomainIdentifier, ProjectIdentifier, EnvironmentIdentifier, Type, 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,
asset_forms_input,
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 aws.datazone.data_sources
WHERE region = 'us-east-1';
Gets all properties from an individual data_source
.
SELECT
region,
asset_forms_input,
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 aws.datazone.data_sources
WHERE region = 'us-east-1' AND data__Identifier = '<DomainId>|<Id>';
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.datazone.data_sources (
DomainIdentifier,
EnvironmentIdentifier,
Name,
ProjectIdentifier,
Type,
region
)
SELECT
'{{ DomainIdentifier }}',
'{{ EnvironmentIdentifier }}',
'{{ Name }}',
'{{ ProjectIdentifier }}',
'{{ Type }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.datazone.data_sources (
AssetFormsInput,
Description,
DomainIdentifier,
EnableSetting,
EnvironmentIdentifier,
Configuration,
Name,
ProjectIdentifier,
PublishOnImport,
Recommendation,
Schedule,
Type,
region
)
SELECT
'{{ AssetFormsInput }}',
'{{ Description }}',
'{{ DomainIdentifier }}',
'{{ EnableSetting }}',
'{{ EnvironmentIdentifier }}',
'{{ Configuration }}',
'{{ Name }}',
'{{ ProjectIdentifier }}',
'{{ PublishOnImport }}',
'{{ 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: AssetFormsInput
value:
- FormName: '{{ FormName }}'
TypeIdentifier: '{{ TypeIdentifier }}'
TypeRevision: '{{ TypeRevision }}'
Content: '{{ Content }}'
- name: Description
value: '{{ Description }}'
- name: DomainIdentifier
value: '{{ DomainIdentifier }}'
- name: EnableSetting
value: '{{ EnableSetting }}'
- name: EnvironmentIdentifier
value: '{{ EnvironmentIdentifier }}'
- name: Configuration
value: null
- name: Name
value: '{{ Name }}'
- name: ProjectIdentifier
value: '{{ ProjectIdentifier }}'
- name: PublishOnImport
value: '{{ PublishOnImport }}'
- name: Recommendation
value:
EnableBusinessNameGeneration: '{{ EnableBusinessNameGeneration }}'
- name: Schedule
value:
Timezone: '{{ Timezone }}'
Schedule: '{{ Schedule }}'
- name: Type
value: '{{ Type }}'
DELETE
example
/*+ delete */
DELETE FROM aws.datazone.data_sources
WHERE data__Identifier = '<DomainId|Id>'
AND region = 'us-east-1';
Permissions
To operate on the data_sources
resource, the following permissions are required:
Create
datazone:CreateDataSource,
iam:PassRole,
datazone:GetDataSource,
datazone:DeleteDataSource
Read
datazone:GetDataSource
Update
datazone:UpdateDataSource,
datazone:GetDataSource,
datazone:DeleteDataSource
Delete
datazone:DeleteDataSource,
datazone:GetDataSource
List
datazone:ListDataSources