1import type * as datasync from "@distilled.cloud/aws/datasync";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Task } from "./Task.ts";
5
6/**
7 * Runtime binding for `datasync:CancelTaskExecution`.
8 *
9 * Stops a queued or in-flight execution of the bound {@link Task} — e.g. a
10 * kill switch when a transfer was started by mistake or is saturating a
11 * link. Address the execution with the ARN returned by
12 * `StartTaskExecution`; access is granted on the bound task's executions.
13 * Provide the implementation with
14 * `Effect.provide(AWS.DataSync.CancelTaskExecutionHttp)`.
15 * ### Running Transfers
16 * **Example:** Cancel A Transfer
17 * ```typescript
18 * // init — bind the operation to the task
19 * const cancelTaskExecution = yield* AWS.DataSync.CancelTaskExecution(task);
20 *
21 * // runtime
22 * yield* cancelTaskExecution({ TaskExecutionArn: executionArn });
23 * ```
24 *
25 * @binding
26 */
27export interface CancelTaskExecution extends Binding.Service<
28 CancelTaskExecution,
29 "AWS.DataSync.CancelTaskExecution",
30 (
31 task: Task,
32 ) => Effect.Effect<
33 (
34 request: datasync.CancelTaskExecutionRequest,
35 ) => Effect.Effect<
36 datasync.CancelTaskExecutionResponse,
37 datasync.CancelTaskExecutionError
38 >
39 >
40> {}
41export const CancelTaskExecution = Binding.Service<CancelTaskExecution>(
42 "AWS.DataSync.CancelTaskExecution",
43);