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 | aws.iotanalytics.datasets |
Fields
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. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Actions, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all datasets
in a region.
SELECT
region,
actions,
late_data_rules,
dataset_name,
content_delivery_rules,
triggers,
versioning_configuration,
id,
retention_period,
tags
FROM aws.iotanalytics.datasets
WHERE region = 'us-east-1';
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 aws.iotanalytics.datasets
WHERE region = 'us-east-1' AND data__Identifier = '<DatasetName>';
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 aws.iotanalytics.datasets (
Actions,
region
)
SELECT
'{{ Actions }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.iotanalytics.datasets (
Actions,
LateDataRules,
DatasetName,
ContentDeliveryRules,
Triggers,
VersioningConfiguration,
RetentionPeriod,
Tags,
region
)
SELECT
'{{ Actions }}',
'{{ LateDataRules }}',
'{{ DatasetName }}',
'{{ ContentDeliveryRules }}',
'{{ Triggers }}',
'{{ VersioningConfiguration }}',
'{{ RetentionPeriod }}',
'{{ 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:
- ActionName: '{{ ActionName }}'
ContainerAction:
Variables:
- VariableName: '{{ VariableName }}'
DatasetContentVersionValue:
DatasetName: '{{ DatasetName }}'
StringValue: '{{ StringValue }}'
DoubleValue: null
OutputFileUriValue:
FileName: '{{ FileName }}'
ExecutionRoleArn: '{{ ExecutionRoleArn }}'
Image: '{{ Image }}'
ResourceConfiguration:
VolumeSizeInGB: '{{ VolumeSizeInGB }}'
ComputeType: '{{ ComputeType }}'
QueryAction:
Filters:
- Filter: '{{ Filter }}'
Next: '{{ Next }}'
Name: '{{ Name }}'
SqlQuery: '{{ SqlQuery }}'
- name: LateDataRules
value:
- RuleConfiguration:
DeltaTimeSessionWindowConfiguration:
TimeoutInMinutes: '{{ TimeoutInMinutes }}'
RuleName: '{{ RuleName }}'
- name: DatasetName
value: '{{ DatasetName }}'
- name: ContentDeliveryRules
value:
- Destination:
IotEventsDestinationConfiguration:
InputName: '{{ InputName }}'
RoleArn: '{{ RoleArn }}'
S3DestinationConfiguration:
GlueConfiguration:
DatabaseName: '{{ DatabaseName }}'
TableName: '{{ TableName }}'
Bucket: '{{ Bucket }}'
Key: '{{ Key }}'
RoleArn: '{{ RoleArn }}'
EntryName: '{{ EntryName }}'
- name: Triggers
value:
- TriggeringDataset:
DatasetName: '{{ DatasetName }}'
Schedule:
ScheduleExpression: '{{ ScheduleExpression }}'
- name: VersioningConfiguration
value:
Unlimited: '{{ Unlimited }}'
MaxVersions: '{{ MaxVersions }}'
- name: RetentionPeriod
value:
NumberOfDays: '{{ NumberOfDays }}'
Unlimited: '{{ Unlimited }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.iotanalytics.datasets
WHERE data__Identifier = '<DatasetName>'
AND region = 'us-east-1';
Permissions
To operate on the datasets
resource, the following permissions are required:
Create
iotanalytics:CreateDataset
Read
iotanalytics:DescribeDataset,
iotanalytics:ListTagsForResource
Update
iotanalytics:UpdateDataset,
iotanalytics:TagResource,
iotanalytics:UntagResource
Delete
iotanalytics:DeleteDataset
List
iotanalytics:ListDatasets