1import type * as codeconnections from "@distilled.cloud/aws/codeconnections";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Request for {@link ListConnections}.
7 */
8export interface ListConnectionsRequest
9 extends codeconnections.ListConnectionsInput {}
10
11/**
12 * Runtime binding for `codeconnections:ListConnections`.
13 *
14 * An account-level operation (no connection argument) that enumerates the
15 * account's connections, optionally filtered by provider type or host.
16 * Useful for governance sweeps that audit which source providers are wired
17 * up. Provide the implementation with
18 * `Effect.provide(AWS.CodeConnections.ListConnectionsHttp)`.
19 * ### Inspecting a Connection
20 * **Example:** List Connections by Provider
21 * ```typescript
22 * // init — account-level binding takes no resource
23 * const listConnections = yield* AWS.CodeConnections.ListConnections();
24 *
25 * // runtime
26 * const result = yield* listConnections({ ProviderTypeFilter: "GitHub" });
27 * const names = (result.Connections ?? []).map((c) => c.ConnectionName);
28 * ```
29 *
30 * @binding
31 */
32export interface ListConnections extends Binding.Service<
33 ListConnections,
34 "AWS.CodeConnections.ListConnections",
35 () => Effect.Effect<
36 (
37 request?: ListConnectionsRequest,
38 ) => Effect.Effect<
39 codeconnections.ListConnectionsOutput,
40 codeconnections.ListConnectionsError
41 >
42 >
43> {}
44
45export const ListConnections = Binding.Service<ListConnections>(
46 "AWS.CodeConnections.ListConnections",
47);