1import type * as osis from "@distilled.cloud/aws/osis";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Pipeline } from "./Pipeline.ts";
5
6/**
7 * Runtime binding for `osis:GetPipelineChangeProgress`.
8 *
9 * Reads progress information for the current change happening on the bound
10 * {@link Pipeline} (stage-by-stage status while the pipeline is being
11 * created) — useful for surfacing provisioning progress in an operational
12 * dashboard. The pipeline name is injected from the binding. Provide the
13 * implementation with `Effect.provide(AWS.OSIS.GetPipelineChangeProgressHttp)`.
14 * ### Monitoring a Pipeline
15 * **Example:** Report Creation Progress
16 * ```typescript
17 * // init — bind the operation to the pipeline
18 * const getChangeProgress = yield* AWS.OSIS.GetPipelineChangeProgress(pipeline);
19 *
20 * // runtime
21 * const { ChangeProgressStatuses } = yield* getChangeProgress();
22 * for (const status of ChangeProgressStatuses ?? []) {
23 * yield* Effect.log(`${status.Status}: ${status.ChangeProgressStages?.length} stages`);
24 * }
25 * ```
26 *
27 * @binding
28 */
29export interface GetPipelineChangeProgress extends Binding.Service<
30 GetPipelineChangeProgress,
31 "AWS.OSIS.GetPipelineChangeProgress",
32 (
33 pipeline: Pipeline,
34 ) => Effect.Effect<
35 () => Effect.Effect<
36 osis.GetPipelineChangeProgressResponse,
37 osis.GetPipelineChangeProgressError
38 >
39 >
40> {}
41export const GetPipelineChangeProgress =
42 Binding.Service<GetPipelineChangeProgress>(
43 "AWS.OSIS.GetPipelineChangeProgress",
44 );