| 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 `UpdateSnapshot` operation (IAM action |
| 7 | * `fsx:UpdateSnapshot` on `*` — runtime-created snapshots have ARNs |
| 8 | * unknowable at deploy time). |
| 9 | * |
| 10 | * Renames an OpenZFS volume snapshot — the management half of a runtime |
| 11 | * snapshot rotation built with {@link CreateSnapshot}. A missing snapshot |
| 12 | * surfaces the typed `UpdateSnapshotNotFound` (FSx reports it as a wire |
| 13 | * `BadRequest`; the distilled patch carves out the typed tag by message). |
| 14 | * Provide the implementation with |
| 15 | * `Effect.provide(AWS.FSx.UpdateSnapshotHttp)`. |
| 16 | * ### Managing Snapshots at Runtime |
| 17 | * **Example:** Rename a snapshot after promotion |
| 18 | * ```typescript |
| 19 | * const updateSnapshot = yield* AWS.FSx.UpdateSnapshot(); |
| 20 | * |
| 21 | * yield* updateSnapshot({ |
| 22 | * SnapshotId: snapshot.SnapshotId!, |
| 23 | * Name: "nightly-promoted", |
| 24 | * }); |
| 25 | * ``` |
| 26 | * |
| 27 | * @binding |
| 28 | */ |
| 29 | export interface UpdateSnapshot extends Binding.Service< |
| 30 | UpdateSnapshot, |
| 31 | "AWS.FSx.UpdateSnapshot", |
| 32 | () => Effect.Effect< |
| 33 | ( |
| 34 | request: fsx.UpdateSnapshotRequest, |
| 35 | ) => Effect.Effect<fsx.UpdateSnapshotResponse, fsx.UpdateSnapshotError> |
| 36 | > |
| 37 | > {} |
| 38 | export const UpdateSnapshot = Binding.Service<UpdateSnapshot>( |
| 39 | "AWS.FSx.UpdateSnapshot", |
| 40 | ); |