@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 40 lines 1.34 KB
Raw
1 import type * as emr from "@distilled.cloud/aws/emr-serverless";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Application } from "./Application.ts";
5
6 /**
7 * Request accepted by the {@link GetSession} runtime callable. The
8 * `applicationId` is injected from the bound {@link Application}.
9 */
10 export type GetSessionInput = Omit<emr.GetSessionRequest, "applicationId">;
11
12 /**
13 * Runtime binding for `emr-serverless:GetSession`.
14 *
15 * Reads an interactive session's detail on the bound {@link Application} —
16 * state, execution role, idle time, resource utilization. Provide the
17 * implementation with `Effect.provide(AWS.EMRServerless.GetSessionHttp)`.
18 * ### Interactive Sessions
19 * **Example:** Poll A Session
20 * ```typescript
21 * // init
22 * const getSession = yield* AWS.EMRServerless.GetSession(app);
23 *
24 * // runtime
25 * const { session } = yield* getSession({ sessionId });
26 * yield* Effect.log(`${session.sessionId} is ${session.state}`);
27 * ```
28 *
29 * @binding
30 */
31 export interface GetSession extends Binding.Service<
32 GetSession,
33 "AWS.EMRServerless.GetSession",
34 (
35 application: Application,
36 ) => Effect.Effect<
37 (request: GetSessionInput) => Effect.Effect<emr.GetSessionResponse, emr.GetSessionError>
38 >
39 > {}
40 export const GetSession = Binding.Service<GetSession>("AWS.EMRServerless.GetSession");