1import type * as backup from "@distilled.cloud/aws/backup";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { BackupVault } from "./BackupVault.ts";
5
6/**
7 * `GetRecoveryPointRestoreMetadata` request with `BackupVaultName` injected
8 * from the bound {@link BackupVault}.
9 */
10export interface GetRecoveryPointRestoreMetadataRequest extends Omit<
11 backup.GetRecoveryPointRestoreMetadataInput,
12 "BackupVaultName"
13> {}
14
15/**
16 * Runtime binding for the `GetRecoveryPointRestoreMetadata` operation (IAM
17 * action `backup:GetRecoveryPointRestoreMetadata`).
18 *
19 * Returns the restore metadata for a recovery point in the bound
20 * {@link BackupVault} — the key/value set passed to `StartRestoreJob` as its
21 * `Metadata`. Provide the implementation with
22 * `Effect.provide(AWS.Backup.GetRecoveryPointRestoreMetadataHttp)`.
23 * ### Restoring Recovery Points
24 * **Example:** Fetch Restore Metadata Then Restore
25 * ```typescript
26 * const getRestoreMetadata =
27 * yield* AWS.Backup.GetRecoveryPointRestoreMetadata(vault);
28 * const startRestoreJob = yield* AWS.Backup.StartRestoreJob(role);
29 *
30 * const { RestoreMetadata } = yield* getRestoreMetadata({
31 * RecoveryPointArn: recoveryPointArn,
32 * });
33 * yield* startRestoreJob({
34 * RecoveryPointArn: recoveryPointArn,
35 * Metadata: RestoreMetadata!,
36 * });
37 * ```
38 *
39 * @binding
40 */
41export interface GetRecoveryPointRestoreMetadata extends Binding.Service<
42 GetRecoveryPointRestoreMetadata,
43 "AWS.Backup.GetRecoveryPointRestoreMetadata",
44 (
45 vault: BackupVault,
46 ) => Effect.Effect<
47 (
48 request: GetRecoveryPointRestoreMetadataRequest,
49 ) => Effect.Effect<
50 backup.GetRecoveryPointRestoreMetadataOutput,
51 backup.GetRecoveryPointRestoreMetadataError
52 >
53 >
54> {}
55export const GetRecoveryPointRestoreMetadata =
56 Binding.Service<GetRecoveryPointRestoreMetadata>(
57 "AWS.Backup.GetRecoveryPointRestoreMetadata",
58 );