1import type * as fsx from "@distilled.cloud/aws/fsx";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for the `CreateSnapshot` operation (IAM actions
7 * `fsx:CreateSnapshot` and `fsx:TagResource` on `*` — snapshots target
8 * OpenZFS volumes whose ARNs are typically runtime values).
9 *
10 * Takes a point-in-time snapshot of an FSx for OpenZFS volume — e.g.
11 * before applying a batch of writes so they can be rolled back with
12 * {@link RestoreVolumeFromSnapshot}. Pass a `ClientRequestToken` to make
13 * the call idempotent. Provide the implementation with
14 * `Effect.provide(AWS.FSx.CreateSnapshotHttp)`.
15 * ### Managing Snapshots at Runtime
16 * **Example:** Snapshot a volume before a risky write
17 * ```typescript
18 * const createSnapshot = yield* AWS.FSx.CreateSnapshot();
19 *
20 * const response = yield* createSnapshot({
21 * Name: "pre-batch-42",
22 * VolumeId: volumeId,
23 * });
24 * yield* Effect.log(`snapshot ${response.Snapshot?.SnapshotId} started`);
25 * ```
26 *
27 * @binding
28 */
29export interface CreateSnapshot extends Binding.Service<
30 CreateSnapshot,
31 "AWS.FSx.CreateSnapshot",
32 () => Effect.Effect<
33 (
34 request: fsx.CreateSnapshotRequest,
35 ) => Effect.Effect<fsx.CreateSnapshotResponse, fsx.CreateSnapshotError>
36 >
37> {}
38export const CreateSnapshot = Binding.Service<CreateSnapshot>(
39 "AWS.FSx.CreateSnapshot",
40);