| 1 | import type * as neptunegraph from "@distilled.cloud/aws/neptune-graph"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Graph } from "./Graph.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for the `StopGraph` operation (IAM action `neptune-graph:StopGraph`), |
| 8 | * scoped to one {@link Graph}. |
| 9 | * |
| 10 | * Stops the bound graph to pause compute (m-NCU) billing while retaining data — e.g. a scheduler Lambda parking dev graphs overnight. Restart with {@link StartGraph}. Provide the implementation with |
| 11 | * `Effect.provide(AWS.NeptuneGraph.StopGraphHttp)`. |
| 12 | * ### Starting and Stopping a Graph |
| 13 | * **Example:** Stop a graph to pause billing |
| 14 | * ```typescript |
| 15 | * const stopGraph = yield* NeptuneGraph.StopGraph(graph); |
| 16 | * |
| 17 | * const result = yield* stopGraph(); |
| 18 | * // result.status → "STOPPING" |
| 19 | * ``` |
| 20 | * |
| 21 | * @binding |
| 22 | */ |
| 23 | export interface StopGraph extends Binding.Service< |
| 24 | StopGraph, |
| 25 | "AWS.NeptuneGraph.StopGraph", |
| 26 | ( |
| 27 | graph: Graph, |
| 28 | ) => Effect.Effect< |
| 29 | () => Effect.Effect< |
| 30 | neptunegraph.StopGraphOutput, |
| 31 | neptunegraph.StopGraphError |
| 32 | > |
| 33 | > |
| 34 | > {} |
| 35 | export const StopGraph = Binding.Service<StopGraph>( |
| 36 | "AWS.NeptuneGraph.StopGraph", |
| 37 | ); |