Class TargetTrackingConfiguration

java.lang.Object
software.amazon.awssdk.services.autoscalingplans.model.TargetTrackingConfiguration
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<TargetTrackingConfiguration.Builder,TargetTrackingConfiguration>

@Generated("software.amazon.awssdk:codegen") public final class TargetTrackingConfiguration extends Object implements SdkPojo, Serializable, ToCopyableBuilder<TargetTrackingConfiguration.Builder,TargetTrackingConfiguration>

Describes a target tracking configuration to use with AWS Auto Scaling. Used with ScalingInstruction and ScalingPolicy.

See Also:
  • Method Details

    • predefinedScalingMetricSpecification

      public final PredefinedScalingMetricSpecification predefinedScalingMetricSpecification()

      A predefined metric. You can specify either a predefined metric or a customized metric.

      Returns:
      A predefined metric. You can specify either a predefined metric or a customized metric.
    • customizedScalingMetricSpecification

      public final CustomizedScalingMetricSpecification customizedScalingMetricSpecification()

      A customized metric. You can specify either a predefined metric or a customized metric.

      Returns:
      A customized metric. You can specify either a predefined metric or a customized metric.
    • targetValue

      public final Double targetValue()

      The target value for the metric. Although this property accepts numbers of type Double, it won't accept values that are either too small or too large. Values must be in the range of -2^360 to 2^360.

      Returns:
      The target value for the metric. Although this property accepts numbers of type Double, it won't accept values that are either too small or too large. Values must be in the range of -2^360 to 2^360.
    • disableScaleIn

      public final Boolean disableScaleIn()

      Indicates whether scale in by the target tracking scaling policy is disabled. If the value is true, scale in is disabled and the target tracking scaling policy doesn't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking scaling policy can remove capacity from the scalable resource.

      The default value is false.

      Returns:
      Indicates whether scale in by the target tracking scaling policy is disabled. If the value is true, scale in is disabled and the target tracking scaling policy doesn't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking scaling policy can remove capacity from the scalable resource.

      The default value is false.

    • scaleOutCooldown

      public final Integer scaleOutCooldown()

      The amount of time, in seconds, to wait for a previous scale-out activity to take effect. This property is not used if the scalable resource is an Auto Scaling group.

      With the scale-out cooldown period, the intention is to continuously (but not excessively) scale out. After Auto Scaling successfully scales out using a target tracking scaling policy, it starts to calculate the cooldown time. The scaling policy won't increase the desired capacity again unless either a larger scale out is triggered or the cooldown period ends.

      Returns:
      The amount of time, in seconds, to wait for a previous scale-out activity to take effect. This property is not used if the scalable resource is an Auto Scaling group.

      With the scale-out cooldown period, the intention is to continuously (but not excessively) scale out. After Auto Scaling successfully scales out using a target tracking scaling policy, it starts to calculate the cooldown time. The scaling policy won't increase the desired capacity again unless either a larger scale out is triggered or the cooldown period ends.

    • scaleInCooldown

      public final Integer scaleInCooldown()

      The amount of time, in seconds, after a scale-in activity completes before another scale-in activity can start. This property is not used if the scalable resource is an Auto Scaling group.

      With the scale-in cooldown period, the intention is to scale in conservatively to protect your application’s availability, so scale-in activities are blocked until the cooldown period has expired. However, if another alarm triggers a scale-out activity during the scale-in cooldown period, Auto Scaling scales out the target immediately. In this case, the scale-in cooldown period stops and doesn't complete.

      Returns:
      The amount of time, in seconds, after a scale-in activity completes before another scale-in activity can start. This property is not used if the scalable resource is an Auto Scaling group.

      With the scale-in cooldown period, the intention is to scale in conservatively to protect your application’s availability, so scale-in activities are blocked until the cooldown period has expired. However, if another alarm triggers a scale-out activity during the scale-in cooldown period, Auto Scaling scales out the target immediately. In this case, the scale-in cooldown period stops and doesn't complete.

    • estimatedInstanceWarmup

      public final Integer estimatedInstanceWarmup()

      The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. This value is used only if the resource is an Auto Scaling group.

      Returns:
      The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. This value is used only if the resource is an Auto Scaling group.
    • toBuilder

      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<TargetTrackingConfiguration.Builder,TargetTrackingConfiguration>
      Returns:
      a builder for type T
    • builder

      public static TargetTrackingConfiguration.Builder builder()
    • serializableBuilderClass

      public static Class<? extends TargetTrackingConfiguration.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.