| 1 | import * as iotdata from "@distilled.cloud/aws/iot-data-plane"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeIotTopicHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { GetRetainedMessage } from "./GetRetainedMessage.ts"; |
| 5 | |
| 6 | /** |
| 7 | * HTTP implementation of the {@link GetRetainedMessage} capability — grants |
| 8 | * `iot:GetRetainedMessage` on the bound topic filter and calls the IoT |
| 9 | * data-plane `GetRetainedMessage` API. |
| 10 | */ |
| 11 | export const GetRetainedMessageHttp = Layer.effect( |
| 12 | GetRetainedMessage, |
| 13 | makeIotTopicHttpBinding({ |
| 14 | tag: "AWS.IoT.GetRetainedMessage", |
| 15 | operation: iotdata.getRetainedMessage, |
| 16 | actions: ["iot:GetRetainedMessage"], |
| 17 | }), |
| 18 | ); |