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:GetWorkflowStepExecution`.
7 *
8 * Reads the runtime state of one workflow step — its action, status,
9 * rollback status, inputs/outputs, and message. Step executions are created
10 * dynamically by builds, so this is an account-level binding: pass an id
11 * from `ListWorkflowStepExecutions` or `ListWaitingWorkflowSteps`. Provide
12 * the implementation with
13 * `Effect.provide(AWS.ImageBuilder.GetWorkflowStepExecutionHttp)`.
14 * ### Workflow Monitoring
15 * **Example:** Read a Workflow Step's State
16 * ```typescript
17 * // init — account-level binding, no resource argument
18 * const getWorkflowStepExecution =
19 * yield* AWS.ImageBuilder.GetWorkflowStepExecution();
20 *
21 * // runtime
22 * const step = yield* getWorkflowStepExecution({ stepExecutionId });
23 * yield* Effect.log(`step ${step.name} is ${step.status}`);
24 * ```
25 *
26 * @binding
27 */
28export interface GetWorkflowStepExecution extends Binding.Service<
29 GetWorkflowStepExecution,
30 "AWS.ImageBuilder.GetWorkflowStepExecution",
31 () => Effect.Effect<
32 (
33 request: imagebuilder.GetWorkflowStepExecutionRequest,
34 ) => Effect.Effect<
35 imagebuilder.GetWorkflowStepExecutionResponse,
36 imagebuilder.GetWorkflowStepExecutionError
37 >
38 >
39> {}
40export const GetWorkflowStepExecution =
41 Binding.Service<GetWorkflowStepExecution>(
42 "AWS.ImageBuilder.GetWorkflowStepExecution",
43 );