| 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:StartSession` — starts an interactive Spark Connect session on the bound cluster (EMR 7.8+ with sessions enabled). |
| 8 | * ### Interactive Sessions |
| 9 | * **Example:** Start a Session |
| 10 | * ```typescript |
| 11 | * const startSession = yield* AWS.EMR.StartSession(cluster); |
| 12 | * |
| 13 | * const { Id } = yield* startSession({ |
| 14 | * Name: "adhoc-analysis", |
| 15 | * ExecutionRoleArn: runtimeRoleArn, |
| 16 | * }); |
| 17 | * ``` |
| 18 | * |
| 19 | * @binding |
| 20 | */ |
| 21 | export interface StartSession extends Binding.Service< |
| 22 | StartSession, |
| 23 | "AWS.EMR.StartSession", |
| 24 | <C extends Cluster>( |
| 25 | cluster: C, |
| 26 | ) => Effect.Effect< |
| 27 | ( |
| 28 | request?: Omit<SVC.StartSessionInput, "ClusterId">, |
| 29 | ) => Effect.Effect<SVC.StartSessionOutput, SVC.StartSessionError> |
| 30 | > |
| 31 | > {} |
| 32 | export const StartSession = Binding.Service<StartSession>( |
| 33 | "AWS.EMR.StartSession", |
| 34 | ); |