datasets
Creates, updates, deletes or gets a dataset resource or lists datasets in a region
Overview
| Name | datasets |
| Type | Resource |
| Description | Resource Type definition for AWS::IoTAnalytics::Dataset |
| Id | awscc.iotanalytics.datasets |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
actions | array | |
late_data_rules | array | |
dataset_name | string | |
content_delivery_rules | array | |
triggers | array | |
versioning_configuration | object | |
id | string | |
retention_period | object | |
tags | array | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
dataset_name | string | |
region | string | AWS region. |
For more information, see AWS::IoTAnalytics::Dataset.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | datasets | INSERT | Actions, region |
delete_resource | datasets | DELETE | Identifier, region |
update_resource | datasets | UPDATE | Identifier, PatchDocument, region |
list_resources | datasets_list_only | SELECT | region |
get_resource | datasets | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual dataset.
SELECT
region,
actions,
late_data_rules,
dataset_name,
content_delivery_rules,
triggers,
versioning_configuration,
id,
retention_period,
tags
FROM awscc.iotanalytics.datasets
WHERE
region = 'us-east-1' AND
Identifier = '{{ dataset_name }}';
Lists all datasets in a region.
SELECT
region,
dataset_name
FROM awscc.iotanalytics.datasets_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new dataset resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.iotanalytics.datasets (
Actions,
region
)
SELECT
'{{ actions }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.iotanalytics.datasets (
Actions,
LateDataRules,
DatasetName,
ContentDeliveryRules,
Triggers,
VersioningConfiguration,
RetentionPeriod,
Tags,
region
)
SELECT
'{{ actions }}',
'{{ late_data_rules }}',
'{{ dataset_name }}',
'{{ content_delivery_rules }}',
'{{ triggers }}',
'{{ versioning_configuration }}',
'{{ retention_period }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: dataset
props:
- name: actions
value:
- action_name: '{{ action_name }}'
container_action:
variables:
- variable_name: '{{ variable_name }}'
dataset_content_version_value:
dataset_name: '{{ dataset_name }}'
string_value: '{{ string_value }}'
double_value: null
output_file_uri_value:
file_name: '{{ file_name }}'
execution_role_arn: '{{ execution_role_arn }}'
image: '{{ image }}'
resource_configuration:
volume_size_in_gb: '{{ volume_size_in_gb }}'
compute_type: '{{ compute_type }}'
query_action:
filters:
- filter: '{{ filter }}'
next: '{{ next }}'
name: '{{ name }}'
sql_query: '{{ sql_query }}'
- name: late_data_rules
value:
- rule_configuration:
delta_time_session_window_configuration:
timeout_in_minutes: '{{ timeout_in_minutes }}'
rule_name: '{{ rule_name }}'
- name: dataset_name
value: '{{ dataset_name }}'
- name: content_delivery_rules
value:
- destination:
iot_events_destination_configuration:
input_name: '{{ input_name }}'
role_arn: '{{ role_arn }}'
s3_destination_configuration:
glue_configuration:
database_name: '{{ database_name }}'
table_name: '{{ table_name }}'
bucket: '{{ bucket }}'
key: '{{ key }}'
role_arn: '{{ role_arn }}'
entry_name: '{{ entry_name }}'
- name: triggers
value:
- triggering_dataset:
dataset_name: '{{ dataset_name }}'
schedule:
schedule_expression: '{{ schedule_expression }}'
- name: versioning_configuration
value:
unlimited: '{{ unlimited }}'
max_versions: '{{ max_versions }}'
- name: retention_period
value:
number_of_days: '{{ number_of_days }}'
unlimited: '{{ unlimited }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a dataset resource, using stack-deploy.
/*+ update */
UPDATE awscc.iotanalytics.datasets
SET PatchDocument = string('{{ {
"Actions": actions,
"LateDataRules": late_data_rules,
"ContentDeliveryRules": content_delivery_rules,
"Triggers": triggers,
"VersioningConfiguration": versioning_configuration,
"RetentionPeriod": retention_period,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ dataset_name }}';
DELETE example
/*+ delete */
DELETE FROM awscc.iotanalytics.datasets
WHERE
Identifier = '{{ dataset_name }}' AND
region = 'us-east-1';
Permissions
To operate on the datasets resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
iotanalytics:CreateDataset
iotanalytics:DescribeDataset,
iotanalytics:ListTagsForResource
iotanalytics:UpdateDataset,
iotanalytics:TagResource,
iotanalytics:UntagResource
iotanalytics:DeleteDataset
iotanalytics:ListDatasets