| 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:DescribePipe`. |
| 8 | * |
| 9 | * Reads the bound {@link Pipe}'s full definition and live state |
| 10 | * (`CurrentState`, `DesiredState`, source/enrichment/target parameters) — |
| 11 | * e.g. an operational dashboard or a controller that checks whether the |
| 12 | * pipe settled after a start/stop. The pipe name is injected from the |
| 13 | * binding. Provide the implementation with |
| 14 | * `Effect.provide(AWS.Pipes.DescribePipeHttp)`. |
| 15 | * ### Observing a Pipe |
| 16 | * **Example:** Read the Pipe's Live State |
| 17 | * ```typescript |
| 18 | * // init — bind the operation to the pipe |
| 19 | * const describePipe = yield* AWS.Pipes.DescribePipe(pipe); |
| 20 | * |
| 21 | * // runtime |
| 22 | * const described = yield* describePipe(); |
| 23 | * // described.CurrentState === "RUNNING" |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | */ |
| 28 | export interface DescribePipe extends Binding.Service< |
| 29 | DescribePipe, |
| 30 | "AWS.Pipes.DescribePipe", |
| 31 | ( |
| 32 | pipe: Pipe, |
| 33 | ) => Effect.Effect< |
| 34 | () => Effect.Effect<pipes.DescribePipeResponse, pipes.DescribePipeError> |
| 35 | > |
| 36 | > {} |
| 37 | export const DescribePipe = Binding.Service<DescribePipe>( |
| 38 | "AWS.Pipes.DescribePipe", |
| 39 | ); |