| 1 | import type * as elasticache from "@distilled.cloud/aws/elasticache"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for the `DescribeServerlessCacheSnapshots` operation (IAM |
| 7 | * action `elasticache:DescribeServerlessCacheSnapshots`). |
| 8 | * |
| 9 | * Lists serverless cache snapshots — all of them, one by name, or those of a |
| 10 | * particular cache. Available for valkey, redis, and serverless memcached. |
| 11 | * Provide the implementation with |
| 12 | * `Effect.provide(AWS.ElastiCache.DescribeServerlessCacheSnapshotsHttp)`. |
| 13 | * ### Managing Snapshots |
| 14 | * **Example:** List a Cache's Snapshots |
| 15 | * ```typescript |
| 16 | * const describeSnapshots = yield* ElastiCache.DescribeServerlessCacheSnapshots(); |
| 17 | * |
| 18 | * const result = yield* describeSnapshots({ ServerlessCacheName: name }); |
| 19 | * for (const snapshot of result.ServerlessCacheSnapshots ?? []) { |
| 20 | * yield* Effect.logInfo(`${snapshot.ServerlessCacheSnapshotName}: ${snapshot.Status}`); |
| 21 | * } |
| 22 | * ``` |
| 23 | * |
| 24 | * @binding |
| 25 | */ |
| 26 | export interface DescribeServerlessCacheSnapshots extends Binding.Service< |
| 27 | DescribeServerlessCacheSnapshots, |
| 28 | "AWS.ElastiCache.DescribeServerlessCacheSnapshots", |
| 29 | () => Effect.Effect< |
| 30 | ( |
| 31 | request?: elasticache.DescribeServerlessCacheSnapshotsRequest, |
| 32 | ) => Effect.Effect< |
| 33 | elasticache.DescribeServerlessCacheSnapshotsResponse, |
| 34 | elasticache.DescribeServerlessCacheSnapshotsError |
| 35 | > |
| 36 | > |
| 37 | > {} |
| 38 | export const DescribeServerlessCacheSnapshots = |
| 39 | Binding.Service<DescribeServerlessCacheSnapshots>( |
| 40 | "AWS.ElastiCache.DescribeServerlessCacheSnapshots", |
| 41 | ); |