Interface BasicTargetTrackingScalingPolicyProps

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

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-24T21:00:25.335Z") @Stability(Stable) public interface BasicTargetTrackingScalingPolicyProps extends software.amazon.jsii.JsiiSerializable, BaseTargetTrackingProps
Properties for a Target Tracking policy that include the metric but exclude the target.

Example:

 ScalableTarget shardsScalableTarget = ScalableTarget.Builder.create(this, "ElastiCacheRedisShardsScalableTarget")
         .serviceNamespace(ServiceNamespace.ELASTICACHE)
         .scalableDimension("elasticache:replication-group:NodeGroups")
         .minCapacity(2)
         .maxCapacity(10)
         .resourceId("replication-group/main-cluster")
         .build();
 shardsScalableTarget.scaleToTrackMetric("ElastiCacheRedisShardsCPUUtilization", BasicTargetTrackingScalingPolicyProps.builder()
         .targetValue(20)
         .predefinedMetric(PredefinedMetric.ELASTICACHE_PRIMARY_ENGINE_CPU_UTILIZATION)
         .build());
 
  • Method Details

    • getTargetValue

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

      @Stability(Stable) @Nullable default IMetric getCustomMetric()
      A custom metric for application autoscaling.

      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.

    • getPredefinedMetric

      @Stability(Stable) @Nullable default PredefinedMetric getPredefinedMetric()
      A predefined metric for application autoscaling.

      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.

    • getResourceLabel

      @Stability(Stable) @Nullable default String getResourceLabel()
      Identify the resource associated with the metric type.

      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.

    • builder

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