1import type * as SVC from "@distilled.cloud/aws/codepipeline";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Pipeline } from "./Pipeline.ts";
5
6export interface StopPipelineExecutionRequest extends Omit<
7 SVC.StopPipelineExecutionInput,
8 "pipelineName"
9> {}
10
11/**
12 * Runtime binding for `codepipeline:StopPipelineExecution` — stops an
13 * in-progress execution, either finishing in-flight actions first or
14 * abandoning them (`abandon: true`).
15 * ### Running Pipelines
16 * **Example:** Stop an Execution
17 * ```typescript
18 * const stopExecution = yield* AWS.CodePipeline.StopPipelineExecution(pipeline);
19 *
20 * yield* stopExecution({
21 * pipelineExecutionId: executionId,
22 * abandon: true,
23 * reason: "superseded by hotfix",
24 * });
25 * ```
26 *
27 * @binding
28 */
29export interface StopPipelineExecution extends Binding.Service<
30 StopPipelineExecution,
31 "AWS.CodePipeline.StopPipelineExecution",
32 <P extends Pipeline>(
33 pipeline: P,
34 ) => Effect.Effect<
35 (
36 request: StopPipelineExecutionRequest,
37 ) => Effect.Effect<
38 SVC.StopPipelineExecutionOutput,
39 SVC.StopPipelineExecutionError
40 >
41 >
42> {}
43export const StopPipelineExecution = Binding.Service<StopPipelineExecution>(
44 "AWS.CodePipeline.StopPipelineExecution",
45);