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 TerminateSession} runtime callable. The
8 * `applicationId` is injected from the bound {@link Application}.
9 */
10export type TerminateSessionInput = Omit<
11 emr.TerminateSessionRequest,
12 "applicationId"
13>;
14
15/**
16 * Runtime binding for `emr-serverless:TerminateSession`.
17 *
18 * Terminates an interactive session on the bound {@link Application},
19 * releasing its workers — e.g. a cost-control function reaping sessions
20 * left idle past a policy window. Provide the implementation with
21 * `Effect.provide(AWS.EMRServerless.TerminateSessionHttp)`.
22 * ### Interactive Sessions
23 * **Example:** Terminate A Session
24 * ```typescript
25 * // init
26 * const terminateSession = yield* AWS.EMRServerless.TerminateSession(app);
27 *
28 * // runtime
29 * yield* terminateSession({ sessionId });
30 * ```
31 *
32 * @binding
33 */
34export interface TerminateSession extends Binding.Service<
35 TerminateSession,
36 "AWS.EMRServerless.TerminateSession",
37 (
38 application: Application,
39 ) => Effect.Effect<
40 (
41 request: TerminateSessionInput,
42 ) => Effect.Effect<emr.TerminateSessionResponse, emr.TerminateSessionError>
43 >
44> {}
45export const TerminateSession = Binding.Service<TerminateSession>(
46 "AWS.EMRServerless.TerminateSession",
47);