@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.821Z") @Stability(value=Stable) public class StepScalingPolicy extends software.constructs.Construct
You can specify the scaling behavior for various values of the metric.
Implemented using one or more CloudWatch alarms and Step Scaling Policies.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.autoscaling.*;
import software.amazon.awscdk.services.cloudwatch.*;
AutoScalingGroup autoScalingGroup;
Metric metric;
StepScalingPolicy stepScalingPolicy = StepScalingPolicy.Builder.create(this, "MyStepScalingPolicy")
.autoScalingGroup(autoScalingGroup)
.metric(metric)
.scalingSteps(List.of(ScalingInterval.builder()
.change(123)
// the properties below are optional
.lower(123)
.upper(123)
.build()))
// the properties below are optional
.adjustmentType(AdjustmentType.CHANGE_IN_CAPACITY)
.cooldown(Duration.minutes(30))
.estimatedInstanceWarmup(Duration.minutes(30))
.evaluationPeriods(123)
.metricAggregationType(MetricAggregationType.AVERAGE)
.minAdjustmentMagnitude(123)
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
StepScalingPolicy.Builder
A fluent builder for
StepScalingPolicy. |
| Modifier | Constructor and Description |
|---|---|
|
StepScalingPolicy(software.constructs.Construct scope,
String id,
StepScalingPolicyProps props) |
protected |
StepScalingPolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
StepScalingPolicy(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
StepScalingAction |
getLowerAction() |
Alarm |
getLowerAlarm() |
StepScalingAction |
getUpperAction() |
Alarm |
getUpperAlarm() |
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected StepScalingPolicy(software.amazon.jsii.JsiiObjectRef objRef)
protected StepScalingPolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public StepScalingPolicy(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
StepScalingPolicyProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Stable) @Nullable public StepScalingAction getLowerAction()
@Stability(value=Stable) @Nullable public Alarm getLowerAlarm()
@Stability(value=Stable) @Nullable public StepScalingAction getUpperAction()
@Stability(value=Stable) @Nullable public Alarm getUpperAlarm()
Copyright © 2022. All rights reserved.