The best way to control Claude Code, Codex and more from any computer or phone

main
ts 57 lines 1.89 KB
Raw
1 import type * as backup from "@distilled.cloud/aws/backup";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { BackupVault } from "./BackupVault.ts";
5
6 /**
7 * `GetRecoveryPointRestoreMetadata` request with `BackupVaultName` injected
8 * from the bound {@link BackupVault}.
9 */
10 export 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 */
41 export 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 > {}
55 export const GetRecoveryPointRestoreMetadata = Binding.Service<GetRecoveryPointRestoreMetadata>(
56 "AWS.Backup.GetRecoveryPointRestoreMetadata",
57 );