sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ DataBrew/ StartJobRun.ts

import type * as SVC from "@distilled.cloud/aws/databrew";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";
import type { Job } from "./Job.ts";

/**
 * Runtime binding for `databrew:StartJobRun` — lets a workload kick off a
 * run of a DataBrew job (a `PROFILE` analysis or a `RECIPE` transformation).
 *
 * The response carries the `RunId`, which can be observed with the
 * {@link DescribeJobRun} binding and cancelled with {@link StopJobRun}.
 * ### Starting Job Runs
 * **Example:** Start a Job Run
 * ```typescript
 * const startJobRun = yield* AWS.DataBrew.StartJobRun(job);
 *
 * const { RunId } = yield* startJobRun();
 * ```
 *
 * @binding
 */
export interface StartJobRun extends Binding.Service<
  StartJobRun,
  "AWS.DataBrew.StartJobRun",
  <J extends Job>(
    job: J,
  ) => Effect.Effect<() => Effect.Effect<SVC.StartJobRunResponse, SVC.StartJobRunError>>
> {}
export const StartJobRun = Binding.Service<StartJobRun>("AWS.DataBrew.StartJobRun");