@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 44 lines 1.54 KB
Raw
1 import type * as datasync from "@distilled.cloud/aws/datasync";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Task } from "./Task.ts";
5
6 /**
7 * Runtime binding for `datasync:UpdateTaskExecution`.
8 *
9 * Modifies an in-flight execution of the bound {@link Task}. The only
10 * mutable option is `BytesPerSecond` — throttle (or unthrottle with `-1`) a
11 * running transfer without cancelling it. The execution must be launching,
12 * preparing, transferring, or verifying. Address it with the ARN returned
13 * by `StartTaskExecution`; access is granted on the bound task's
14 * executions. Provide the implementation with
15 * `Effect.provide(AWS.DataSync.UpdateTaskExecutionHttp)`.
16 * ### Running Transfers
17 * **Example:** Throttle A Running Transfer
18 * ```typescript
19 * // init — bind the operation to the task
20 * const updateTaskExecution = yield* AWS.DataSync.UpdateTaskExecution(task);
21 *
22 * // runtime — cap the transfer at 1 MiB/s
23 * yield* updateTaskExecution({
24 * TaskExecutionArn: executionArn,
25 * Options: { BytesPerSecond: 1024 * 1024 },
26 * });
27 * ```
28 *
29 * @binding
30 */
31 export interface UpdateTaskExecution extends Binding.Service<
32 UpdateTaskExecution,
33 "AWS.DataSync.UpdateTaskExecution",
34 (
35 task: Task,
36 ) => Effect.Effect<
37 (
38 request: datasync.UpdateTaskExecutionRequest,
39 ) => Effect.Effect<datasync.UpdateTaskExecutionResponse, datasync.UpdateTaskExecutionError>
40 >
41 > {}
42 export const UpdateTaskExecution = Binding.Service<UpdateTaskExecution>(
43 "AWS.DataSync.UpdateTaskExecution",
44 );