1import type * as imagebuilder from "@distilled.cloud/aws/imagebuilder";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for `imagebuilder:GetWorkflowExecution`.
7 *
8 * Reads the runtime state of one workflow execution (a build/test/distribute
9 * workflow run within an image build) — its status, step counts, and
10 * timing. Workflow executions are created dynamically by builds, so this is
11 * an account-level binding: pass an id from `ListWorkflowExecutions`.
12 * Provide the implementation with
13 * `Effect.provide(AWS.ImageBuilder.GetWorkflowExecutionHttp)`.
14 * ### Workflow Monitoring
15 * **Example:** Read a Workflow Execution's State
16 * ```typescript
17 * // init — account-level binding, no resource argument
18 * const getWorkflowExecution = yield* AWS.ImageBuilder.GetWorkflowExecution();
19 *
20 * // runtime
21 * const execution = yield* getWorkflowExecution({ workflowExecutionId });
22 * yield* Effect.log(`${execution.type} workflow is ${execution.status}`);
23 * ```
24 *
25 * @binding
26 */
27export interface GetWorkflowExecution extends Binding.Service<
28 GetWorkflowExecution,
29 "AWS.ImageBuilder.GetWorkflowExecution",
30 () => Effect.Effect<
31 (
32 request: imagebuilder.GetWorkflowExecutionRequest,
33 ) => Effect.Effect<
34 imagebuilder.GetWorkflowExecutionResponse,
35 imagebuilder.GetWorkflowExecutionError
36 >
37 >
38> {}
39export const GetWorkflowExecution = Binding.Service<GetWorkflowExecution>(
40 "AWS.ImageBuilder.GetWorkflowExecution",
41);