| 1 | import type * as backup from "@distilled.cloud/aws/backup"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for the `PutRestoreValidationResult` operation (IAM action |
| 7 | * `backup:PutRestoreValidationResult`). |
| 8 | * |
| 9 | * Reports the result of a restore-test validation. This is the canonical |
| 10 | * runtime use of AWS Backup: restore testing invokes a validation Lambda |
| 11 | * after a restore-test job completes; the Lambda checks the restored |
| 12 | * resource (fetch its metadata with `GetRestoreJobMetadata`, query the |
| 13 | * restored table/volume, …) and posts `SUCCESSFUL` or `FAILED` back to the |
| 14 | * restore job. Provide the implementation with |
| 15 | * `Effect.provide(AWS.Backup.PutRestoreValidationResultHttp)`. |
| 16 | * ### Restore Testing Validation |
| 17 | * **Example:** Report A Restore Test Verdict |
| 18 | * ```typescript |
| 19 | * const putRestoreValidationResult = |
| 20 | * yield* AWS.Backup.PutRestoreValidationResult(); |
| 21 | * |
| 22 | * yield* putRestoreValidationResult({ |
| 23 | * RestoreJobId: restoreJobId, |
| 24 | * ValidationStatus: "SUCCESSFUL", |
| 25 | * ValidationStatusMessage: "restored table row count matches source", |
| 26 | * }); |
| 27 | * ``` |
| 28 | * |
| 29 | * @binding |
| 30 | */ |
| 31 | export interface PutRestoreValidationResult extends Binding.Service< |
| 32 | PutRestoreValidationResult, |
| 33 | "AWS.Backup.PutRestoreValidationResult", |
| 34 | () => Effect.Effect< |
| 35 | ( |
| 36 | request: backup.PutRestoreValidationResultInput, |
| 37 | ) => Effect.Effect< |
| 38 | backup.PutRestoreValidationResultResponse, |
| 39 | backup.PutRestoreValidationResultError |
| 40 | > |
| 41 | > |
| 42 | > {} |
| 43 | export const PutRestoreValidationResult = |
| 44 | Binding.Service<PutRestoreValidationResult>( |
| 45 | "AWS.Backup.PutRestoreValidationResult", |
| 46 | ); |