1import type * as iotdata from "@distilled.cloud/aws/iot-data-plane";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5export interface ListSubscriptionsRequest
6 extends iotdata.ListSubscriptionsRequest {}
7
8/**
9 * Runtime binding for the IoT data-plane `ListSubscriptions` operation (IAM
10 * action `iot:ListSubscriptions`).
11 *
12 * Binding to a client id filter grants `iot:ListSubscriptions` on matching
13 * MQTT client ARNs (or all clients when the filter is omitted) and returns
14 * a callable that lists the topic filters a connected client is subscribed
15 * to. Provide the implementation with
16 * `Effect.provide(AWS.IoT.ListSubscriptionsHttp)`.
17 * ### MQTT Connections
18 * **Example:** Inspect a Device's Subscriptions
19 * ```typescript
20 * const listSubscriptions = yield* AWS.IoT.ListSubscriptions("sensor-*");
21 *
22 * const { subscriptions } = yield* listSubscriptions({
23 * clientId: "sensor-1",
24 * });
25 * ```
26 *
27 * @binding
28 */
29export interface ListSubscriptions extends Binding.Service<
30 ListSubscriptions,
31 "AWS.IoT.ListSubscriptions",
32 (
33 clientIdFilter?: string,
34 ) => Effect.Effect<
35 (
36 request: ListSubscriptionsRequest,
37 ) => Effect.Effect<
38 iotdata.ListSubscriptionsResponse,
39 iotdata.ListSubscriptionsError
40 >
41 >
42> {}
43
44export const ListSubscriptions = Binding.Service<ListSubscriptions>(
45 "AWS.IoT.ListSubscriptions",
46);