Module Members



Create a reference to an externally managed ScalingPolicy.

Example usage:

topic: AutoScaling.ScalingPolicy.external("arn:aws:autoscaling:us-east-1:123456789012:scalingPolicy:c7a27f55-d35e-4153-b044-8ca9155fc467:autoScalingGroupName/my-test-asg1:policyName/my-scaleout-policy")

Type Signature

 fun (String) -> ScalingPolicy
Argument: arn

The ARN of an existing scaling policy.

Type: String


A reference to the specified Scaling Policy.

Type: ScalingPolicy



new ScalingPolicy (Constructor)

Call this constructor to create a new Fugue.Core.AWS.AutoScaling.ScalingPolicy value.

Type Signature

 fun { policyName: String,
       policyType: Optional<PolicyType>,
       adjustmentType: AdjustmentType,
       minAdjustmentMagnitude: Optional<Int>,
       scalingAdjustment: Optional<Int>,
       cooldown: Optional<Int>,
       stepAdjustments: Optional<List<StepAdjustment>>,
       metricAggregationType: Optional<MetricAggregationType>,
       estimatedInstanceWarmup: Optional<Int>,
       autoScalingGroup: AutoScalingGroup,
       resourceId: Optional<String> } -> ScalingPolicy
Argument: policyName

The name of the policy.

Type: String

Argument: policyType

The type of policy. Defaults to SimpleScaling. Mutable.

Type: Optional<PolicyType>

Argument: adjustmentType

The type of adjustment to make when a scaling event occurs. Mutable.

Type: AdjustmentType

Argument: minAdjustmentMagnitude

The minimum number of instances to scale. Only valid when adjustmentType is PercentChangeInCapacity. Mutable.

Type: Optional<Int>

Argument: scalingAdjustment

The amount of capacity to add or remove. The exact value of increase or decrease depends on the specified adjustmentType. Specify a positive value to add capacity or a negative value to reduce capacity. Mutable.

Type: Optional<Int>

Argument: cooldown

The number of seconds to wait between scaling events. Defaults to the cooldown of the target AutoScalingGroup. Only valid for SimpleScaling policies. Mutable.

Type: Optional<Int>

Argument: stepAdjustments

A list of StepAdjustments to apply based on the details of the alert. Required for StepScaling policies. Not valid for SimpleScaling policies. Mutable.

Type: Optional<List<StepAdjustment>>

Argument: metricAggregationType

The type of aggregation to apply to the target metrics. Defaults to Average. Mutable.

Type: Optional<MetricAggregationType>

Argument: estimatedInstanceWarmup

Estimated number of seconds an instance takes to start logging metrics to CloudWatch. Defaults to the cooldown of the target AutoScalingGroup. Not valid for SimpleScaling policies. Mutable.

Type: Optional<Int>

Argument: autoScalingGroup

The AutoScalingGroup to apply the policy to.

Type: AutoScalingGroup

Argument: resourceId

Resource ID of the resource to import with Fugue Import. This field is only honored on fugue run. The resource ID is the ARN. Mutable. Example: arn:aws:autoscaling:us-west-2:123456789012:scalingPolicy:2233f3d7-6290-403b-b632-93c553560106:autoScalingGroupName/my-auto-scaling-group:policyName/ScaleIn

Type: Optional<String>


A new Fugue.Core.AWS.AutoScaling.ScalingPolicy.

Type: ScalingPolicy



Retrieve the region from a Scaling Policy value.

Works for Scaling Policies defined in the composition as well external values.

Example usage:

scalingPolicy1: AutoScaling.ScalingPolicy.new {
  policyName: "policyName",
  policyType: AutoScaling.SimpleScaling,
  adjustmentType: AutoScaling.ChangeInCapacity,
  scalingAdjustment: 5,
  autoScalingGroup: myAutoScalingGroup,
region1: AutoScaling.ScalingPolicy.region(scalingPolicy1) # => AWS.Us-west-2

scalingPolicy2: AutoScaling.ScalingPolicy.external("arn:aws:autoscaling:us-east-1:123456789012:scalingPolicy:c7a27f55-d35e-4153-b044-8ca9155fc467:autoScalingGroupName/my-test-asg1:policyName/my-scaleout-policy")
region2: AutoScaling.ScalingPolicy.region(topic2) # => AWS.Us-east-1

Type Signature

 fun (ScalingPolicy) -> Region
Argument: scalingPolicy

The scaling policu from which to get the region.

Type: ScalingPolicy


The region containing the scaling policy.

Type: Region