Skip to main content

data_sources

Creates, updates, deletes, gets or lists a data_sources resource.

Overview

Namedata_sources
TypeResource
Idaws.datazone.data_sources

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the data source.
connection_idstringThe connection ID that's part of the data source summary.
created_atstring (date-time)The timestamp of when the data source was created.
data_source_idstringThe ID of the data source. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>)
descriptionstringThe data source description.
domain_idstringThe ID of the Amazon DataZone domain in which the data source exists. (pattern: <code>dzd[-][a-zA-Z0-9-]{1,36}</code>)
enable_settingstringSpecifies whether the data source is enabled. (ENABLED, DISABLED)
environment_idstringThe ID of the environment in which the data source exists.
last_run_asset_countintegerThe count of the assets created during the last data source run.
last_run_atstring (date-time)The timestamp of when the data source run was last performed.
last_run_error_messageobjectThe details of the error message that is returned if the operation cannot be successfully completed.
last_run_statusstringThe status of the last data source run. (REQUESTED, RUNNING, FAILED, PARTIALLY_SUCCEEDED, SUCCESS)
scheduleobjectThe details of the schedule of the data source runs.
statusstringThe status of the data source. (CREATING, FAILED_CREATION, READY, UPDATING, FAILED_UPDATE, RUNNING, DELETING, FAILED_DELETION)
type_stringThe type of the data source.
updated_atstring (date-time)The timestamp of when the data source was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_data_sourcesselectdomain_identifier, projectIdentifier, regionenvironmentIdentifier, connectionIdentifier, type, status, name, nextToken, maxResultsLists data sources in Amazon DataZone.
get_data_sourceselectdomain_identifier, identifier, regionGets an Amazon DataZone data source.
create_data_sourceinsertdomain_identifier, region, name, projectIdentifier, typeCreates an Amazon DataZone data source.
update_data_sourceupdatedomain_identifier, identifier, regionUpdates the specified data source in Amazon DataZone.
delete_data_sourcedeletedomain_identifier, identifier, regionclientToken, retainPermissionsOnRevokeFailureDeletes a data source in Amazon DataZone.
start_data_source_runexecdomain_identifier, data_source_identifier, regionStart the run of the specified data source in Amazon DataZone.

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.

NameDatatypeDescription
data_source_identifierstringThe identifier of the data source.
domain_identifierstringThe identifier of the Amazon DataZone domain in which to start a data source run.
identifierstringThe identifier of the data source that is deleted.
projectIdentifierstringThe identifier of the project in which to list data sources.
regionstringAWS region (default: us-east-1)
clientTokenstringA unique, case-sensitive identifier that is provided to ensure the idempotency of the request.
connectionIdentifierstringThe ID of the connection.
environmentIdentifierstringThe identifier of the environment in which to list the data sources.
maxResultsintegerThe maximum number of data sources to return in a single call to ListDataSources. When the number of data sources to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to ListDataSources to list the next set of data sources.
namestringThe name of the data source.
nextTokenstringWhen the number of data sources is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of data sources, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListDataSources to list the next set of data sources.
retainPermissionsOnRevokeFailurebooleanSpecifies that the granted permissions are retained in case of a self-subscribe functionality failure for a data source.
statusstringThe status of the data source.
typestringThe type of the data source.

SELECT examples

Lists data sources in Amazon DataZone.

SELECT
name,
connection_id,
created_at,
data_source_id,
description,
domain_id,
enable_setting,
environment_id,
last_run_asset_count,
last_run_at,
last_run_error_message,
last_run_status,
schedule,
status,
type_,
updated_at
FROM aws.datazone.data_sources
WHERE domain_identifier = '{{ domain_identifier }}' -- required
AND projectIdentifier = '{{ projectIdentifier }}' -- required
AND region = '{{ region }}' -- required
AND environmentIdentifier = '{{ environmentIdentifier }}'
AND connectionIdentifier = '{{ connectionIdentifier }}'
AND type = '{{ type }}'
AND status = '{{ status }}'
AND name = '{{ name }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;

INSERT examples

Creates an Amazon DataZone data source.

INSERT INTO aws.datazone.data_sources (
name,
description,
projectIdentifier,
environmentIdentifier,
connectionIdentifier,
type,
configuration,
recommendation,
enableSetting,
schedule,
publishOnImport,
assetFormsInput,
clientToken,
domain_identifier,
region
)
SELECT
'{{ name }}' /* required */,
'{{ description }}',
'{{ projectIdentifier }}' /* required */,
'{{ environmentIdentifier }}',
'{{ connectionIdentifier }}',
'{{ type }}' /* required */,
'{{ configuration }}',
'{{ recommendation }}',
'{{ enableSetting }}',
'{{ schedule }}',
{{ publishOnImport }},
'{{ assetFormsInput }}',
'{{ clientToken }}',
'{{ domain_identifier }}',
'{{ region }}'
RETURNING
id,
name,
asset_forms_output,
configuration,
connection_id,
created_at,
description,
domain_id,
enable_setting,
environment_id,
error_message,
last_run_at,
last_run_error_message,
last_run_status,
project_id,
publish_on_import,
recommendation,
schedule,
status,
type_,
updated_at
;

UPDATE examples

Updates the specified data source in Amazon DataZone.

UPDATE aws.datazone.data_sources
SET
name = '{{ name }}',
description = '{{ description }}',
enableSetting = '{{ enableSetting }}',
publishOnImport = {{ publishOnImport }},
assetFormsInput = '{{ assetFormsInput }}',
schedule = '{{ schedule }}',
configuration = '{{ configuration }}',
recommendation = '{{ recommendation }}',
retainPermissionsOnRevokeFailure = {{ retainPermissionsOnRevokeFailure }}
WHERE
domain_identifier = '{{ domain_identifier }}' --required
AND identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
RETURNING
id,
name,
asset_forms_output,
configuration,
connection_id,
created_at,
description,
domain_id,
enable_setting,
environment_id,
error_message,
last_run_at,
last_run_error_message,
last_run_status,
project_id,
publish_on_import,
recommendation,
retain_permissions_on_revoke_failure,
schedule,
self_grant_status,
status,
type_,
updated_at;

DELETE examples

Deletes a data source in Amazon DataZone.

DELETE FROM aws.datazone.data_sources
WHERE domain_identifier = '{{ domain_identifier }}' --required
AND identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
AND clientToken = '{{ clientToken }}'
AND retainPermissionsOnRevokeFailure = '{{ retainPermissionsOnRevokeFailure }}'
;

Lifecycle Methods

Start the run of the specified data source in Amazon DataZone.

EXEC aws.datazone.data_sources.start_data_source_run
@domain_identifier='{{ domain_identifier }}' --required,
@data_source_identifier='{{ data_source_identifier }}' --required,
@region='{{ region }}' --required
@@json=
'{
"clientToken": "{{ clientToken }}"
}'
;