| 1 | import type * as SVC from "@distilled.cloud/aws/emr"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Cluster } from "./Cluster.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `elasticmapreduce:CancelSteps` — cancels pending or running steps on the bound cluster. Cancellation is asynchronous — poll {@link DescribeStep} for the final state. |
| 8 | * ### Running Steps |
| 9 | * **Example:** Cancel a Step |
| 10 | * ```typescript |
| 11 | * const cancelSteps = yield* AWS.EMR.CancelSteps(cluster); |
| 12 | * |
| 13 | * const { CancelStepsInfoList } = yield* cancelSteps({ |
| 14 | * StepIds: [stepId], |
| 15 | * StepCancellationOption: "SEND_INTERRUPT", |
| 16 | * }); |
| 17 | * ``` |
| 18 | * |
| 19 | * @binding |
| 20 | */ |
| 21 | export interface CancelSteps extends Binding.Service< |
| 22 | CancelSteps, |
| 23 | "AWS.EMR.CancelSteps", |
| 24 | <C extends Cluster>( |
| 25 | cluster: C, |
| 26 | ) => Effect.Effect< |
| 27 | ( |
| 28 | request: Omit<SVC.CancelStepsInput, "ClusterId">, |
| 29 | ) => Effect.Effect<SVC.CancelStepsOutput, SVC.CancelStepsError> |
| 30 | > |
| 31 | > {} |
| 32 | export const CancelSteps = Binding.Service<CancelSteps>("AWS.EMR.CancelSteps"); |