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:PutAutoScalingPolicy` — attaches a CloudWatch-driven automatic scaling policy to an instance group of the bound cluster.
8 * ### Scaling the Cluster
9 * **Example:** Scale a Task Group on YARN Memory
10 * ```typescript
11 * const putAutoScaling = yield* AWS.EMR.PutAutoScalingPolicy(cluster);
12 *
13 * yield* putAutoScaling({
14 * InstanceGroupId: taskGroupId,
15 * AutoScalingPolicy: {
16 * Constraints: { MinCapacity: 0, MaxCapacity: 8 },
17 * Rules: [], // CloudWatch alarm-driven rules
18 * },
19 * });
20 * ```
21 *
22 * @binding
23 */
24export interface PutAutoScalingPolicy extends Binding.Service<
25 PutAutoScalingPolicy,
26 "AWS.EMR.PutAutoScalingPolicy",
27 <C extends Cluster>(
28 cluster: C,
29 ) => Effect.Effect<
30 (
31 request: Omit<SVC.PutAutoScalingPolicyInput, "ClusterId">,
32 ) => Effect.Effect<
33 SVC.PutAutoScalingPolicyOutput,
34 SVC.PutAutoScalingPolicyError
35 >
36 >
37> {}
38export const PutAutoScalingPolicy = Binding.Service<PutAutoScalingPolicy>(
39 "AWS.EMR.PutAutoScalingPolicy",
40);