1import type * as fsx from "@distilled.cloud/aws/fsx";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { FileSystem } from "./FileSystem.ts";
5
6/**
7 * Runtime binding for the `DescribeFileSystems` operation scoped to one file
8 * system (IAM action `fsx:DescribeFileSystems` on the file system ARN).
9 *
10 * Reads the bound {@link FileSystem}'s live description — lifecycle state,
11 * storage capacity, DNS name, engine configuration — from inside a function
12 * runtime. Useful for storage dashboards and capacity monitors. Provide the
13 * implementation with `Effect.provide(AWS.FSx.DescribeFileSystemHttp)`.
14 * ### Inspecting File Systems
15 * **Example:** Read the file system's state and capacity
16 * ```typescript
17 * // init — bind the operation to the file system
18 * const describeFileSystem = yield* AWS.FSx.DescribeFileSystem(files);
19 *
20 * // runtime
21 * const response = yield* describeFileSystem();
22 * const fs = response.FileSystems?.[0];
23 * yield* Effect.log(`${fs?.Lifecycle}: ${fs?.StorageCapacity} GiB`);
24 * ```
25 *
26 * @binding
27 */
28export interface DescribeFileSystem extends Binding.Service<
29 DescribeFileSystem,
30 "AWS.FSx.DescribeFileSystem",
31 (
32 fileSystem: FileSystem,
33 ) => Effect.Effect<
34 () => Effect.Effect<
35 fsx.DescribeFileSystemsResponse,
36 fsx.DescribeFileSystemsError
37 >
38 >
39> {}
40export const DescribeFileSystem = Binding.Service<DescribeFileSystem>(
41 "AWS.FSx.DescribeFileSystem",
42);