1import type * as emr from "@distilled.cloud/aws/emr-serverless";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Application } from "./Application.ts";
5
6/**
7 * Request accepted by the {@link ListJobRuns} runtime callable. The
8 * `applicationId` is injected from the bound {@link Application}.
9 */
10export type ListJobRunsInput = Omit<emr.ListJobRunsRequest, "applicationId">;
11
12/**
13 * Runtime binding for `emr-serverless:ListJobRuns`.
14 *
15 * Enumerates job runs on the bound {@link Application}, optionally filtered
16 * by state, creation window, or mode — so a function can report on running
17 * or recently failed jobs. Provide the implementation with
18 * `Effect.provide(AWS.EMRServerless.ListJobRunsHttp)`.
19 * ### Running Jobs
20 * **Example:** List Running Jobs
21 * ```typescript
22 * // init
23 * const listJobRuns = yield* AWS.EMRServerless.ListJobRuns(app);
24 *
25 * // runtime
26 * const { jobRuns } = yield* listJobRuns({ states: ["RUNNING"] });
27 * ```
28 *
29 * @binding
30 */
31export interface ListJobRuns extends Binding.Service<
32 ListJobRuns,
33 "AWS.EMRServerless.ListJobRuns",
34 (
35 application: Application,
36 ) => Effect.Effect<
37 (
38 request?: ListJobRunsInput,
39 ) => Effect.Effect<emr.ListJobRunsResponse, emr.ListJobRunsError>
40 >
41> {}
42export const ListJobRuns = Binding.Service<ListJobRuns>(
43 "AWS.EMRServerless.ListJobRuns",
44);