Skip to main content

things

Creates, updates, deletes or gets a thing resource or lists things in a region

Overview

Namethings
TypeResource
DescriptionResource Type definition for AWS::IoT::Thing
Idaws.iot.things

Fields

NameDatatypeDescription
idstring
arnstring
attribute_payloadobject
thing_namestring
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 things in a region.

SELECT
region,
id,
arn,
attribute_payload,
thing_name
FROM aws.iot.things
WHERE region = 'us-east-1';

Gets all properties from an individual thing.

SELECT
region,
id,
arn,
attribute_payload,
thing_name
FROM aws.iot.things
WHERE region = 'us-east-1' AND data__Identifier = '<ThingName>';

INSERT example

Use the following StackQL query and manifest file to create a new thing resource, using stack-deploy.

/*+ create */
INSERT INTO aws.iot.things (
AttributePayload,
ThingName,
region
)
SELECT
'{{ AttributePayload }}',
'{{ ThingName }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.iot.things
WHERE data__Identifier = '<ThingName>'
AND region = 'us-east-1';

Permissions

To operate on the things resource, the following permissions are required:

Create

iot:CreateThing,
iot:DescribeThing

Delete

iot:DeleteThing,
iot:DescribeThing

List

iot:ListThings

Read

iot:DescribeThing

Update

iot:UpdateThing,
iot:DescribeThing