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 GetSessionEndpoint} runtime callable. The
8 * `applicationId` is injected from the bound {@link Application}.
9 */
10export type GetSessionEndpointInput = Omit<
11 emr.GetSessionEndpointRequest,
12 "applicationId"
13>;
14
15/**
16 * Runtime binding for `emr-serverless:GetSessionEndpoint`.
17 *
18 * Resolves the connection endpoint and short-lived auth token for an
19 * interactive session on the bound {@link Application}. The `authToken` in
20 * the response is `Redacted` — unwrap it with `Redacted.value` only at the
21 * point of use. Provide the implementation with
22 * `Effect.provide(AWS.EMRServerless.GetSessionEndpointHttp)`.
23 * ### Interactive Sessions
24 * **Example:** Connect To A Session
25 * ```typescript
26 * // init
27 * const getSessionEndpoint = yield* AWS.EMRServerless.GetSessionEndpoint(app);
28 *
29 * // runtime
30 * const { endpoint, authToken } = yield* getSessionEndpoint({ sessionId });
31 * ```
32 *
33 * @binding
34 */
35export interface GetSessionEndpoint extends Binding.Service<
36 GetSessionEndpoint,
37 "AWS.EMRServerless.GetSessionEndpoint",
38 (
39 application: Application,
40 ) => Effect.Effect<
41 (
42 request: GetSessionEndpointInput,
43 ) => Effect.Effect<
44 emr.GetSessionEndpointResponse,
45 emr.GetSessionEndpointError
46 >
47 >
48> {}
49export const GetSessionEndpoint = Binding.Service<GetSessionEndpoint>(
50 "AWS.EMRServerless.GetSessionEndpoint",
51);