| 1 | import type * as glacier from "@distilled.cloud/aws/glacier"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Vault } from "./Vault.ts"; |
| 5 | |
| 6 | /** |
| 7 | * `ListJobs` request with `accountId` and `vaultName` injected from the bound |
| 8 | * {@link Vault}. |
| 9 | */ |
| 10 | export interface ListJobsRequest extends Omit< |
| 11 | glacier.ListJobsInput, |
| 12 | "accountId" | "vaultName" |
| 13 | > {} |
| 14 | |
| 15 | /** |
| 16 | * Runtime binding for the `ListJobs` operation (IAM action |
| 17 | * `glacier:ListJobs` on the vault ARN). |
| 18 | * |
| 19 | * Lists in-progress and recently finished jobs for the bound |
| 20 | * {@link Vault}, optionally filtered by status code or completion. |
| 21 | * Provide the implementation with |
| 22 | * `Effect.provide(AWS.Glacier.ListJobsHttp)`. |
| 23 | * ### Retrieving Archives |
| 24 | * **Example:** List the vault's jobs |
| 25 | * ```typescript |
| 26 | * const listJobs = yield* AWS.Glacier.ListJobs(vault); |
| 27 | * |
| 28 | * const { JobList } = yield* listJobs({ completed: "true" }); |
| 29 | * ``` |
| 30 | * |
| 31 | * @binding |
| 32 | */ |
| 33 | export interface ListJobs extends Binding.Service< |
| 34 | ListJobs, |
| 35 | "AWS.Glacier.ListJobs", |
| 36 | ( |
| 37 | vault: Vault, |
| 38 | ) => Effect.Effect< |
| 39 | ( |
| 40 | request?: ListJobsRequest, |
| 41 | ) => Effect.Effect<glacier.ListJobsOutput, glacier.ListJobsError> |
| 42 | > |
| 43 | > {} |
| 44 | export const ListJobs = Binding.Service<ListJobs>("AWS.Glacier.ListJobs"); |