ExecutePolicy
Source:
src/AWS/AutoScaling/ExecutePolicy.ts
Runtime binding for the ExecutePolicy operation (IAM action
autoscaling:ExecutePolicy scoped to the group ARN).
Executes a step or simple scaling policy on the bound group — useful for
testing a policy’s design or driving scaling from application logic.
Target-tracking policies cannot be executed manually. Provide the
implementation with Effect.provide(AWS.AutoScaling.ExecutePolicyHttp).
Manual Scaling
Section titled “Manual Scaling”// init — bind the operation to the groupconst executePolicy = yield* AWS.AutoScaling.ExecutePolicy(group);
// runtime — trigger the policy with a synthetic metric breachyield* executePolicy({ PolicyName: "scale-out-on-cpu", MetricValue: 85, BreachThreshold: 80,});