| 1 | import type * as fsx from "@distilled.cloud/aws/fsx"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for the `DescribeBackups` operation (IAM action |
| 7 | * `fsx:DescribeBackups` on `*`). |
| 8 | * |
| 9 | * Lists FSx backups — optionally filtered by `file-system-id`, |
| 10 | * `backup-type`, or explicit `BackupIds` — from inside a function runtime. |
| 11 | * Pairs with {@link CreateBackup} to poll a runtime-initiated backup until |
| 12 | * it reaches `AVAILABLE`. Provide the implementation with |
| 13 | * `Effect.provide(AWS.FSx.DescribeBackupsHttp)`. |
| 14 | * ### Managing Backups at Runtime |
| 15 | * **Example:** List a file system's backups |
| 16 | * ```typescript |
| 17 | * const describeBackups = yield* AWS.FSx.DescribeBackups(); |
| 18 | * |
| 19 | * const response = yield* describeBackups({ |
| 20 | * Filters: [{ Name: "file-system-id", Values: [fileSystemId] }], |
| 21 | * }); |
| 22 | * yield* Effect.log(`${response.Backups?.length ?? 0} backups`); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface DescribeBackups extends Binding.Service< |
| 28 | DescribeBackups, |
| 29 | "AWS.FSx.DescribeBackups", |
| 30 | () => Effect.Effect< |
| 31 | ( |
| 32 | request?: fsx.DescribeBackupsRequest, |
| 33 | ) => Effect.Effect<fsx.DescribeBackupsResponse, fsx.DescribeBackupsError> |
| 34 | > |
| 35 | > {} |
| 36 | export const DescribeBackups = Binding.Service<DescribeBackups>( |
| 37 | "AWS.FSx.DescribeBackups", |
| 38 | ); |