Interface CfnScalingPolicy.ITargetTrackingScalingPolicyConfigurationProperty
TargetTrackingScalingPolicyConfiguration
is a property of the AWS::ApplicationAutoScaling::ScalingPolicy resource that specifies a target tracking scaling policy configuration for Application Auto Scaling. Use a target tracking scaling policy to adjust the capacity of the specified scalable target in response to actual workloads, so that resource utilization remains at or near the target utilization value.
Namespace: Amazon.CDK.AWS.ApplicationAutoScaling
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ITargetTrackingScalingPolicyConfigurationProperty
Syntax (vb)
Public Interface ITargetTrackingScalingPolicyConfigurationProperty
Remarks
For more information, see Target tracking scaling policies in the Application 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.ApplicationAutoScaling;
var targetTrackingScalingPolicyConfigurationProperty = new TargetTrackingScalingPolicyConfigurationProperty {
TargetValue = 123,
// the properties below are optional
CustomizedMetricSpecification = new CustomizedMetricSpecificationProperty {
Dimensions = new [] { new MetricDimensionProperty {
Name = "name",
Value = "value"
} },
MetricName = "metricName",
Metrics = new [] { new TargetTrackingMetricDataQueryProperty {
Expression = "expression",
Id = "id",
Label = "label",
MetricStat = new TargetTrackingMetricStatProperty {
Metric = new TargetTrackingMetricProperty {
Dimensions = new [] { new TargetTrackingMetricDimensionProperty {
Name = "name",
Value = "value"
} },
MetricName = "metricName",
Namespace = "namespace"
},
Stat = "stat",
Unit = "unit"
},
ReturnData = false
} },
Namespace = "namespace",
Statistic = "statistic",
Unit = "unit"
},
DisableScaleIn = false,
PredefinedMetricSpecification = new PredefinedMetricSpecificationProperty {
PredefinedMetricType = "predefinedMetricType",
// the properties below are optional
ResourceLabel = "resourceLabel"
},
ScaleInCooldown = 123,
ScaleOutCooldown = 123
};
Synopsis
Properties
CustomizedMetricSpecification | A customized metric. |
DisableScaleIn | Indicates whether scale in by the target tracking scaling policy is disabled. |
PredefinedMetricSpecification | A predefined metric. |
ScaleInCooldown | The amount of time, in seconds, after a scale-in activity completes before another scale-in activity can start. |
ScaleOutCooldown | The amount of time, in seconds, to wait for a previous scale-out activity to take effect. |
TargetValue | The target value for the metric. |
Properties
CustomizedMetricSpecification
A customized metric.
virtual object CustomizedMetricSpecification { get; }
Property Value
System.Object
Remarks
You can specify either a predefined metric or a customized metric.
DisableScaleIn
Indicates whether scale in by the target tracking scaling policy is disabled.
virtual object DisableScaleIn { get; }
Property Value
System.Object
Remarks
If the value is true
, scale in is disabled and the target tracking scaling policy won't remove capacity from the scalable target. Otherwise, scale in is enabled and the target tracking scaling policy can remove capacity from the scalable target. The default value is false
.
PredefinedMetricSpecification
A predefined metric.
virtual object PredefinedMetricSpecification { get; }
Property Value
System.Object
Remarks
You can specify either a predefined metric or a customized metric.
ScaleInCooldown
The amount of time, in seconds, after a scale-in activity completes before another scale-in activity can start.
virtual Nullable<double> ScaleInCooldown { get; }
Property Value
System.Nullable<System.Double>
Remarks
For more information and for default values, see Define cooldown periods in the Application Auto Scaling User Guide .
ScaleOutCooldown
The amount of time, in seconds, to wait for a previous scale-out activity to take effect.
virtual Nullable<double> ScaleOutCooldown { get; }
Property Value
System.Nullable<System.Double>
Remarks
For more information and for default values, see Define cooldown periods in the Application Auto Scaling User Guide .
TargetValue
The target value for the metric.
double TargetValue { get; }
Property Value
System.Double
Remarks
Although this property accepts numbers of type Double, it won't accept values that are either too small or too large. Values must be in the range of -2^360 to 2^360. The value must be a valid number based on the choice of metric. For example, if the metric is CPU utilization, then the target value is a percent value that represents how much of the CPU can be used before scaling out.