@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 39 lines 1.28 KB
Raw
1 import type * as emrc from "@distilled.cloud/aws/emr-containers";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { VirtualCluster } from "./VirtualCluster.ts";
5
6 /**
7 * Runtime binding for `emr-containers:ListJobRuns`.
8 *
9 * Lists job runs on the bound {@link VirtualCluster}, optionally filtered by
10 * state, name, or creation time. The virtual cluster ID is injected from the
11 * binding. Provide the implementation with
12 * `Effect.provide(AWS.EMRContainers.ListJobRunsHttp)`.
13 * ### Running Jobs
14 * **Example:** Count Active Job Runs
15 * ```typescript
16 * // init
17 * const listJobRuns = yield* AWS.EMRContainers.ListJobRuns(virtualCluster);
18 *
19 * // runtime
20 * const { jobRuns } = yield* listJobRuns({
21 * states: ["PENDING", "SUBMITTED", "RUNNING"],
22 * });
23 * yield* Effect.log(`${jobRuns?.length ?? 0} active job runs`);
24 * ```
25 *
26 * @binding
27 */
28 export interface ListJobRuns extends Binding.Service<
29 ListJobRuns,
30 "AWS.EMRContainers.ListJobRuns",
31 (
32 virtualCluster: VirtualCluster,
33 ) => Effect.Effect<
34 (
35 request?: Omit<emrc.ListJobRunsRequest, "virtualClusterId">,
36 ) => Effect.Effect<emrc.ListJobRunsResponse, emrc.ListJobRunsError>
37 >
38 > {}
39 export const ListJobRuns = Binding.Service<ListJobRuns>("AWS.EMRContainers.ListJobRuns");