The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import type * as SVC from "@distilled.cloud/aws/codepipeline"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type * as Effect from "effect/Effect"; |
| 4 | import type { Pipeline } from "./Pipeline.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `codepipeline:GetPipelineState` — returns the current |
| 8 | * state of every stage and action in the pipeline, including in-flight |
| 9 | * executions, transition states, and manual-approval tokens. |
| 10 | * ### Observing Pipelines |
| 11 | * **Example:** Read the Pipeline State |
| 12 | * ```typescript |
| 13 | * const getState = yield* AWS.CodePipeline.GetPipelineState(pipeline); |
| 14 | * |
| 15 | * const state = yield* getState(); |
| 16 | * const approval = state.stageStates |
| 17 | * ?.find((s) => s.stageName === "Approve") |
| 18 | * ?.actionStates?.find((a) => a.actionName === "ManualApproval"); |
| 19 | * ``` |
| 20 | * |
| 21 | * @binding |
| 22 | */ |
| 23 | export interface GetPipelineState extends Binding.Service< |
| 24 | GetPipelineState, |
| 25 | "AWS.CodePipeline.GetPipelineState", |
| 26 | <P extends Pipeline>( |
| 27 | pipeline: P, |
| 28 | ) => Effect.Effect<() => Effect.Effect<SVC.GetPipelineStateOutput, SVC.GetPipelineStateError>> |
| 29 | > {} |
| 30 | export const GetPipelineState = Binding.Service<GetPipelineState>( |
| 31 | "AWS.CodePipeline.GetPipelineState", |
| 32 | ); |