The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import type * as emr from "@distilled.cloud/aws/emr-serverless"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type * as Effect from "effect/Effect"; |
| 4 | import type { Application } from "./Application.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Request accepted by the {@link GetDashboardForJobRun} runtime callable. |
| 8 | * The `applicationId` is injected from the bound {@link Application}. |
| 9 | */ |
| 10 | export type GetDashboardForJobRunInput = Omit<emr.GetDashboardForJobRunRequest, "applicationId">; |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for `emr-serverless:GetDashboardForJobRun`. |
| 14 | * |
| 15 | * Creates a pre-signed URL to the live Spark/Tez UI (or Spark History |
| 16 | * Server) for a job run on the bound {@link Application} — hand it to an |
| 17 | * on-call engineer to debug a slow or failed job without console access. |
| 18 | * Provide the implementation with |
| 19 | * `Effect.provide(AWS.EMRServerless.GetDashboardForJobRunHttp)`. |
| 20 | * ### Dashboards |
| 21 | * **Example:** Link To A Job's Spark UI |
| 22 | * ```typescript |
| 23 | * // init |
| 24 | * const getDashboardForJobRun = |
| 25 | * yield* AWS.EMRServerless.GetDashboardForJobRun(app); |
| 26 | * |
| 27 | * // runtime |
| 28 | * const { url } = yield* getDashboardForJobRun({ jobRunId }); |
| 29 | * ``` |
| 30 | * |
| 31 | * @binding |
| 32 | */ |
| 33 | export interface GetDashboardForJobRun extends Binding.Service< |
| 34 | GetDashboardForJobRun, |
| 35 | "AWS.EMRServerless.GetDashboardForJobRun", |
| 36 | ( |
| 37 | application: Application, |
| 38 | ) => Effect.Effect< |
| 39 | ( |
| 40 | request: GetDashboardForJobRunInput, |
| 41 | ) => Effect.Effect<emr.GetDashboardForJobRunResponse, emr.GetDashboardForJobRunError> |
| 42 | > |
| 43 | > {} |
| 44 | export const GetDashboardForJobRun = Binding.Service<GetDashboardForJobRun>( |
| 45 | "AWS.EMRServerless.GetDashboardForJobRun", |
| 46 | ); |