1import type * as SVC from "@distilled.cloud/aws/emr";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Cluster } from "./Cluster.ts";
5
6/**
7 * Runtime binding for `elasticmapreduce:PutManagedScalingPolicy` — attaches or replaces the bound cluster's managed scaling policy — EMR then resizes the cluster within the configured compute limits.
8 * ### Scaling the Cluster
9 * **Example:** Enable Managed Scaling
10 * ```typescript
11 * const putScalingPolicy = yield* AWS.EMR.PutManagedScalingPolicy(cluster);
12 *
13 * yield* putScalingPolicy({
14 * ManagedScalingPolicy: {
15 * ComputeLimits: {
16 * UnitType: "Instances",
17 * MinimumCapacityUnits: 1,
18 * MaximumCapacityUnits: 10,
19 * },
20 * },
21 * });
22 * ```
23 *
24 * @binding
25 */
26export interface PutManagedScalingPolicy extends Binding.Service<
27 PutManagedScalingPolicy,
28 "AWS.EMR.PutManagedScalingPolicy",
29 <C extends Cluster>(
30 cluster: C,
31 ) => Effect.Effect<
32 (
33 request: Omit<SVC.PutManagedScalingPolicyInput, "ClusterId">,
34 ) => Effect.Effect<
35 SVC.PutManagedScalingPolicyOutput,
36 SVC.PutManagedScalingPolicyError
37 >
38 >
39> {}
40export const PutManagedScalingPolicy = Binding.Service<PutManagedScalingPolicy>(
41 "AWS.EMR.PutManagedScalingPolicy",
42);