@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 37 lines 1.39 KB
Raw
1 import type * as dms from "@distilled.cloud/aws/database-migration-service";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Endpoint } from "./Endpoint.ts";
5 import type { ReplicationInstance } from "./ReplicationInstance.ts";
6
7 /**
8 * Runtime binding for `dms:TestConnection`.
9 *
10 * Bind this operation to a ({@link ReplicationInstance}, {@link Endpoint})
11 * pair to initiate a connectivity test from the instance to the endpoint's
12 * database. The test runs asynchronously — poll the result with
13 * {@link DescribeConnections}. Provide the implementation with
14 * `Effect.provide(AWS.DMS.TestConnectionHttp)`.
15 * ### Testing Connectivity
16 * **Example:** Kick Off a Connection Test
17 * ```typescript
18 * // init — bind the operation to the instance + endpoint
19 * const testConnection = yield* AWS.DMS.TestConnection(instance, source);
20 *
21 * // runtime
22 * const { Connection } = yield* testConnection();
23 * // Connection.Status === "testing" — poll DescribeConnections for the result
24 * ```
25 *
26 * @binding
27 */
28 export interface TestConnection extends Binding.Service<
29 TestConnection,
30 "AWS.DMS.TestConnection",
31 (
32 instance: ReplicationInstance,
33 endpoint: Endpoint,
34 ) => Effect.Effect<() => Effect.Effect<dms.TestConnectionResponse, dms.TestConnectionError>>
35 > {}
36
37 export const TestConnection = Binding.Service<TestConnection>("AWS.DMS.TestConnection");