1import type * as deadline from "@distilled.cloud/aws/deadline";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Queue } from "./Queue.ts";
5
6/**
7 * Runtime binding for `deadline:GetSession`.
8 *
9 * Reads a worker session's detail for a job in the bound {@link Queue} —
10 * lifecycle status, host properties, worker log configuration. The queue's
11 * `farmId`/`queueId` are injected from the binding. Provide the
12 * implementation with `Effect.provide(AWS.Deadline.GetSessionHttp)`.
13 * ### Monitoring Sessions
14 * **Example:** Inspect A Session
15 * ```typescript
16 * // init — bind the operation to the queue
17 * const getSession = yield* AWS.Deadline.GetSession(queue);
18 *
19 * // runtime
20 * const session = yield* getSession({ jobId, sessionId });
21 * ```
22 *
23 * @binding
24 */
25export interface GetSession extends Binding.Service<
26 GetSession,
27 "AWS.Deadline.GetSession",
28 (
29 queue: Queue,
30 ) => Effect.Effect<
31 (
32 request: Omit<deadline.GetSessionRequest, "farmId" | "queueId">,
33 ) => Effect.Effect<deadline.GetSessionResponse, deadline.GetSessionError>
34 >
35> {}
36export const GetSession = Binding.Service<GetSession>(
37 "AWS.Deadline.GetSession",
38);