| 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:StartPipe`. |
| 8 | * |
| 9 | * Starts the bound {@link Pipe} after it was stopped — e.g. resuming |
| 10 | * source polling on a schedule or in response to an operational signal. |
| 11 | * The response reports the transitional `STARTING`/desired `RUNNING` |
| 12 | * states; use {@link DescribePipe} to observe when the pipe settles. The |
| 13 | * pipe name is injected from the binding. Provide the implementation with |
| 14 | * `Effect.provide(AWS.Pipes.StartPipeHttp)`. |
| 15 | * ### Controlling a Pipe |
| 16 | * **Example:** Resume a Stopped Pipe |
| 17 | * ```typescript |
| 18 | * // init — bind the operation to the pipe |
| 19 | * const startPipe = yield* AWS.Pipes.StartPipe(pipe); |
| 20 | * |
| 21 | * // runtime |
| 22 | * const response = yield* startPipe(); |
| 23 | * // response.DesiredState === "RUNNING" |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | */ |
| 28 | export interface StartPipe extends Binding.Service< |
| 29 | StartPipe, |
| 30 | "AWS.Pipes.StartPipe", |
| 31 | ( |
| 32 | pipe: Pipe, |
| 33 | ) => Effect.Effect< |
| 34 | () => Effect.Effect<pipes.StartPipeResponse, pipes.StartPipeError> |
| 35 | > |
| 36 | > {} |
| 37 | export const StartPipe = Binding.Service<StartPipe>("AWS.Pipes.StartPipe"); |