Interface IBasicTargetTrackingScalingPolicyProps
Properties for a Target Tracking policy that include the metric but exclude the target.
Inherited Members
Namespace: Amazon.CDK.AWS.AutoScaling
Assembly: Amazon.CDK.AWS.AutoScaling.dll
Syntax (csharp)
public interface IBasicTargetTrackingScalingPolicyProps : IBaseTargetTrackingProps
Syntax (vb)
Public Interface IBasicTargetTrackingScalingPolicyProps
Inherits IBaseTargetTrackingProps
Remarks
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;
using Amazon.CDK.AWS.CloudWatch;
using Amazon.CDK;
Metric metric;
var basicTargetTrackingScalingPolicyProps = new BasicTargetTrackingScalingPolicyProps {
TargetValue = 123,
// the properties below are optional
Cooldown = Duration.Minutes(30),
CustomMetric = metric,
DisableScaleIn = false,
EstimatedInstanceWarmup = Duration.Minutes(30),
PredefinedMetric = PredefinedMetric.ASG_AVERAGE_CPU_UTILIZATION,
ResourceLabel = "resourceLabel"
};
Synopsis
Properties
| CustomMetric | A custom metric for application autoscaling. |
| PredefinedMetric | A predefined metric for application autoscaling. |
| ResourceLabel | The resource label associated with the predefined metric. |
| TargetValue | The target value for the metric. |
Properties
CustomMetric
A custom metric for application autoscaling.
virtual IMetric CustomMetric { get; }
Property Value
Remarks
The metric must track utilization. Scaling out will happen if the metric is higher than the target value, scaling in will happen in the metric is lower than the target value.
Exactly one of customMetric or predefinedMetric must be specified.
Default: - No custom metric.
PredefinedMetric
A predefined metric for application autoscaling.
virtual Nullable<PredefinedMetric> PredefinedMetric { get; }
Property Value
System.Nullable<PredefinedMetric>
Remarks
The metric must track utilization. Scaling out will happen if the metric is higher than the target value, scaling in will happen in the metric is lower than the target value.
Exactly one of customMetric or predefinedMetric must be specified.
Default: - No predefined metric.
ResourceLabel
The resource label associated with the predefined metric.
virtual string ResourceLabel { get; }
Property Value
System.String
Remarks
Should be supplied if the predefined metric is ALBRequestCountPerTarget, and the format should be:
app/
Default: - No resource label.
TargetValue
The target value for the metric.
double TargetValue { get; }
Property Value
System.Double