Interface TrackCustomMetricProps
- All Superinterfaces:
BaseTargetTrackingProps
,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
TrackCustomMetricProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.109.0 (build c221850)",
date="2025-03-14T03:24:57.788Z")
@Stability(Stable)
public interface TrackCustomMetricProps
extends software.amazon.jsii.JsiiSerializable, BaseTargetTrackingProps
The properties for enabling target tracking scaling based on a custom CloudWatch metric.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.*; import software.amazon.awscdk.services.cloudwatch.*; import software.amazon.awscdk.services.ecs.*; Metric metric; TrackCustomMetricProps trackCustomMetricProps = TrackCustomMetricProps.builder() .metric(metric) .targetValue(123) // the properties below are optional .disableScaleIn(false) .policyName("policyName") .scaleInCooldown(Duration.minutes(30)) .scaleOutCooldown(Duration.minutes(30)) .build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forTrackCustomMetricProps
static final class
An implementation forTrackCustomMetricProps
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
The custom CloudWatch metric to track.The target value for the custom CloudWatch metric.Methods inherited from interface software.amazon.awscdk.services.applicationautoscaling.BaseTargetTrackingProps
getDisableScaleIn, getPolicyName, getScaleInCooldown, getScaleOutCooldown
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getMetric
The custom CloudWatch metric to track.The metric must represent utilization; that is, you will always get the following behavior:
- metric > targetValue => scale out
- metric < targetValue => scale in
-
getTargetValue
The target value for the custom CloudWatch metric. -
builder
- Returns:
- a
TrackCustomMetricProps.Builder
ofTrackCustomMetricProps
-