Skip to content

ThingType

Source: src/AWS/IoT/ThingType.ts

An AWS IoT Thing Type — a reusable template describing a class of things.

Basic Thing Type

const thingType = yield* ThingType("sensor-type", {
description: "Temperature sensors",
searchableAttributes: ["location", "model"],
});

Create a Thing of this Type

const thingType = yield* ThingType("sensor-type", {
searchableAttributes: ["location"],
});
const thing = yield* Thing("sensor", {
thingTypeName: thingType.thingTypeName,
attributes: { location: "warehouse-a" },
});