| 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 | |
| 5 | /** |
| 6 | * Runtime binding for the `GetGraphSnapshot` operation (IAM action `neptune-graph:GetGraphSnapshot`). |
| 7 | * |
| 8 | * Reads one graph snapshot by id — status, source graph, and encryption key. Snapshot ids are server-generated runtime data, so the grant spans the account's snapshots. Provide the implementation with |
| 9 | * `Effect.provide(AWS.NeptuneGraph.GetGraphSnapshotHttp)`. |
| 10 | * ### Managing Snapshots |
| 11 | * **Example:** Poll a snapshot until available |
| 12 | * ```typescript |
| 13 | * const getSnapshot = yield* NeptuneGraph.GetGraphSnapshot(); |
| 14 | * |
| 15 | * const snapshot = yield* getSnapshot({ snapshotIdentifier }); |
| 16 | * // snapshot.status → "AVAILABLE" |
| 17 | * ``` |
| 18 | * |
| 19 | * @binding |
| 20 | */ |
| 21 | export interface GetGraphSnapshot extends Binding.Service< |
| 22 | GetGraphSnapshot, |
| 23 | "AWS.NeptuneGraph.GetGraphSnapshot", |
| 24 | () => Effect.Effect< |
| 25 | ( |
| 26 | request: neptunegraph.GetGraphSnapshotInput, |
| 27 | ) => Effect.Effect< |
| 28 | neptunegraph.GetGraphSnapshotOutput, |
| 29 | neptunegraph.GetGraphSnapshotError |
| 30 | > |
| 31 | > |
| 32 | > {} |
| 33 | export const GetGraphSnapshot = Binding.Service<GetGraphSnapshot>( |
| 34 | "AWS.NeptuneGraph.GetGraphSnapshot", |
| 35 | ); |