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
DescriptionA data source is used to import technical metadata of assets (data) from the source databases or data warehouses into Amazon DataZone.
Idaws.datazone.data_sources

Fields

NameDatatypeDescription
asset_forms_inputarrayThe metadata forms that are to be attached to the assets that this data source works with.
created_atstringThe timestamp of when the data source was created.
descriptionstringThe description of the data source.
domain_idstringThe ID of the Amazon DataZone domain where the data source is created.
domain_identifierstringThe ID of the Amazon DataZone domain where the data source is created.
enable_settingstringSpecifies whether the data source is enabled.
environment_idstringThe unique identifier of the Amazon DataZone environment to which the data source publishes assets.
environment_identifierstringThe unique identifier of the Amazon DataZone environment to which the data source publishes assets.
idstringThe unique identifier of the data source.
configurationundefinedConfiguration of the data source. It can be set to either glueRunConfiguration or redshiftRunConfiguration.
last_run_asset_countnumberThe number of assets created by the data source during its last run.
last_run_atstringThe timestamp that specifies when the data source was last run.
last_run_statusstringThe status of the last run of this data source.
namestringThe name of the data source.
project_idstringThe ID of the Amazon DataZone project to which the data source is added.
project_identifierstringThe identifier of the Amazon DataZone project in which you want to add the data source.
publish_on_importbooleanSpecifies whether the assets that this data source creates in the inventory are to be also automatically published to the catalog.
recommendationobjectSpecifies whether the business name generation is to be enabled for this data source.
scheduleobjectThe schedule of the data source runs.
statusstringThe status of the data source.
typestringThe type of the data source.
updated_atstringThe timestamp of when this data source was updated.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, DomainIdentifier, ProjectIdentifier, EnvironmentIdentifier, Type, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.datazone.data_sources (
DomainIdentifier,
EnvironmentIdentifier,
Name,
ProjectIdentifier,
Type,
region
)
SELECT
'{{ DomainIdentifier }}',
'{{ EnvironmentIdentifier }}',
'{{ Name }}',
'{{ ProjectIdentifier }}',
'{{ Type }}',
'{{ region }}';

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