Class StepScalingPolicy
Define a acaling strategy which scales depending on absolute values of some metric.
Inheritance
System.Object
StepScalingPolicy
Namespace: Amazon.CDK.AWS.AutoScaling
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class StepScalingPolicy : Construct
Syntax (vb)
Public Class StepScalingPolicy
Inherits Construct
Remarks
You can specify the scaling behavior for various values of the metric.
Implemented using one or more CloudWatch alarms and Step Scaling Policies.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.AutoScaling;
using Amazon.CDK.AWS.CloudWatch;
AutoScalingGroup autoScalingGroup;
Metric metric;
var stepScalingPolicy = new StepScalingPolicy(this, "MyStepScalingPolicy", new StepScalingPolicyProps {
AutoScalingGroup = autoScalingGroup,
Metric = metric,
ScalingSteps = new [] { new ScalingInterval {
Change = 123,
// the properties below are optional
Lower = 123,
Upper = 123
} },
// the properties below are optional
AdjustmentType = AdjustmentType.CHANGE_IN_CAPACITY,
Cooldown = Duration.Minutes(30),
DatapointsToAlarm = 123,
EstimatedInstanceWarmup = Duration.Minutes(30),
EvaluationPeriods = 123,
MetricAggregationType = MetricAggregationType.AVERAGE,
MinAdjustmentMagnitude = 123
});
Synopsis
Constructors
StepScalingPolicy(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
StepScalingPolicy(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
StepScalingPolicy(Construct, String, IStepScalingPolicyProps) |
Properties
LowerAction | |
LowerAlarm | |
UpperAction | |
UpperAlarm |
Constructors
StepScalingPolicy(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected StepScalingPolicy(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
StepScalingPolicy(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected StepScalingPolicy(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
StepScalingPolicy(Construct, String, IStepScalingPolicyProps)
public StepScalingPolicy(Construct scope, string id, IStepScalingPolicyProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IStepScalingPolicyProps