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

main
ts 45 lines 1.51 KB
Raw
1 import * as sqs from "@distilled.cloud/aws/sqs";
2 import * as Binding from "alchemy/Binding";
3 import * as Effect from "effect/Effect";
4 import type { Queue } from "./Queue.ts";
5
6 export interface CancelMessageMoveTaskRequest extends sqs.CancelMessageMoveTaskRequest {}
7
8 /**
9 * Runtime binding for `sqs:CancelMessageMoveTask` (dead-letter queue
10 * redrive).
11 *
12 * Bind this operation to the dead-letter {@link Queue} whose move task
13 * should be cancellable. Cancellation only stops messages that have not been
14 * moved yet; a task that already finished fails with the typed
15 * `ResourceNotFoundException`. The binding grants the host function
16 * `sqs:CancelMessageMoveTask` on the queue. Provide the
17 * `CancelMessageMoveTaskHttp` layer on the Function to implement the
18 * binding.
19 * ### Dead-Letter Queue Redrive
20 * **Example:** Cancel a Running Redrive
21 * ```typescript
22 * // init (provide SQS.CancelMessageMoveTaskHttp on the Function)
23 * const cancelMessageMoveTask = yield* SQS.CancelMessageMoveTask(dlq);
24 *
25 * // runtime
26 * yield* cancelMessageMoveTask({ TaskHandle: taskHandle });
27 * ```
28 *
29 * @binding
30 */
31 export interface CancelMessageMoveTask extends Binding.Service<
32 CancelMessageMoveTask,
33 "AWS.SQS.CancelMessageMoveTask",
34 (
35 queue: Queue,
36 ) => Effect.Effect<
37 (
38 request: CancelMessageMoveTaskRequest,
39 ) => Effect.Effect<sqs.CancelMessageMoveTaskResult, sqs.CancelMessageMoveTaskError>
40 >
41 > {}
42
43 export const CancelMessageMoveTask = Binding.Service<CancelMessageMoveTask>(
44 "AWS.SQS.CancelMessageMoveTask",
45 );