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 `DescribeSnapshots` operation (IAM action
7 * `fsx:DescribeSnapshots` on `*`).
8 *
9 * Lists FSx for OpenZFS snapshots — optionally filtered by `volume-id` or
10 * `file-system-id` — from inside a function runtime. Pairs with
11 * {@link CreateSnapshot} to poll a runtime-initiated snapshot until it
12 * reaches `AVAILABLE`. Provide the implementation with
13 * `Effect.provide(AWS.FSx.DescribeSnapshotsHttp)`.
14 * ### Managing Snapshots at Runtime
15 * **Example:** List a volume's snapshots
16 * ```typescript
17 * const describeSnapshots = yield* AWS.FSx.DescribeSnapshots();
18 *
19 * const response = yield* describeSnapshots({
20 * Filters: [{ Name: "volume-id", Values: [volumeId] }],
21 * });
22 * yield* Effect.log(`${response.Snapshots?.length ?? 0} snapshots`);
23 * ```
24 *
25 * @binding
26 */
27export interface DescribeSnapshots extends Binding.Service<
28 DescribeSnapshots,
29 "AWS.FSx.DescribeSnapshots",
30 () => Effect.Effect<
31 (
32 request?: fsx.DescribeSnapshotsRequest,
33 ) => Effect.Effect<
34 fsx.DescribeSnapshotsResponse,
35 fsx.DescribeSnapshotsError
36 >
37 >
38> {}
39export const DescribeSnapshots = Binding.Service<DescribeSnapshots>(
40 "AWS.FSx.DescribeSnapshots",
41);