@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:48.026Z") public class StepScalingPolicy extends 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.services.autoscaling.*; import software.amazon.awscdk.services.cloudwatch.*; import software.amazon.awscdk.core.*; 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 . |
IConstruct.Jsii$Default, IConstruct.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
StepScalingPolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
StepScalingPolicy(software.amazon.jsii.JsiiObjectRef objRef) |
|
StepScalingPolicy(software.constructs.Construct scope,
java.lang.String id,
StepScalingPolicyProps props) |
Modifier and Type | Method and Description |
---|---|
StepScalingAction |
getLowerAction() |
Alarm |
getLowerAlarm() |
StepScalingAction |
getUpperAction() |
Alarm |
getUpperAlarm() |
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
protected StepScalingPolicy(software.amazon.jsii.JsiiObjectRef objRef)
protected StepScalingPolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public StepScalingPolicy(software.constructs.Construct scope, java.lang.String id, StepScalingPolicyProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public StepScalingAction getLowerAction()
public Alarm getLowerAlarm()
public StepScalingAction getUpperAction()
public Alarm getUpperAlarm()