| 1 | import type * as docdb from "@distilled.cloud/aws/docdb"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for the `DescribeDBClusterSnapshots` operation (IAM |
| 7 | * action `rds:DescribeDBClusterSnapshots` — DocumentDB shares the RDS |
| 8 | * control plane). |
| 9 | * |
| 10 | * Lists the account's DocumentDB cluster snapshots (optionally filtered by |
| 11 | * cluster or snapshot identifier) with status and creation time embedded — |
| 12 | * pairs with `CreateDBClusterSnapshot`/`DeleteDBClusterSnapshot` for backup |
| 13 | * automation. Provide the implementation with |
| 14 | * `Effect.provide(AWS.DocDB.DescribeDBClusterSnapshotsHttp)`. |
| 15 | * ### Managing Snapshots |
| 16 | * **Example:** Poll a Snapshot until Available |
| 17 | * ```typescript |
| 18 | * const describeSnapshots = yield* DocDB.DescribeDBClusterSnapshots(); |
| 19 | * |
| 20 | * const page = yield* describeSnapshots({ |
| 21 | * DBClusterSnapshotIdentifier: "nightly-2026-07-15", |
| 22 | * }); |
| 23 | * const status = page.DBClusterSnapshots?.[0]?.Status; |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | */ |
| 28 | export interface DescribeDBClusterSnapshots extends Binding.Service< |
| 29 | DescribeDBClusterSnapshots, |
| 30 | "AWS.DocDB.DescribeDBClusterSnapshots", |
| 31 | () => Effect.Effect< |
| 32 | ( |
| 33 | request?: docdb.DescribeDBClusterSnapshotsMessage, |
| 34 | ) => Effect.Effect< |
| 35 | docdb.DBClusterSnapshotMessage, |
| 36 | docdb.DescribeDBClusterSnapshotsError |
| 37 | > |
| 38 | > |
| 39 | > {} |
| 40 | export const DescribeDBClusterSnapshots = |
| 41 | Binding.Service<DescribeDBClusterSnapshots>( |
| 42 | "AWS.DocDB.DescribeDBClusterSnapshots", |
| 43 | ); |