thing_types
Creates, updates, deletes or gets a thing_type
resource or lists thing_types
in a region
Overview
Name | thing_types |
Type | Resource |
Description | Resource Type definition for AWS::IoT::ThingType |
Id | aws.iot.thing_types |
Fields
Name | Datatype | Description |
---|---|---|
id | string | |
arn | string | |
thing_type_name | string | |
deprecate_thing_type | boolean | |
thing_type_properties | object | |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | 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 thing_types
in a region.
SELECT
region,
id,
arn,
thing_type_name,
deprecate_thing_type,
thing_type_properties,
tags
FROM aws.iot.thing_types
WHERE region = 'us-east-1';
Gets all properties from an individual thing_type
.
SELECT
region,
id,
arn,
thing_type_name,
deprecate_thing_type,
thing_type_properties,
tags
FROM aws.iot.thing_types
WHERE region = 'us-east-1' AND data__Identifier = '<ThingTypeName>';
INSERT
example
Use the following StackQL query and manifest file to create a new thing_type
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.iot.thing_types (
ThingTypeName,
DeprecateThingType,
ThingTypeProperties,
Tags,
region
)
SELECT
'{{ ThingTypeName }}',
'{{ DeprecateThingType }}',
'{{ ThingTypeProperties }}',
'{{ Tags }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.iot.thing_types (
ThingTypeName,
DeprecateThingType,
ThingTypeProperties,
Tags,
region
)
SELECT
'{{ ThingTypeName }}',
'{{ DeprecateThingType }}',
'{{ ThingTypeProperties }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: thing_type
props:
- name: ThingTypeName
value: '{{ ThingTypeName }}'
- name: DeprecateThingType
value: '{{ DeprecateThingType }}'
- name: ThingTypeProperties
value:
SearchableAttributes:
- '{{ SearchableAttributes[0] }}'
ThingTypeDescription: '{{ ThingTypeDescription }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.iot.thing_types
WHERE data__Identifier = '<ThingTypeName>'
AND region = 'us-east-1';
Permissions
To operate on the thing_types
resource, the following permissions are required:
Create
iot:DescribeThingType,
iot:ListTagsForResource,
iot:CreateThingType,
iot:DeprecateThingType,
iot:TagResource
Delete
iot:DescribeThingType,
iot:DeleteThingType,
iot:DeprecateThingType
List
iot:ListThingTypes,
iot:ListTagsForResource
Read
iot:DescribeThingType,
iot:ListTagsForResource
Update
iot:DescribeThingType,
iot:UpdateThingType,
iot:ListTagsForResource,
iot:TagResource,
iot:UntagResource,
iot:DeprecateThingType