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 ListSessions} runtime callable. The
8 * `applicationId` is injected from the bound {@link Application}.
9 */
10export type ListSessionsInput = Omit<emr.ListSessionsRequest, "applicationId">;
11
12/**
13 * Runtime binding for `emr-serverless:ListSessions`.
14 *
15 * Enumerates interactive sessions on the bound {@link Application},
16 * optionally filtered by state or creation window. Provide the
17 * implementation with `Effect.provide(AWS.EMRServerless.ListSessionsHttp)`.
18 * ### Interactive Sessions
19 * **Example:** List Idle Sessions
20 * ```typescript
21 * // init
22 * const listSessions = yield* AWS.EMRServerless.ListSessions(app);
23 *
24 * // runtime
25 * const { sessions } = yield* listSessions({ states: ["IDLE"] });
26 * ```
27 *
28 * @binding
29 */
30export interface ListSessions extends Binding.Service<
31 ListSessions,
32 "AWS.EMRServerless.ListSessions",
33 (
34 application: Application,
35 ) => Effect.Effect<
36 (
37 request?: ListSessionsInput,
38 ) => Effect.Effect<emr.ListSessionsResponse, emr.ListSessionsError>
39 >
40> {}
41export const ListSessions = Binding.Service<ListSessions>(
42 "AWS.EMRServerless.ListSessions",
43);