The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import type * as mwaa from "@distilled.cloud/aws/mwaa-serverless"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type * as Effect from "effect/Effect"; |
| 4 | import type { Workflow } from "./Workflow.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Request accepted by the {@link GetTaskInstance} runtime callable. The |
| 8 | * `WorkflowArn` is injected from the bound {@link Workflow}. |
| 9 | */ |
| 10 | export type GetTaskInstanceInput = Omit<mwaa.GetTaskInstanceRequest, "WorkflowArn">; |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for `airflow-serverless:GetTaskInstance`. |
| 14 | * |
| 15 | * Reads the detail of a single task instance within a run of the bound |
| 16 | * {@link Workflow} — its status, attempt number, timings, error message, |
| 17 | * log stream, and XCom values. Provide the implementation with |
| 18 | * `Effect.provide(AWS.MWAAServerless.GetTaskInstanceHttp)`. |
| 19 | * ### Observing Tasks |
| 20 | * **Example:** Read A Task Instance |
| 21 | * ```typescript |
| 22 | * // init — bind the operation to the workflow |
| 23 | * const getTaskInstance = yield* AWS.MWAAServerless.GetTaskInstance(workflow); |
| 24 | * |
| 25 | * // runtime |
| 26 | * const task = yield* getTaskInstance({ |
| 27 | * RunId: runId, |
| 28 | * TaskInstanceId: taskInstanceId, |
| 29 | * }); |
| 30 | * yield* Effect.log(`task ${task.TaskId}: ${task.Status}`); |
| 31 | * ``` |
| 32 | * |
| 33 | * @binding |
| 34 | */ |
| 35 | export interface GetTaskInstance extends Binding.Service< |
| 36 | GetTaskInstance, |
| 37 | "AWS.MWAAServerless.GetTaskInstance", |
| 38 | ( |
| 39 | workflow: Workflow, |
| 40 | ) => Effect.Effect< |
| 41 | ( |
| 42 | request: GetTaskInstanceInput, |
| 43 | ) => Effect.Effect<mwaa.GetTaskInstanceResponse, mwaa.GetTaskInstanceError> |
| 44 | > |
| 45 | > {} |
| 46 | export const GetTaskInstance = Binding.Service<GetTaskInstance>( |
| 47 | "AWS.MWAAServerless.GetTaskInstance", |
| 48 | ); |