@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.415Z") @Stability(value=Stable) public class StepScalingAction extends software.constructs.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.*;
import software.amazon.awscdk.services.applicationautoscaling.*;
ScalableTarget scalableTarget;
StepScalingAction stepScalingAction = StepScalingAction.Builder.create(this, "MyStepScalingAction")
.scalingTarget(scalableTarget)
// the properties below are optional
.adjustmentType(AdjustmentType.CHANGE_IN_CAPACITY)
.cooldown(Duration.minutes(30))
.metricAggregationType(MetricAggregationType.AVERAGE)
.minAdjustmentMagnitude(123)
.policyName("policyName")
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
StepScalingAction.Builder
A fluent builder for
StepScalingAction. |
| Modifier | Constructor and Description |
|---|---|
|
StepScalingAction(software.constructs.Construct scope,
String id,
StepScalingActionProps props) |
protected |
StepScalingAction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
StepScalingAction(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAdjustment(AdjustmentTier adjustment)
Add an adjusment interval to the ScalingAction.
|
String |
getScalingPolicyArn()
ARN of the scaling policy.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected StepScalingAction(software.amazon.jsii.JsiiObjectRef objRef)
protected StepScalingAction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public StepScalingAction(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
StepScalingActionProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Stable)
public void addAdjustment(@NotNull
AdjustmentTier adjustment)
adjustment - This parameter is required.@Stability(value=Stable) @NotNull public String getScalingPolicyArn()
Copyright © 2022. All rights reserved.