@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 41 lines 1.38 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 GetJobRun} runtime callable. The
8 * `applicationId` is injected from the bound {@link Application}.
9 */
10 export type GetJobRunInput = Omit<emr.GetJobRunRequest, "applicationId">;
11
12 /**
13 * Runtime binding for `emr-serverless:GetJobRun`.
14 *
15 * Reads a job run's full detail on the bound {@link Application} — state,
16 * driver, resource utilization, timeout — so a function can poll a submitted
17 * job to completion or inspect why it failed. Provide the implementation
18 * with `Effect.provide(AWS.EMRServerless.GetJobRunHttp)`.
19 * ### Running Jobs
20 * **Example:** Poll A Job Run
21 * ```typescript
22 * // init
23 * const getJobRun = yield* AWS.EMRServerless.GetJobRun(app);
24 *
25 * // runtime
26 * const { jobRun } = yield* getJobRun({ jobRunId });
27 * yield* Effect.log(`${jobRun.jobRunId} is ${jobRun.state}`);
28 * ```
29 *
30 * @binding
31 */
32 export interface GetJobRun extends Binding.Service<
33 GetJobRun,
34 "AWS.EMRServerless.GetJobRun",
35 (
36 application: Application,
37 ) => Effect.Effect<
38 (request: GetJobRunInput) => Effect.Effect<emr.GetJobRunResponse, emr.GetJobRunError>
39 >
40 > {}
41 export const GetJobRun = Binding.Service<GetJobRun>("AWS.EMRServerless.GetJobRun");