Skip to content

GetRetainedMessage

Source: src/AWS/IoT/GetRetainedMessage.ts

Runtime binding for the IoT data-plane GetRetainedMessage operation (IAM action iot:GetRetainedMessage).

Binding to a topic filter grants iot:GetRetainedMessage on matching topics (or all topics when the filter is omitted) and returns a callable that reads the retained MQTT message for a concrete topic. Provide the implementation with Effect.provide(AWS.IoT.GetRetainedMessageHttp).

const getRetained = yield* AWS.IoT.GetRetainedMessage("sensors/*");
const { payload } = yield* getRetained({ topic: "sensors/1/state" });