| 1 | import type * as SVC from "@distilled.cloud/aws/emr"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Cluster } from "./Cluster.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `elasticmapreduce:ListSessions` — lists the bound cluster's interactive sessions, optionally filtered by state. |
| 8 | * ### Interactive Sessions |
| 9 | * **Example:** List Idle Sessions |
| 10 | * ```typescript |
| 11 | * const listSessions = yield* AWS.EMR.ListSessions(cluster); |
| 12 | * |
| 13 | * const { Sessions } = yield* listSessions({ SessionStates: ["IDLE"] }); |
| 14 | * ``` |
| 15 | * |
| 16 | * @binding |
| 17 | */ |
| 18 | export interface ListSessions extends Binding.Service< |
| 19 | ListSessions, |
| 20 | "AWS.EMR.ListSessions", |
| 21 | <C extends Cluster>( |
| 22 | cluster: C, |
| 23 | ) => Effect.Effect< |
| 24 | ( |
| 25 | request?: Omit<SVC.ListSessionsInput, "ClusterId">, |
| 26 | ) => Effect.Effect<SVC.ListSessionsOutput, SVC.ListSessionsError> |
| 27 | > |
| 28 | > {} |
| 29 | export const ListSessions = Binding.Service<ListSessions>( |
| 30 | "AWS.EMR.ListSessions", |
| 31 | ); |