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 `DescribeVolumes` operation (IAM action
7 * `fsx:DescribeVolumes` on `*`).
8 *
9 * Lists FSx for ONTAP / OpenZFS volumes — optionally filtered by
10 * `file-system-id` or `storage-virtual-machine-id` — from inside a function
11 * runtime. Useful for discovering the volume ids that the snapshot bindings
12 * operate on. Provide the implementation with
13 * `Effect.provide(AWS.FSx.DescribeVolumesHttp)`.
14 * ### Inspecting File Systems
15 * **Example:** List a file system's volumes
16 * ```typescript
17 * const describeVolumes = yield* AWS.FSx.DescribeVolumes();
18 *
19 * const response = yield* describeVolumes({
20 * Filters: [{ Name: "file-system-id", Values: [fileSystemId] }],
21 * });
22 * yield* Effect.log(`${response.Volumes?.length ?? 0} volumes`);
23 * ```
24 *
25 * @binding
26 */
27export interface DescribeVolumes extends Binding.Service<
28 DescribeVolumes,
29 "AWS.FSx.DescribeVolumes",
30 () => Effect.Effect<
31 (
32 request?: fsx.DescribeVolumesRequest,
33 ) => Effect.Effect<fsx.DescribeVolumesResponse, fsx.DescribeVolumesError>
34 >
35> {}
36export const DescribeVolumes = Binding.Service<DescribeVolumes>(
37 "AWS.FSx.DescribeVolumes",
38);