Skip to main content

thing_types

Creates, updates, deletes or gets a thing_type resource or lists thing_types in a region

Overview

Namething_types
TypeResource
DescriptionResource Type definition for AWS::IoT::ThingType
Idaws.iot.thing_types

Fields

NameDatatypeDescription
idstring
arnstring
thing_type_namestring
deprecate_thing_typeboolean
thing_type_propertiesobject
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTregion
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.iot.thing_types (
ThingTypeName,
DeprecateThingType,
ThingTypeProperties,
Tags,
region
)
SELECT
'{{ ThingTypeName }}',
'{{ DeprecateThingType }}',
'{{ ThingTypeProperties }}',
'{{ Tags }}',
'{{ region }}';

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