Interface IBasicTargetTrackingScalingPolicyProps
Properties for a Target Tracking policy that include the metric but exclude the target.
Inherited Members
Namespace: Amazon.CDK.AWS.ApplicationAutoScaling
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IBasicTargetTrackingScalingPolicyProps : IBaseTargetTrackingProps
Syntax (vb)
Public Interface IBasicTargetTrackingScalingPolicyProps
Inherits IBaseTargetTrackingProps
Remarks
ExampleMetadata: infused
Examples
var shardsScalableTarget = new ScalableTarget(this, "ElastiCacheRedisShardsScalableTarget", new ScalableTargetProps {
ServiceNamespace = ServiceNamespace.ELASTICACHE,
ScalableDimension = "elasticache:replication-group:NodeGroups",
MinCapacity = 2,
MaxCapacity = 10,
ResourceId = "replication-group/main-cluster"
});
shardsScalableTarget.ScaleToTrackMetric("ElastiCacheRedisShardsCPUUtilization", new BasicTargetTrackingScalingPolicyProps {
TargetValue = 20,
PredefinedMetric = PredefinedMetric.ELASTICACHE_PRIMARY_ENGINE_CPU_UTILIZATION
});
Synopsis
Properties
Custom |
A custom metric for application autoscaling. |
Predefined |
A predefined metric for application autoscaling. |
Resource |
Identify the resource associated with the metric type. |
Target |
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.
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 metrics.
ResourceLabel
Identify the resource associated with the metric type.
virtual string ResourceLabel { get; }
Property Value
System.
Remarks
Only used for predefined metric ALBRequestCountPerTarget.
Example value: app/<load-balancer-name>/<load-balancer-id>/targetgroup/<target-group-name>/<target-group-id>
Default: - No resource label.
TargetValue
The target value for the metric.
double TargetValue { get; }
Property Value
System.