The best way to control Claude Code, Codex and more from any computer or phone

main
ts 37 lines 1.31 KB
Raw
1 import type * as iotdata from "@distilled.cloud/aws/iot-data-plane";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 export interface GetRetainedMessageRequest extends iotdata.GetRetainedMessageRequest {}
6
7 /**
8 * Runtime binding for the IoT data-plane `GetRetainedMessage` operation (IAM
9 * action `iot:GetRetainedMessage`).
10 *
11 * Binding to a topic filter grants `iot:GetRetainedMessage` on matching
12 * topics (or all topics when the filter is omitted) and returns a callable
13 * that reads the retained MQTT message for a concrete topic. Provide the
14 * implementation with `Effect.provide(AWS.IoT.GetRetainedMessageHttp)`.
15 * ### Retained Messages
16 * **Example:** Read a Retained Message
17 * ```typescript
18 * const getRetained = yield* AWS.IoT.GetRetainedMessage("sensors/*");
19 *
20 * const { payload } = yield* getRetained({ topic: "sensors/1/state" });
21 * ```
22 *
23 * @binding
24 */
25 export interface GetRetainedMessage extends Binding.Service<
26 GetRetainedMessage,
27 "AWS.IoT.GetRetainedMessage",
28 (
29 topicFilter?: string,
30 ) => Effect.Effect<
31 (
32 request: GetRetainedMessageRequest,
33 ) => Effect.Effect<iotdata.GetRetainedMessageResponse, iotdata.GetRetainedMessageError>
34 >
35 > {}
36
37 export const GetRetainedMessage = Binding.Service<GetRetainedMessage>("AWS.IoT.GetRetainedMessage");