Skip to main content

assets

Creates, updates, deletes, gets or lists an assets resource.

Overview

Nameassets
TypeResource
Idaws.dataexchange.assets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe ARN for the asset.
asset_detailsobjectDetails about the asset.
asset_typestringThe type of asset that is added to a data set. (S3_SNAPSHOT, REDSHIFT_DATA_SHARE, API_GATEWAY_API, S3_DATA_ACCESS, LAKE_FORMATION_DATA_PERMISSION)
created_atstring (date-time)The date and time that the asset was created, in ISO 8601 format.
data_set_idstringThe unique identifier for the data set associated with this asset. (pattern: <code>[a-zA-Z0-9]{30,40}</code>)
idstringThe unique identifier for the asset. (pattern: <code>[a-zA-Z0-9]{30,40}</code>)
namestringThe name of the asset. When importing from Amazon S3, the Amazon S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target Amazon S3 object key. When importing from Amazon API Gateway API, the API name is used as the asset name. When importing from Amazon Redshift, the datashare name is used as the asset name. When importing from AWS Lake Formation, the static values of "Database(s) included in the LF-tag policy" or "Table(s) included in the LF-tag policy" are used as the asset name.
revision_idstringThe unique identifier for the revision associated with this asset. (pattern: <code>[a-zA-Z0-9]{30,40}</code>)
source_idstringThe asset ID of the owned asset corresponding to the entitled asset being viewed. This parameter is returned when an asset owner is viewing the entitled copy of its owned asset. (pattern: <code>[a-zA-Z0-9]{30,40}</code>)
tagsobjectThe tags for the asset.
updated_atstring (date-time)The date and time that the asset was last updated, in ISO 8601 format.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_assetselectasset_id, data_set_id, revision_id, regionThis operation returns information about an asset.
update_assetupdateasset_id, data_set_id, revision_id, regionThis operation updates an asset.
delete_assetdeleteasset_id, data_set_id, revision_id, regionThis operation deletes an asset.

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
asset_idstringThe unique identifier for an asset.
data_set_idstringThe unique identifier for a data set.
regionstringAWS region (default: us-east-1)
revision_idstringThe unique identifier for a revision.

SELECT examples

This operation returns information about an asset.

SELECT
arn,
asset_details,
asset_type,
created_at,
data_set_id,
id,
name,
revision_id,
source_id,
tags,
updated_at
FROM aws.dataexchange.assets
WHERE asset_id = '{{ asset_id }}' -- required
AND data_set_id = '{{ data_set_id }}' -- required
AND revision_id = '{{ revision_id }}' -- required
AND region = '{{ region }}' -- required
;

UPDATE examples

This operation updates an asset.

UPDATE aws.dataexchange.assets
SET
Name = '{{ Name }}'
WHERE
asset_id = '{{ asset_id }}' --required
AND data_set_id = '{{ data_set_id }}' --required
AND revision_id = '{{ revision_id }}' --required
AND region = '{{ region }}' --required
RETURNING
arn,
asset_details,
asset_type,
created_at,
data_set_id,
id,
name,
revision_id,
source_id,
updated_at;

DELETE examples

This operation deletes an asset.

DELETE FROM aws.dataexchange.assets
WHERE asset_id = '{{ asset_id }}' --required
AND data_set_id = '{{ data_set_id }}' --required
AND revision_id = '{{ revision_id }}' --required
AND region = '{{ region }}' --required
;