The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 06:00 UTC
| 1 | import type * as batch from "@distilled.cloud/aws/batch"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type * as Effect from "effect/Effect"; |
| 4 | import type { JobQueue } from "./JobQueue.ts"; |
| 5 | |
| 6 | /** |
| 7 | * The queue is injected by the binding; filter by `jobStatus` (default |
| 8 | * `RUNNING`), `filters`, or paginate with `nextToken`/`maxResults`. |
| 9 | */ |
| 10 | export interface ListJobsRequest extends Omit<batch.ListJobsRequest, "jobQueue"> {} |
| 11 | |
| 12 | /** |
| 13 | * List AWS Batch jobs in the bound job queue from runtime code. |
| 14 | * `batch:ListJobs` has no resource-level IAM, so the policy is |
| 15 | * service-scoped; the queue anchors the binding and is injected as the |
| 16 | * `jobQueue` selector. |
| 17 | * |
| 18 | * ### Listing Jobs |
| 19 | * **Example:** List runnable jobs in the queue |
| 20 | * ```typescript |
| 21 | * const listJobs = yield* Batch.ListJobs(queue); |
| 22 | * const { jobSummaryList } = yield* listJobs({ jobStatus: "RUNNABLE" }); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface ListJobs extends Binding.Service< |
| 28 | ListJobs, |
| 29 | "AWS.Batch.ListJobs", |
| 30 | ( |
| 31 | queue: JobQueue, |
| 32 | ) => Effect.Effect< |
| 33 | (request?: ListJobsRequest) => Effect.Effect<batch.ListJobsResponse, batch.ListJobsError> |
| 34 | > |
| 35 | > {} |
| 36 | export const ListJobs = Binding.Service<ListJobs>("AWS.Batch.ListJobs"); |