1import type * as cloudhsm from "@distilled.cloud/aws/cloudhsm-v2";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for the `RestoreBackup` operation (IAM action
7 * `cloudhsm:RestoreBackup`).
8 *
9 * Recovers a CloudHSM backup in the `PENDING_DELETION` state back to
10 * `READY` — the undo for `DeleteBackup`, available for 7 days after the
11 * delete. Provide the implementation with
12 * `Effect.provide(AWS.CloudHSMV2.RestoreBackupHttp)`.
13 * ### Managing Backups
14 * **Example:** Undo A Backup Deletion
15 * ```typescript
16 * const restoreBackup = yield* AWS.CloudHSMV2.RestoreBackup();
17 *
18 * const restored = yield* restoreBackup({ BackupId: backupId });
19 * // restored.Backup?.BackupState === "READY"
20 * ```
21 *
22 * @binding
23 */
24export interface RestoreBackup extends Binding.Service<
25 RestoreBackup,
26 "AWS.CloudHSMV2.RestoreBackup",
27 () => Effect.Effect<
28 (
29 request: cloudhsm.RestoreBackupRequest,
30 ) => Effect.Effect<
31 cloudhsm.RestoreBackupResponse,
32 cloudhsm.RestoreBackupError
33 >
34 >
35> {}
36export const RestoreBackup = Binding.Service<RestoreBackup>(
37 "AWS.CloudHSMV2.RestoreBackup",
38);