Skip to content

DeleteSnapshot

Source: src/AWS/FSx/DeleteSnapshot.ts

Runtime binding for the DeleteSnapshot operation (IAM action fsx:DeleteSnapshot on * — runtime-created snapshots have ARNs unknowable at deploy time).

Deletes an FSx for OpenZFS snapshot by id — the teardown half of a runtime snapshot rotation built with CreateSnapshot. Deleting an already-deleted snapshot surfaces the typed SnapshotNotFound. Provide the implementation with Effect.provide(AWS.FSx.DeleteSnapshotHttp).

const deleteSnapshot = yield* AWS.FSx.DeleteSnapshot();
yield* deleteSnapshot({ SnapshotId: old.SnapshotId! }).pipe(
Effect.catchTag("SnapshotNotFound", () => Effect.void),
);