@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

main
ts 42 lines 1.32 KB
Raw
1 import type * as glue from "@distilled.cloud/aws/glue";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Job } from "./Job.ts";
5
6 export interface BatchStopJobRunRequest extends Omit<glue.BatchStopJobRunRequest, "JobName"> {}
7
8 /**
9 * Runtime binding for `glue:BatchStopJobRun`.
10 *
11 * Stops one or more in-flight runs of the bound {@link Job}. Per-run
12 * failures come back in the response's `Errors` list (the call itself
13 * succeeds), so inspect `SuccessfulSubmissions`/`Errors` rather than the
14 * error channel. The job name is injected from the binding. Provide the
15 * implementation with `Effect.provide(AWS.Glue.BatchStopJobRunHttp)`.
16 * ### Running Jobs
17 * **Example:** Stop a Run
18 * ```typescript
19 * // init
20 * const batchStopJobRun = yield* AWS.Glue.BatchStopJobRun(job);
21 *
22 * // runtime
23 * const { SuccessfulSubmissions, Errors } = yield* batchStopJobRun({
24 * JobRunIds: [runId],
25 * });
26 * ```
27 *
28 * @binding
29 */
30 export interface BatchStopJobRun extends Binding.Service<
31 BatchStopJobRun,
32 "AWS.Glue.BatchStopJobRun",
33 (
34 job: Job,
35 ) => Effect.Effect<
36 (
37 request: BatchStopJobRunRequest,
38 ) => Effect.Effect<glue.BatchStopJobRunResponse, glue.BatchStopJobRunError>
39 >
40 > {}
41
42 export const BatchStopJobRun = Binding.Service<BatchStopJobRun>("AWS.Glue.BatchStopJobRun");