1import type * as backupsearch from "@distilled.cloud/aws/backupsearch";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { SearchJob } from "./SearchJob.ts";
5
6/** `ListSearchJobBackups` request with `SearchJobIdentifier` injected from the bound {@link SearchJob}. */
7export 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 */
36export 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
51export const ListSearchJobBackups = Binding.Service<ListSearchJobBackups>(
52 "AWS.BackupSearch.ListSearchJobBackups",
53);