Interface IMetricTargetTrackingProps
- Namespace
- Amazon.CDK.AWS.AutoScaling
- Assembly
- Amazon.CDK.AWS.AutoScaling.dll
Properties for enabling tracking of an arbitrary metric.
public interface IMetricTargetTrackingProps : IBaseTargetTrackingProps
- Inherited Members
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AutoScaling;
using Amazon.CDK.AWS.CloudWatch;
using Amazon.CDK;
Metric metric;
var metricTargetTrackingProps = new MetricTargetTrackingProps {
Metric = metric,
TargetValue = 123,
// the properties below are optional
Cooldown = Duration.Minutes(30),
DisableScaleIn = false,
EstimatedInstanceWarmup = Duration.Minutes(30)
};
Remarks
ExampleMetadata: fixture=_generated
Properties
Metric
Metric to track.
IMetric Metric { get; }
Property Value
- IMetric
Remarks
The metric must represent a utilization, so that if it's higher than the target value, your ASG should scale out, and if it's lower it should scale in.
TargetValue
Value to keep the metric around.
double TargetValue { get; }