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 `DeleteSnapshot` operation (IAM action
7 * `fsx:DeleteSnapshot` on `*` — runtime-created snapshots have ARNs
8 * unknowable at deploy time).
9 *
10 * Deletes an FSx for OpenZFS snapshot by id — the teardown half of a
11 * runtime snapshot rotation built with {@link CreateSnapshot}. Deleting an
12 * already-deleted snapshot surfaces the typed `SnapshotNotFound`. Provide
13 * the implementation with `Effect.provide(AWS.FSx.DeleteSnapshotHttp)`.
14 * ### Managing Snapshots at Runtime
15 * **Example:** Rotate out an old snapshot
16 * ```typescript
17 * const deleteSnapshot = yield* AWS.FSx.DeleteSnapshot();
18 *
19 * yield* deleteSnapshot({ SnapshotId: old.SnapshotId! }).pipe(
20 * Effect.catchTag("SnapshotNotFound", () => Effect.void),
21 * );
22 * ```
23 *
24 * @binding
25 */
26export interface DeleteSnapshot extends Binding.Service<
27 DeleteSnapshot,
28 "AWS.FSx.DeleteSnapshot",
29 () => Effect.Effect<
30 (
31 request: fsx.DeleteSnapshotRequest,
32 ) => Effect.Effect<fsx.DeleteSnapshotResponse, fsx.DeleteSnapshotError>
33 >
34> {}
35export const DeleteSnapshot = Binding.Service<DeleteSnapshot>(
36 "AWS.FSx.DeleteSnapshot",
37);