Interface ScalingPolicy.Builder

    • Method Detail

      • autoScalingGroupName

        ScalingPolicy.Builder autoScalingGroupName​(String autoScalingGroupName)

        The name of the Auto Scaling group.

        Parameters:
        autoScalingGroupName - The name of the Auto Scaling group.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • policyName

        ScalingPolicy.Builder policyName​(String policyName)

        The name of the scaling policy.

        Parameters:
        policyName - The name of the scaling policy.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • policyARN

        ScalingPolicy.Builder policyARN​(String policyARN)

        The Amazon Resource Name (ARN) of the policy.

        Parameters:
        policyARN - The Amazon Resource Name (ARN) of the policy.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • adjustmentType

        ScalingPolicy.Builder adjustmentType​(String adjustmentType)

        Specifies how the scaling adjustment is interpreted (for example, an absolute number or a percentage). The valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.

        Parameters:
        adjustmentType - Specifies how the scaling adjustment is interpreted (for example, an absolute number or a percentage). The valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • minAdjustmentStep

        ScalingPolicy.Builder minAdjustmentStep​(Integer minAdjustmentStep)

        Available for backward compatibility. Use MinAdjustmentMagnitude instead.

        Parameters:
        minAdjustmentStep - Available for backward compatibility. Use MinAdjustmentMagnitude instead.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • minAdjustmentMagnitude

        ScalingPolicy.Builder minAdjustmentMagnitude​(Integer minAdjustmentMagnitude)

        The minimum value to scale by when the adjustment type is PercentChangeInCapacity.

        Parameters:
        minAdjustmentMagnitude - The minimum value to scale by when the adjustment type is PercentChangeInCapacity.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • scalingAdjustment

        ScalingPolicy.Builder scalingAdjustment​(Integer scalingAdjustment)

        The amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity.

        Parameters:
        scalingAdjustment - The amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • cooldown

        ScalingPolicy.Builder cooldown​(Integer cooldown)

        The duration of the policy's cooldown period, in seconds.

        Parameters:
        cooldown - The duration of the policy's cooldown period, in seconds.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • stepAdjustments

        ScalingPolicy.Builder stepAdjustments​(Collection<StepAdjustment> stepAdjustments)

        A set of adjustments that enable you to scale based on the size of the alarm breach.

        Parameters:
        stepAdjustments - A set of adjustments that enable you to scale based on the size of the alarm breach.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • stepAdjustments

        ScalingPolicy.Builder stepAdjustments​(StepAdjustment... stepAdjustments)

        A set of adjustments that enable you to scale based on the size of the alarm breach.

        Parameters:
        stepAdjustments - A set of adjustments that enable you to scale based on the size of the alarm breach.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • metricAggregationType

        ScalingPolicy.Builder metricAggregationType​(String metricAggregationType)

        The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, and Average.

        Parameters:
        metricAggregationType - The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, and Average.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • estimatedInstanceWarmup

        ScalingPolicy.Builder estimatedInstanceWarmup​(Integer estimatedInstanceWarmup)

        The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.

        Parameters:
        estimatedInstanceWarmup - The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • alarms

        ScalingPolicy.Builder alarms​(Collection<Alarm> alarms)

        The CloudWatch alarms related to the policy.

        Parameters:
        alarms - The CloudWatch alarms related to the policy.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • alarms

        ScalingPolicy.Builder alarms​(Alarm... alarms)

        The CloudWatch alarms related to the policy.

        Parameters:
        alarms - The CloudWatch alarms related to the policy.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • alarms

        ScalingPolicy.Builder alarms​(Consumer<Alarm.Builder>... alarms)

        The CloudWatch alarms related to the policy.

        This is a convenience method that creates an instance of the Alarm.Builder avoiding the need to create one manually via Alarm.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #alarms(List).

        Parameters:
        alarms - a consumer that will call methods on Alarm.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #alarms(java.util.Collection)
      • targetTrackingConfiguration

        ScalingPolicy.Builder targetTrackingConfiguration​(TargetTrackingConfiguration targetTrackingConfiguration)

        A target tracking scaling policy.

        Parameters:
        targetTrackingConfiguration - A target tracking scaling policy.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • enabled

        ScalingPolicy.Builder enabled​(Boolean enabled)

        Indicates whether the policy is enabled (true) or disabled (false).

        Parameters:
        enabled - Indicates whether the policy is enabled (true) or disabled (false).
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • predictiveScalingConfiguration

        ScalingPolicy.Builder predictiveScalingConfiguration​(PredictiveScalingConfiguration predictiveScalingConfiguration)

        A predictive scaling policy.

        Parameters:
        predictiveScalingConfiguration - A predictive scaling policy.
        Returns:
        Returns a reference to this object so that method calls can be chained together.