@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:48.023Z") public class StepScalingAction extends Construct
This kind of scaling policy adjusts the target capacity in configurable steps. The size of the step is configurable based on the metric's distance to its alarm threshold.
This Action must be used as the target of a CloudWatch alarm to take effect.
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.core.*; AutoScalingGroup autoScalingGroup; StepScalingAction stepScalingAction = StepScalingAction.Builder.create(this, "MyStepScalingAction") .autoScalingGroup(autoScalingGroup) // the properties below are optional .adjustmentType(AdjustmentType.CHANGE_IN_CAPACITY) .cooldown(Duration.minutes(30)) .estimatedInstanceWarmup(Duration.minutes(30)) .metricAggregationType(MetricAggregationType.AVERAGE) .minAdjustmentMagnitude(123) .build();
Modifier and Type | Class and Description |
---|---|
static class |
StepScalingAction.Builder
A fluent builder for
StepScalingAction . |
IConstruct.Jsii$Default, IConstruct.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
StepScalingAction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
StepScalingAction(software.amazon.jsii.JsiiObjectRef objRef) |
|
StepScalingAction(software.constructs.Construct scope,
java.lang.String id,
StepScalingActionProps props) |
Modifier and Type | Method and Description |
---|---|
void |
addAdjustment(AdjustmentTier adjustment)
Add an adjusment interval to the ScalingAction.
|
java.lang.String |
getScalingPolicyArn()
ARN of the scaling policy.
|
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
protected StepScalingAction(software.amazon.jsii.JsiiObjectRef objRef)
protected StepScalingAction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public StepScalingAction(software.constructs.Construct scope, java.lang.String id, StepScalingActionProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public void addAdjustment(AdjustmentTier adjustment)
adjustment
- This parameter is required.public java.lang.String getScalingPolicyArn()