sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ EMRContainers/ CancelJobRun.ts

import type * as emrc from "@distilled.cloud/aws/emr-containers";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";
import type { VirtualCluster } from "./VirtualCluster.ts";

/**
 * Runtime binding for `emr-containers:CancelJobRun`.
 *
 * Cancels a job run on the bound {@link VirtualCluster}. The virtual cluster
 * ID is injected from the binding; pass the job run `id` returned by
 * `StartJobRun`. Provide the implementation with
 * `Effect.provide(AWS.EMRContainers.CancelJobRunHttp)`.
 * ### Running Jobs
 * **Example:** Cancel A Runaway Job
 * ```typescript
 * // init
 * const cancelJobRun = yield* AWS.EMRContainers.CancelJobRun(virtualCluster);
 *
 * // runtime
 * yield* cancelJobRun({ id: jobRunId });
 * ```
 *
 * @binding
 */
export interface CancelJobRun extends Binding.Service<
  CancelJobRun,
  "AWS.EMRContainers.CancelJobRun",
  (
    virtualCluster: VirtualCluster,
  ) => Effect.Effect<
    (
      request: Omit<emrc.CancelJobRunRequest, "virtualClusterId">,
    ) => Effect.Effect<emrc.CancelJobRunResponse, emrc.CancelJobRunError>
  >
> {}
export const CancelJobRun = Binding.Service<CancelJobRun>("AWS.EMRContainers.CancelJobRun");