| 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 `CopySnapshotAndUpdateVolume` operation (IAM |
| 7 | * action `fsx:CopySnapshotAndUpdateVolume` on `*`). |
| 8 | * |
| 9 | * Updates an existing FSx for OpenZFS volume from a snapshot on another FSx |
| 10 | * for OpenZFS file system (on-demand data replication) — the cross-file-system |
| 11 | * counterpart of {@link RestoreVolumeFromSnapshot}. Provide the |
| 12 | * implementation with `Effect.provide(AWS.FSx.CopySnapshotAndUpdateVolumeHttp)`. |
| 13 | * ### Managing Snapshots at Runtime |
| 14 | * **Example:** Replicate a snapshot from another file system into a volume |
| 15 | * ```typescript |
| 16 | * const copySnapshotAndUpdateVolume = |
| 17 | * yield* AWS.FSx.CopySnapshotAndUpdateVolume(); |
| 18 | * |
| 19 | * const response = yield* copySnapshotAndUpdateVolume({ |
| 20 | * VolumeId: volumeId, |
| 21 | * SourceSnapshotARN: sourceSnapshot.ResourceARN!, |
| 22 | * CopyStrategy: "INCREMENTAL_COPY", |
| 23 | * }); |
| 24 | * yield* Effect.log(`volume ${response.VolumeId} updating`); |
| 25 | * ``` |
| 26 | * |
| 27 | * @binding |
| 28 | */ |
| 29 | export interface CopySnapshotAndUpdateVolume extends Binding.Service< |
| 30 | CopySnapshotAndUpdateVolume, |
| 31 | "AWS.FSx.CopySnapshotAndUpdateVolume", |
| 32 | () => Effect.Effect< |
| 33 | ( |
| 34 | request: fsx.CopySnapshotAndUpdateVolumeRequest, |
| 35 | ) => Effect.Effect< |
| 36 | fsx.CopySnapshotAndUpdateVolumeResponse, |
| 37 | fsx.CopySnapshotAndUpdateVolumeError |
| 38 | > |
| 39 | > |
| 40 | > {} |
| 41 | export const CopySnapshotAndUpdateVolume = |
| 42 | Binding.Service<CopySnapshotAndUpdateVolume>( |
| 43 | "AWS.FSx.CopySnapshotAndUpdateVolume", |
| 44 | ); |