Interface TrackCustomMetricProps

All Superinterfaces:
BaseTargetTrackingProps, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
TrackCustomMetricProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:16.553Z") @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();
 
  • Method Details

    • getMetric

      @Stability(Stable) @NotNull IMetric 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

      @Stability(Stable) @NotNull Number getTargetValue()
      The target value for the custom CloudWatch metric.
    • builder

      @Stability(Stable) static TrackCustomMetricProps.Builder builder()
      Returns:
      a TrackCustomMetricProps.Builder of TrackCustomMetricProps