| 1 | import type * as backupsearch from "@distilled.cloud/aws/backupsearch"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { SearchJob } from "./SearchJob.ts"; |
| 5 | |
| 6 | /** `ListSearchJobBackups` request with `SearchJobIdentifier` injected from the bound {@link SearchJob}. */ |
| 7 | export interface ListSearchJobBackupsRequest extends Omit< |
| 8 | backupsearch.ListSearchJobBackupsInput, |
| 9 | "SearchJobIdentifier" |
| 10 | > {} |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for `backup-search:ListSearchJobBackups`. |
| 14 | * |
| 15 | * Pages through the recovery points included in the bound search job, with |
| 16 | * each backup's per-job status — including backups skipped because their |
| 17 | * index is not `ACTIVE` or a permissions issue marked them `FAILED`. Provide |
| 18 | * the implementation with |
| 19 | * `Effect.provide(AWS.BackupSearch.ListSearchJobBackupsHttp)`. |
| 20 | * ### Reading Searched Backups |
| 21 | * **Example:** List the Search Job's Backups |
| 22 | * ```typescript |
| 23 | * // init — bind the operation to the search job |
| 24 | * const listSearchJobBackups = |
| 25 | * yield* AWS.BackupSearch.ListSearchJobBackups(search); |
| 26 | * |
| 27 | * // runtime |
| 28 | * const page = yield* listSearchJobBackups({ MaxResults: 100 }); |
| 29 | * for (const backup of page.Results) { |
| 30 | * console.log(backup.BackupResourceArn, backup.Status); |
| 31 | * } |
| 32 | * ``` |
| 33 | * |
| 34 | * @binding |
| 35 | */ |
| 36 | export interface ListSearchJobBackups extends Binding.Service< |
| 37 | ListSearchJobBackups, |
| 38 | "AWS.BackupSearch.ListSearchJobBackups", |
| 39 | ( |
| 40 | searchJob: SearchJob, |
| 41 | ) => Effect.Effect< |
| 42 | ( |
| 43 | request?: ListSearchJobBackupsRequest, |
| 44 | ) => Effect.Effect< |
| 45 | backupsearch.ListSearchJobBackupsOutput, |
| 46 | backupsearch.ListSearchJobBackupsError |
| 47 | > |
| 48 | > |
| 49 | > {} |
| 50 | |
| 51 | export const ListSearchJobBackups = Binding.Service<ListSearchJobBackups>( |
| 52 | "AWS.BackupSearch.ListSearchJobBackups", |
| 53 | ); |