@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 36 lines 1.3 KB
Raw
1 import type * as fsx from "@distilled.cloud/aws/fsx";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
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 */
27 export interface DescribeSnapshots extends Binding.Service<
28 DescribeSnapshots,
29 "AWS.FSx.DescribeSnapshots",
30 () => Effect.Effect<
31 (
32 request?: fsx.DescribeSnapshotsRequest,
33 ) => Effect.Effect<fsx.DescribeSnapshotsResponse, fsx.DescribeSnapshotsError>
34 >
35 > {}
36 export const DescribeSnapshots = Binding.Service<DescribeSnapshots>("AWS.FSx.DescribeSnapshots");