| 1 | import type * as memorydb from "@distilled.cloud/aws/memorydb"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for the `CopySnapshot` operation (IAM actions |
| 7 | * `memorydb:CopySnapshot` + `memorydb:TagResource` on the snapshot ARN |
| 8 | * wildcard — snapshot names are runtime data). |
| 9 | * |
| 10 | * Makes a copy of an existing snapshot, optionally exporting it to an S3 |
| 11 | * bucket via `TargetBucket`. Provide the implementation with |
| 12 | * `Effect.provide(AWS.MemoryDB.CopySnapshotHttp)`. |
| 13 | * ### Managing Snapshots |
| 14 | * **Example:** Copy a Snapshot |
| 15 | * ```typescript |
| 16 | * const copySnapshot = yield* MemoryDB.CopySnapshot(); |
| 17 | * |
| 18 | * const result = yield* copySnapshot({ |
| 19 | * SourceSnapshotName: "pre-migration", |
| 20 | * TargetSnapshotName: "pre-migration-archive", |
| 21 | * }); |
| 22 | * // result.Snapshot.Status → "creating" |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface CopySnapshot extends Binding.Service< |
| 28 | CopySnapshot, |
| 29 | "AWS.MemoryDB.CopySnapshot", |
| 30 | () => Effect.Effect< |
| 31 | ( |
| 32 | request: memorydb.CopySnapshotRequest, |
| 33 | ) => Effect.Effect< |
| 34 | memorydb.CopySnapshotResponse, |
| 35 | memorydb.CopySnapshotError |
| 36 | > |
| 37 | > |
| 38 | > {} |
| 39 | export const CopySnapshot = Binding.Service<CopySnapshot>( |
| 40 | "AWS.MemoryDB.CopySnapshot", |
| 41 | ); |