1import type * as sfn from "@distilled.cloud/aws/sfn";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { StateMachine } from "./StateMachine.ts";
5
6export interface UpdateMapRunRequest extends sfn.UpdateMapRunInput {}
7
8/**
9 * Runtime binding for `states:UpdateMapRun`.
10 *
11 * Adjusts a running Distributed Map Run's `maxConcurrency` and tolerated
12 * failure thresholds in place. IAM access is scoped to Map Runs of the
13 * bound {@link StateMachine}.
14 * ### Distributed Map Runs
15 * **Example:** Throttle a running Map Run
16 * ```typescript
17 * const updateMapRun = yield* StepFunctions.UpdateMapRun(machine);
18 *
19 * yield* updateMapRun({ mapRunArn, maxConcurrency: 10 });
20 * ```
21 *
22 * @binding
23 */
24export interface UpdateMapRun extends Binding.Service<
25 UpdateMapRun,
26 "AWS.StepFunctions.UpdateMapRun",
27 (
28 stateMachine: StateMachine,
29 ) => Effect.Effect<
30 (
31 request: UpdateMapRunRequest,
32 ) => Effect.Effect<sfn.UpdateMapRunOutput, sfn.UpdateMapRunError>
33 >
34> {}
35export const UpdateMapRun = Binding.Service<UpdateMapRun>(
36 "AWS.StepFunctions.UpdateMapRun",
37);