The best way to control Claude Code, Codex and more from any computer or phone

main
ts 38 lines 1.18 KB
Raw
1 import type * as SVC from "@distilled.cloud/aws/emr";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Cluster } from "./Cluster.ts";
5
6 /**
7 * Runtime binding for `elasticmapreduce:AddJobFlowSteps` — submits work (Spark jobs, Hive queries, custom JARs) to the bound cluster as steps. The cluster id is injected as `JobFlowId`.
8 * ### Running Steps
9 * **Example:** Submit a Spark Step
10 * ```typescript
11 * const addSteps = yield* AWS.EMR.AddJobFlowSteps(cluster);
12 *
13 * const { StepIds } = yield* addSteps({
14 * Steps: [{
15 * Name: "spark-pi",
16 * ActionOnFailure: "CONTINUE",
17 * HadoopJarStep: {
18 * Jar: "command-runner.jar",
19 * Args: ["spark-example", "SparkPi", "10"],
20 * },
21 * }],
22 * });
23 * ```
24 *
25 * @binding
26 */
27 export interface AddJobFlowSteps extends Binding.Service<
28 AddJobFlowSteps,
29 "AWS.EMR.AddJobFlowSteps",
30 <C extends Cluster>(
31 cluster: C,
32 ) => Effect.Effect<
33 (
34 request: Omit<SVC.AddJobFlowStepsInput, "JobFlowId">,
35 ) => Effect.Effect<SVC.AddJobFlowStepsOutput, SVC.AddJobFlowStepsError>
36 >
37 > {}
38 export const AddJobFlowSteps = Binding.Service<AddJobFlowSteps>("AWS.EMR.AddJobFlowSteps");