| 1 | import type * as pipes from "@distilled.cloud/aws/pipes"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Pipe } from "./Pipe.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `pipes:StopPipe`. |
| 8 | * |
| 9 | * Stops the bound {@link Pipe} without deleting it — e.g. pausing source |
| 10 | * polling during a maintenance window or in response to a poison-pill |
| 11 | * backlog. The response reports the transitional `STOPPING`/desired |
| 12 | * `STOPPED` states; use {@link DescribePipe} to observe when the pipe |
| 13 | * settles. The pipe name is injected from the binding. Provide the |
| 14 | * implementation with `Effect.provide(AWS.Pipes.StopPipeHttp)`. |
| 15 | * ### Controlling a Pipe |
| 16 | * **Example:** Pause a Running Pipe |
| 17 | * ```typescript |
| 18 | * // init — bind the operation to the pipe |
| 19 | * const stopPipe = yield* AWS.Pipes.StopPipe(pipe); |
| 20 | * |
| 21 | * // runtime |
| 22 | * const response = yield* stopPipe(); |
| 23 | * // response.DesiredState === "STOPPED" |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | */ |
| 28 | export interface StopPipe extends Binding.Service< |
| 29 | StopPipe, |
| 30 | "AWS.Pipes.StopPipe", |
| 31 | ( |
| 32 | pipe: Pipe, |
| 33 | ) => Effect.Effect< |
| 34 | () => Effect.Effect<pipes.StopPipeResponse, pipes.StopPipeError> |
| 35 | > |
| 36 | > {} |
| 37 | export const StopPipe = Binding.Service<StopPipe>("AWS.Pipes.StopPipe"); |