assets
Creates, updates, deletes, gets or lists an assets resource.
Overview
| Name | assets |
| Type | Resource |
| Id | aws.dataexchange.assets |
Fields
The following fields are returned by SELECT queries:
- get_asset
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN for the asset. |
asset_details | object | Details about the asset. |
asset_type | string | The 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_at | string (date-time) | The date and time that the asset was created, in ISO 8601 format. |
data_set_id | string | The unique identifier for the data set associated with this asset. (pattern: <code>[a-zA-Z0-9]{30,40}</code>) |
id | string | The unique identifier for the asset. (pattern: <code>[a-zA-Z0-9]{30,40}</code>) |
name | string | The 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_id | string | The unique identifier for the revision associated with this asset. (pattern: <code>[a-zA-Z0-9]{30,40}</code>) |
source_id | string | The 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>) |
tags | object | The tags for the asset. |
updated_at | string (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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_asset | select | asset_id, data_set_id, revision_id, region | This operation returns information about an asset. | |
update_asset | update | asset_id, data_set_id, revision_id, region | This operation updates an asset. | |
delete_asset | delete | asset_id, data_set_id, revision_id, region | This 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.
| Name | Datatype | Description |
|---|---|---|
asset_id | string | The unique identifier for an asset. |
data_set_id | string | The unique identifier for a data set. |
region | string | AWS region (default: us-east-1) |
revision_id | string | The unique identifier for a revision. |
SELECT examples
- get_asset
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
- update_asset
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
- delete_asset
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
;