| 1 | import type * as deadline from "@distilled.cloud/aws/deadline"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Queue } from "./Queue.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `deadline:ListJobs`. |
| 8 | * |
| 9 | * Enumerates the jobs in the bound {@link Queue} (paginated). The queue's |
| 10 | * `farmId`/`queueId` are injected from the binding. Provide the |
| 11 | * implementation with `Effect.provide(AWS.Deadline.ListJobsHttp)`. |
| 12 | * ### Monitoring Jobs |
| 13 | * **Example:** List The Queue's Jobs |
| 14 | * ```typescript |
| 15 | * // init — bind the operation to the queue |
| 16 | * const listJobs = yield* AWS.Deadline.ListJobs(queue); |
| 17 | * |
| 18 | * // runtime |
| 19 | * const { jobs } = yield* listJobs(); |
| 20 | * ``` |
| 21 | * |
| 22 | * @binding |
| 23 | */ |
| 24 | export interface ListJobs extends Binding.Service< |
| 25 | ListJobs, |
| 26 | "AWS.Deadline.ListJobs", |
| 27 | ( |
| 28 | queue: Queue, |
| 29 | ) => Effect.Effect< |
| 30 | ( |
| 31 | request?: Omit<deadline.ListJobsRequest, "farmId" | "queueId">, |
| 32 | ) => Effect.Effect<deadline.ListJobsResponse, deadline.ListJobsError> |
| 33 | > |
| 34 | > {} |
| 35 | export const ListJobs = Binding.Service<ListJobs>("AWS.Deadline.ListJobs"); |