| 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 `DeleteServerlessCacheSnapshot` operation (IAM |
| 7 | * action `elasticache:DeleteServerlessCacheSnapshot`). |
| 8 | * |
| 9 | * Deletes a serverless cache snapshot by name — e.g. rotating out old manual |
| 10 | * backups from a maintenance Lambda. Available for valkey, redis, and |
| 11 | * serverless memcached. Provide the implementation with |
| 12 | * `Effect.provide(AWS.ElastiCache.DeleteServerlessCacheSnapshotHttp)`. |
| 13 | * ### Managing Snapshots |
| 14 | * **Example:** Delete an Old Snapshot |
| 15 | * ```typescript |
| 16 | * const deleteSnapshot = yield* ElastiCache.DeleteServerlessCacheSnapshot(); |
| 17 | * |
| 18 | * yield* deleteSnapshot({ ServerlessCacheSnapshotName: "pre-migration" }).pipe( |
| 19 | * Effect.catchTag("ServerlessCacheSnapshotNotFoundFault", () => Effect.void), |
| 20 | * ); |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface DeleteServerlessCacheSnapshot extends Binding.Service< |
| 26 | DeleteServerlessCacheSnapshot, |
| 27 | "AWS.ElastiCache.DeleteServerlessCacheSnapshot", |
| 28 | () => Effect.Effect< |
| 29 | ( |
| 30 | request: elasticache.DeleteServerlessCacheSnapshotRequest, |
| 31 | ) => Effect.Effect< |
| 32 | elasticache.DeleteServerlessCacheSnapshotResponse, |
| 33 | elasticache.DeleteServerlessCacheSnapshotError |
| 34 | > |
| 35 | > |
| 36 | > {} |
| 37 | export const DeleteServerlessCacheSnapshot = |
| 38 | Binding.Service<DeleteServerlessCacheSnapshot>( |
| 39 | "AWS.ElastiCache.DeleteServerlessCacheSnapshot", |
| 40 | ); |