Skip to content

GetPipelineState

Source: src/AWS/CodePipeline/GetPipelineState.ts

Runtime binding for codepipeline:GetPipelineState — returns the current state of every stage and action in the pipeline, including in-flight executions, transition states, and manual-approval tokens.

const getState = yield* AWS.CodePipeline.GetPipelineState(pipeline);
const state = yield* getState();
const approval = state.stageStates
?.find((s) => s.stageName === "Approve")
?.actionStates?.find((a) => a.actionName === "ManualApproval");