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
Idawscc.iot.things

Fields

NameDatatypeDescription
idstring
arnstring
attribute_payloadobject
thing_namestring
regionstringAWS region.

For more information, see AWS::IoT::Thing.

Methods

NameResourceAccessible byRequired Params
create_resourcethingsINSERTregion
delete_resourcethingsDELETEIdentifier, region
update_resourcethingsUPDATEIdentifier, PatchDocument, region
list_resourcesthings_list_onlySELECTregion
get_resourcethingsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual thing.

SELECT
region,
id,
arn,
attribute_payload,
thing_name
FROM awscc.iot.things
WHERE
region = 'us-east-1' AND
Identifier = '{{ thing_name }}';

INSERT example

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

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

UPDATE example

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

/*+ update */
UPDATE awscc.iot.things
SET PatchDocument = string('{{ {
"AttributePayload": attribute_payload
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ thing_name }}';

DELETE example

/*+ delete */
DELETE FROM awscc.iot.things
WHERE
Identifier = '{{ thing_name }}' AND
region = 'us-east-1';

Permissions

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

iot:CreateThing,
iot:DescribeThing