data_sets
Creates, updates, deletes, gets or lists a data_sets resource.
Overview
| Name | data_sets |
| Type | Resource |
| Id | aws.dataexchange.data_sets |
Fields
The following fields are returned by SELECT queries:
- get_data_set
- list_data_sets
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN for the data set. |
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 data set was created, in ISO 8601 format. |
description | string | The description for the data set. |
id | string | The unique identifier for the data set. (pattern: <code>[a-zA-Z0-9]{30,40}</code>) |
name | string | The name of the data set. |
origin | string | A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for subscribers). (OWNED, ENTITLED) |
origin_details | object | If the origin of this data set is ENTITLED, includes the details for the product on AWS Marketplace. |
source_id | string | The data set ID of the owned data set corresponding to the entitled data set being viewed. This parameter is returned when a data set owner is viewing the entitled copy of its owned data set. (pattern: <code>[a-zA-Z0-9]{30,40}</code>) |
tags | object | The tags for the data set. |
updated_at | string (date-time) | The date and time that the data set was last updated, in ISO 8601 format. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN for the data set. |
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 data set was created, in ISO 8601 format. |
description | string | The description for the data set. |
id | string | The unique identifier for the data set. (pattern: <code>[a-zA-Z0-9]{30,40}</code>) |
name | string | The name of the data set. |
origin | string | A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for subscribers). (OWNED, ENTITLED) |
origin_details | object | If the origin of this data set is ENTITLED, includes the details for the product on AWS Marketplace. |
source_id | string | The data set ID of the owned data set corresponding to the entitled data set being viewed. This parameter is returned when a data set owner is viewing the entitled copy of its owned data set. (pattern: <code>[a-zA-Z0-9]{30,40}</code>) |
updated_at | string (date-time) | The date and time that the data set 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_data_set | select | data_set_id, region | This operation returns information about a data set. | |
list_data_sets | select | region | maxResults, nextToken, origin | This operation lists your data sets. When listing by origin OWNED, results are sorted by CreatedAt in descending order. When listing by origin ENTITLED, there is no order. |
create_data_set | insert | region, AssetType | This operation creates a data set. | |
update_data_set | update | data_set_id, region | This operation updates a data set. | |
delete_data_set | delete | data_set_id, region | This operation deletes a data set. | |
send_data_set_notification | exec | data_set_id, region, Type | The type of event associated with the data set. |
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 |
|---|---|---|
data_set_id | string | Affected data set of the notification. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of results returned by a single call. |
nextToken | string | The token value retrieved from a previous call to access the next page of results. |
origin | string | A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for subscribers). |
SELECT examples
- get_data_set
- list_data_sets
This operation returns information about a data set.
SELECT
arn,
asset_type,
created_at,
description,
id,
name,
origin,
origin_details,
source_id,
tags,
updated_at
FROM aws.dataexchange.data_sets
WHERE data_set_id = '{{ data_set_id }}' -- required
AND region = '{{ region }}' -- required
;
This operation lists your data sets. When listing by origin OWNED, results are sorted by CreatedAt in descending order. When listing by origin ENTITLED, there is no order.
SELECT
arn,
asset_type,
created_at,
description,
id,
name,
origin,
origin_details,
source_id,
updated_at
FROM aws.dataexchange.data_sets
WHERE region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
AND origin = '{{ origin }}'
;
INSERT examples
- create_data_set
- Manifest
This operation creates a data set.
INSERT INTO aws.dataexchange.data_sets (
AssetType,
Description,
Name,
Tags,
region
)
SELECT
'{{ AssetType }}' /* required */,
'{{ Description }}',
'{{ Name }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
arn,
asset_type,
created_at,
description,
id,
name,
origin,
origin_details,
source_id,
tags,
updated_at
;
# Description fields are for documentation purposes
- name: data_sets
props:
- name: region
value: "{{ region }}"
description: Required parameter for the data_sets resource.
- name: AssetType
value: "{{ AssetType }}"
valid_values: ['S3_SNAPSHOT', 'REDSHIFT_DATA_SHARE', 'API_GATEWAY_API', 'S3_DATA_ACCESS', 'LAKE_FORMATION_DATA_PERMISSION']
- name: Description
value: "{{ Description }}"
- name: Name
value: "{{ Name }}"
- name: Tags
value: "{{ Tags }}"
UPDATE examples
- update_data_set
This operation updates a data set.
UPDATE aws.dataexchange.data_sets
SET
Description = '{{ Description }}',
Name = '{{ Name }}'
WHERE
data_set_id = '{{ data_set_id }}' --required
AND region = '{{ region }}' --required
RETURNING
arn,
asset_type,
created_at,
description,
id,
name,
origin,
origin_details,
source_id,
updated_at;
DELETE examples
- delete_data_set
This operation deletes a data set.
DELETE FROM aws.dataexchange.data_sets
WHERE data_set_id = '{{ data_set_id }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- send_data_set_notification
The type of event associated with the data set.
EXEC aws.dataexchange.data_sets.send_data_set_notification
@data_set_id='{{ data_set_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"Scope": "{{ Scope }}",
"ClientToken": "{{ ClientToken }}",
"Comment": "{{ Comment }}",
"Details": "{{ Details }}",
"Type": "{{ Type }}"
}'
;