| 1 | import type * as iot from "@distilled.cloud/aws/iot"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | export interface DescribeEndpointRequest extends iot.DescribeEndpointRequest {} |
| 6 | |
| 7 | /** |
| 8 | * Runtime binding for the `DescribeEndpoint` operation (IAM action |
| 9 | * `iot:DescribeEndpoint`, granted on `*`). |
| 10 | * |
| 11 | * Returns the account-specific IoT endpoint — pass |
| 12 | * `endpointType: "iot:Data-ATS"` for the recommended ATS data endpoint that |
| 13 | * devices and MQTT clients connect to. Provide the implementation with |
| 14 | * `Effect.provide(AWS.IoT.DescribeEndpointHttp)`. |
| 15 | * ### Endpoints |
| 16 | * **Example:** Discover the ATS Data Endpoint |
| 17 | * ```typescript |
| 18 | * const describeEndpoint = yield* AWS.IoT.DescribeEndpoint(); |
| 19 | * |
| 20 | * const { endpointAddress } = yield* describeEndpoint({ |
| 21 | * endpointType: "iot:Data-ATS", |
| 22 | * }); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface DescribeEndpoint extends Binding.Service< |
| 28 | DescribeEndpoint, |
| 29 | "AWS.IoT.DescribeEndpoint", |
| 30 | () => Effect.Effect< |
| 31 | ( |
| 32 | request?: DescribeEndpointRequest, |
| 33 | ) => Effect.Effect<iot.DescribeEndpointResponse, iot.DescribeEndpointError> |
| 34 | > |
| 35 | > {} |
| 36 | |
| 37 | export const DescribeEndpoint = Binding.Service<DescribeEndpoint>( |
| 38 | "AWS.IoT.DescribeEndpoint", |
| 39 | ); |