1import type * as dms from "@distilled.cloud/aws/database-migration-service";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for `dms:DescribeConnections`.
7 *
8 * Bind this operation (account-level) to poll the results of connection
9 * tests started with {@link TestConnection} — filter by `endpoint-arn` or
10 * `replication-instance-arn`. Provide the implementation with
11 * `Effect.provide(AWS.DMS.DescribeConnectionsHttp)`.
12 * ### Polling Connection Tests
13 * **Example:** Poll a Test Result for an Endpoint
14 * ```typescript
15 * // init — account-level, no target resource
16 * const describeConnections = yield* AWS.DMS.DescribeConnections();
17 *
18 * // runtime
19 * const { Connections } = yield* describeConnections({
20 * Filters: [{ Name: "endpoint-arn", Values: [endpointArn] }],
21 * });
22 * // Connections[0].Status: "testing" | "successful" | "failed"
23 * ```
24 *
25 * @binding
26 */
27export interface DescribeConnections extends Binding.Service<
28 DescribeConnections,
29 "AWS.DMS.DescribeConnections",
30 () => Effect.Effect<
31 (
32 request?: dms.DescribeConnectionsMessage,
33 ) => Effect.Effect<
34 dms.DescribeConnectionsResponse,
35 dms.DescribeConnectionsError
36 >
37 >
38> {}
39
40export const DescribeConnections = Binding.Service<DescribeConnections>(
41 "AWS.DMS.DescribeConnections",
42);