The best way to control Claude Code, Codex and more from any computer or phone

main
ts 40 lines 1.44 KB
Raw
1 import type * as fsx from "@distilled.cloud/aws/fsx";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for the `RestoreVolumeFromSnapshot` operation (IAM action
7 * `fsx:RestoreVolumeFromSnapshot` on `*`).
8 *
9 * Rolls an FSx for OpenZFS volume back to the state saved by a snapshot —
10 * the undo half of the runtime snapshot pattern built with
11 * {@link CreateSnapshot}. Pass `Options: ["DELETE_INTERMEDIATE_SNAPSHOTS"]`
12 * to roll back past newer snapshots. Provide the implementation with
13 * `Effect.provide(AWS.FSx.RestoreVolumeFromSnapshotHttp)`.
14 * ### Managing Snapshots at Runtime
15 * **Example:** Roll back a failed batch of writes
16 * ```typescript
17 * const restoreVolumeFromSnapshot =
18 * yield* AWS.FSx.RestoreVolumeFromSnapshot();
19 *
20 * const response = yield* restoreVolumeFromSnapshot({
21 * VolumeId: volumeId,
22 * SnapshotId: snapshot.SnapshotId!,
23 * });
24 * yield* Effect.log(`volume ${response.VolumeId} restoring`);
25 * ```
26 *
27 * @binding
28 */
29 export interface RestoreVolumeFromSnapshot extends Binding.Service<
30 RestoreVolumeFromSnapshot,
31 "AWS.FSx.RestoreVolumeFromSnapshot",
32 () => Effect.Effect<
33 (
34 request: fsx.RestoreVolumeFromSnapshotRequest,
35 ) => Effect.Effect<fsx.RestoreVolumeFromSnapshotResponse, fsx.RestoreVolumeFromSnapshotError>
36 >
37 > {}
38 export const RestoreVolumeFromSnapshot = Binding.Service<RestoreVolumeFromSnapshot>(
39 "AWS.FSx.RestoreVolumeFromSnapshot",
40 );