datasets
Creates, updates, deletes or gets a dataset resource or lists datasets in a region
Overview
| Name | datasets |
| Type | Resource |
| Description | Resource schema for AWS::IoTSiteWise::Dataset. |
| Id | awscc.iotsitewise.datasets |
Fields
| Name | Datatype | Description |
|---|---|---|
dataset_id | string | The ID of the dataset. |
dataset_arn | string | The ARN of the dataset. |
dataset_name | string | The name of the dataset. |
dataset_description | string | A description about the dataset, and its functionality. |
dataset_source | object | The data source for the dataset. |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
For more information, see AWS::IoTSiteWise::Dataset.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | DatasetName, DatasetSource, 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 properties from an individual dataset.
SELECT
region,
dataset_id,
dataset_arn,
dataset_name,
dataset_description,
dataset_source,
tags
FROM awscc.iotsitewise.datasets
WHERE region = 'us-east-1' AND data__Identifier = '<DatasetId>';
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.iotsitewise.datasets (
DatasetName,
DatasetSource,
region
)
SELECT
'{{ DatasetName }}',
'{{ DatasetSource }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.iotsitewise.datasets (
DatasetName,
DatasetDescription,
DatasetSource,
Tags,
region
)
SELECT
'{{ DatasetName }}',
'{{ DatasetDescription }}',
'{{ DatasetSource }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: dataset
props:
- name: DatasetName
value: '{{ DatasetName }}'
- name: DatasetDescription
value: '{{ DatasetDescription }}'
- name: DatasetSource
value:
SourceFormat: '{{ SourceFormat }}'
SourceType: '{{ SourceType }}'
SourceDetail:
Kendra:
KnowledgeBaseArn: '{{ KnowledgeBaseArn }}'
RoleArn: '{{ RoleArn }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE example
/*+ delete */
DELETE FROM awscc.iotsitewise.datasets
WHERE data__Identifier = '<DatasetId>'
AND region = 'us-east-1';
Permissions
To operate on the datasets resource, the following permissions are required:
Create
iotsitewise:CreateDataset,
iotsitewise:DescribeDataset,
iam:PassRole,
iotsitewise:ListTagsForResource,
iotsitewise:TagResource
Read
iotsitewise:DescribeDataset,
iotsitewise:ListTagsForResource
Update
iotsitewise:UpdateDataset,
iotsitewise:DescribeDataset,
iam:PassRole,
iotsitewise:ListTagsForResource,
iotsitewise:TagResource,
iotsitewise:UntagResource
Delete
iotsitewise:DeleteDataset,
iotsitewise:DescribeDataset,
iotsitewise:ListTagsForResource
List
iotsitewise:ListDatasets,
iotsitewise:ListTagsForResource