| 1 | import type * as greengrassv2 from "@distilled.cloud/aws/greengrassv2"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `greengrass:GetConnectivityInfo`. |
| 7 | * |
| 8 | * Reads a core device's connectivity information — the endpoints and ports |
| 9 | * where client devices can reach the core's local MQTT broker (the same data |
| 10 | * the IoT Greengrass discovery API serves). The caller supplies the core |
| 11 | * device's thing name at runtime. Provide the implementation with |
| 12 | * `Effect.provide(AWS.GreengrassV2.GetConnectivityInfoHttp)`. |
| 13 | * ### Managing Client Devices |
| 14 | * **Example:** Read A Core's Broker Endpoints |
| 15 | * ```typescript |
| 16 | * // init — account-level binding, no resource argument |
| 17 | * const getConnectivityInfo = yield* AWS.GreengrassV2.GetConnectivityInfo(); |
| 18 | * |
| 19 | * // runtime |
| 20 | * const { connectivityInfo } = yield* getConnectivityInfo({ |
| 21 | * thingName: "MyCore", |
| 22 | * }); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface GetConnectivityInfo extends Binding.Service< |
| 28 | GetConnectivityInfo, |
| 29 | "AWS.GreengrassV2.GetConnectivityInfo", |
| 30 | () => Effect.Effect< |
| 31 | ( |
| 32 | request: greengrassv2.GetConnectivityInfoRequest, |
| 33 | ) => Effect.Effect< |
| 34 | greengrassv2.GetConnectivityInfoResponse, |
| 35 | greengrassv2.GetConnectivityInfoError |
| 36 | > |
| 37 | > |
| 38 | > {} |
| 39 | export const GetConnectivityInfo = Binding.Service<GetConnectivityInfo>( |
| 40 | "AWS.GreengrassV2.GetConnectivityInfo", |
| 41 | ); |