Interface CfnScalingPolicy.ITargetTrackingConfigurationProperty
TargetTrackingConfiguration
is a property of the AWS::AutoScaling::ScalingPolicy resource that specifies a target tracking scaling policy configuration for Amazon EC2 Auto Scaling.
Namespace: Amazon.CDK.AWS.AutoScaling
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ITargetTrackingConfigurationProperty
Syntax (vb)
Public Interface ITargetTrackingConfigurationProperty
Remarks
For more information about scaling policies, see Dynamic scaling in the Amazon EC2 Auto Scaling User Guide .
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.AWS.AutoScaling;
var targetTrackingConfigurationProperty = new TargetTrackingConfigurationProperty {
TargetValue = 123,
// the properties below are optional
CustomizedMetricSpecification = new CustomizedMetricSpecificationProperty {
MetricName = "metricName",
Namespace = "namespace",
Statistic = "statistic",
// the properties below are optional
Dimensions = new [] { new MetricDimensionProperty {
Name = "name",
Value = "value"
} },
Unit = "unit"
},
DisableScaleIn = false,
PredefinedMetricSpecification = new PredefinedMetricSpecificationProperty {
PredefinedMetricType = "predefinedMetricType",
// the properties below are optional
ResourceLabel = "resourceLabel"
}
};
Synopsis
Properties
CustomizedMetricSpecification | A customized metric. |
DisableScaleIn | Indicates whether scaling in by the target tracking scaling policy is disabled. |
PredefinedMetricSpecification | A predefined metric. |
TargetValue | The target value for the metric. |
Properties
CustomizedMetricSpecification
A customized metric.
virtual object CustomizedMetricSpecification { get; }
Property Value
System.Object
Remarks
You must specify either a predefined metric or a customized metric.
DisableScaleIn
Indicates whether scaling in by the target tracking scaling policy is disabled.
virtual object DisableScaleIn { get; }
Property Value
System.Object
Remarks
If scaling in is disabled, the target tracking scaling policy doesn't remove instances from the Auto Scaling group. Otherwise, the target tracking scaling policy can remove instances from the Auto Scaling group. The default is false
.
PredefinedMetricSpecification
A predefined metric.
virtual object PredefinedMetricSpecification { get; }
Property Value
System.Object
Remarks
You must specify either a predefined metric or a customized metric.
TargetValue
The target value for the metric.
double TargetValue { get; }
Property Value
System.Double
Remarks
Some metrics are based on a count instead of a percentage, such as the request count for an Application Load Balancer or the number of messages in an SQS queue. If the scaling policy specifies one of these metrics, specify the target utilization as the optimal average request or message count per instance during any one-minute interval.