Class PutScalingPolicyRequest

    • Constructor Detail

      • PutScalingPolicyRequest

        public PutScalingPolicyRequest()
    • Method Detail

      • setAutoScalingGroupName

        public void setAutoScalingGroupName​(String autoScalingGroupName)

        The name or ARN of the group.

        Parameters:
        autoScalingGroupName - The name or ARN of the group.
      • getAutoScalingGroupName

        public String getAutoScalingGroupName()

        The name or ARN of the group.

        Returns:
        The name or ARN of the group.
      • withAutoScalingGroupName

        public PutScalingPolicyRequest withAutoScalingGroupName​(String autoScalingGroupName)

        The name or ARN of the group.

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

        public void setPolicyName​(String policyName)

        The name of the policy.

        Parameters:
        policyName - The name of the policy.
      • getPolicyName

        public String getPolicyName()

        The name of the policy.

        Returns:
        The name of the policy.
      • withPolicyName

        public PutScalingPolicyRequest withPolicyName​(String policyName)

        The name of the policy.

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

        public void setPolicyType​(String policyType)

        The policy type. Valid values are SimpleScaling and StepScaling. If the policy type is null, the value is treated as SimpleScaling.

        Parameters:
        policyType - The policy type. Valid values are SimpleScaling and StepScaling. If the policy type is null, the value is treated as SimpleScaling.
      • getPolicyType

        public String getPolicyType()

        The policy type. Valid values are SimpleScaling and StepScaling. If the policy type is null, the value is treated as SimpleScaling.

        Returns:
        The policy type. Valid values are SimpleScaling and StepScaling. If the policy type is null, the value is treated as SimpleScaling.
      • withPolicyType

        public PutScalingPolicyRequest withPolicyType​(String policyType)

        The policy type. Valid values are SimpleScaling and StepScaling. If the policy type is null, the value is treated as SimpleScaling.

        Parameters:
        policyType - The policy type. Valid values are SimpleScaling and StepScaling. If the policy type is null, the value is treated as SimpleScaling.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setAdjustmentType

        public void setAdjustmentType​(String adjustmentType)

        The adjustment type. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.

        For more information, see Dynamic Scaling in the Auto Scaling Developer Guide.

        Parameters:
        adjustmentType - The adjustment type. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.

        For more information, see Dynamic Scaling in the Auto Scaling Developer Guide.

      • getAdjustmentType

        public String getAdjustmentType()

        The adjustment type. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.

        For more information, see Dynamic Scaling in the Auto Scaling Developer Guide.

        Returns:
        The adjustment type. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.

        For more information, see Dynamic Scaling in the Auto Scaling Developer Guide.

      • withAdjustmentType

        public PutScalingPolicyRequest withAdjustmentType​(String adjustmentType)

        The adjustment type. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.

        For more information, see Dynamic Scaling in the Auto Scaling Developer Guide.

        Parameters:
        adjustmentType - The adjustment type. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.

        For more information, see Dynamic Scaling in the Auto Scaling Developer Guide.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setMinAdjustmentStep

        public void setMinAdjustmentStep​(Integer minAdjustmentStep)

        Available for backward compatibility. Use MinAdjustmentMagnitude instead.

        Parameters:
        minAdjustmentStep - Available for backward compatibility. Use MinAdjustmentMagnitude instead.
      • getMinAdjustmentStep

        public Integer getMinAdjustmentStep()

        Available for backward compatibility. Use MinAdjustmentMagnitude instead.

        Returns:
        Available for backward compatibility. Use MinAdjustmentMagnitude instead.
      • withMinAdjustmentStep

        public PutScalingPolicyRequest withMinAdjustmentStep​(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.
      • setMinAdjustmentMagnitude

        public void setMinAdjustmentMagnitude​(Integer minAdjustmentMagnitude)

        The minimum number of instances to scale. If the value of AdjustmentType is PercentChangeInCapacity, the scaling policy changes the DesiredCapacity of the Auto Scaling group by at least this many instances. Otherwise, the error is ValidationError.

        Parameters:
        minAdjustmentMagnitude - The minimum number of instances to scale. If the value of AdjustmentType is PercentChangeInCapacity, the scaling policy changes the DesiredCapacity of the Auto Scaling group by at least this many instances. Otherwise, the error is ValidationError.
      • getMinAdjustmentMagnitude

        public Integer getMinAdjustmentMagnitude()

        The minimum number of instances to scale. If the value of AdjustmentType is PercentChangeInCapacity, the scaling policy changes the DesiredCapacity of the Auto Scaling group by at least this many instances. Otherwise, the error is ValidationError.

        Returns:
        The minimum number of instances to scale. If the value of AdjustmentType is PercentChangeInCapacity, the scaling policy changes the DesiredCapacity of the Auto Scaling group by at least this many instances. Otherwise, the error is ValidationError.
      • withMinAdjustmentMagnitude

        public PutScalingPolicyRequest withMinAdjustmentMagnitude​(Integer minAdjustmentMagnitude)

        The minimum number of instances to scale. If the value of AdjustmentType is PercentChangeInCapacity, the scaling policy changes the DesiredCapacity of the Auto Scaling group by at least this many instances. Otherwise, the error is ValidationError.

        Parameters:
        minAdjustmentMagnitude - The minimum number of instances to scale. If the value of AdjustmentType is PercentChangeInCapacity, the scaling policy changes the DesiredCapacity of the Auto Scaling group by at least this many instances. Otherwise, the error is ValidationError.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setScalingAdjustment

        public void setScalingAdjustment​(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.

        This parameter is required if the policy type is SimpleScaling and not supported otherwise.

        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.

        This parameter is required if the policy type is SimpleScaling and not supported otherwise.

      • getScalingAdjustment

        public Integer getScalingAdjustment()

        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.

        This parameter is required if the policy type is SimpleScaling and not supported otherwise.

        Returns:
        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.

        This parameter is required if the policy type is SimpleScaling and not supported otherwise.

      • withScalingAdjustment

        public PutScalingPolicyRequest withScalingAdjustment​(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.

        This parameter is required if the policy type is SimpleScaling and not supported otherwise.

        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.

        This parameter is required if the policy type is SimpleScaling and not supported otherwise.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setCooldown

        public void setCooldown​(Integer cooldown)

        The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start. If this parameter is not specified, the default cooldown period for the group applies.

        This parameter is not supported unless the policy type is SimpleScaling.

        For more information, see Auto Scaling Cooldowns in the Auto Scaling Developer Guide.

        Parameters:
        cooldown - The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start. If this parameter is not specified, the default cooldown period for the group applies.

        This parameter is not supported unless the policy type is SimpleScaling.

        For more information, see Auto Scaling Cooldowns in the Auto Scaling Developer Guide.

      • getCooldown

        public Integer getCooldown()

        The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start. If this parameter is not specified, the default cooldown period for the group applies.

        This parameter is not supported unless the policy type is SimpleScaling.

        For more information, see Auto Scaling Cooldowns in the Auto Scaling Developer Guide.

        Returns:
        The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start. If this parameter is not specified, the default cooldown period for the group applies.

        This parameter is not supported unless the policy type is SimpleScaling.

        For more information, see Auto Scaling Cooldowns in the Auto Scaling Developer Guide.

      • withCooldown

        public PutScalingPolicyRequest withCooldown​(Integer cooldown)

        The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start. If this parameter is not specified, the default cooldown period for the group applies.

        This parameter is not supported unless the policy type is SimpleScaling.

        For more information, see Auto Scaling Cooldowns in the Auto Scaling Developer Guide.

        Parameters:
        cooldown - The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start. If this parameter is not specified, the default cooldown period for the group applies.

        This parameter is not supported unless the policy type is SimpleScaling.

        For more information, see Auto Scaling Cooldowns in the Auto Scaling Developer Guide.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setMetricAggregationType

        public void setMetricAggregationType​(String metricAggregationType)

        The aggregation type for the CloudWatch metrics. Valid values are Minimum, Maximum, and Average. If the aggregation type is null, the value is treated as Average.

        This parameter is not supported if the policy type is SimpleScaling.

        Parameters:
        metricAggregationType - The aggregation type for the CloudWatch metrics. Valid values are Minimum, Maximum, and Average. If the aggregation type is null, the value is treated as Average.

        This parameter is not supported if the policy type is SimpleScaling.

      • getMetricAggregationType

        public String getMetricAggregationType()

        The aggregation type for the CloudWatch metrics. Valid values are Minimum, Maximum, and Average. If the aggregation type is null, the value is treated as Average.

        This parameter is not supported if the policy type is SimpleScaling.

        Returns:
        The aggregation type for the CloudWatch metrics. Valid values are Minimum, Maximum, and Average. If the aggregation type is null, the value is treated as Average.

        This parameter is not supported if the policy type is SimpleScaling.

      • withMetricAggregationType

        public PutScalingPolicyRequest withMetricAggregationType​(String metricAggregationType)

        The aggregation type for the CloudWatch metrics. Valid values are Minimum, Maximum, and Average. If the aggregation type is null, the value is treated as Average.

        This parameter is not supported if the policy type is SimpleScaling.

        Parameters:
        metricAggregationType - The aggregation type for the CloudWatch metrics. Valid values are Minimum, Maximum, and Average. If the aggregation type is null, the value is treated as Average.

        This parameter is not supported if the policy type is SimpleScaling.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • getStepAdjustments

        public List<StepAdjustment> getStepAdjustments()

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

        This parameter is required if the policy type is StepScaling and not supported otherwise.

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

        This parameter is required if the policy type is StepScaling and not supported otherwise.

      • setStepAdjustments

        public void setStepAdjustments​(Collection<StepAdjustment> stepAdjustments)

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

        This parameter is required if the policy type is StepScaling and not supported otherwise.

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

        This parameter is required if the policy type is StepScaling and not supported otherwise.

      • withStepAdjustments

        public PutScalingPolicyRequest withStepAdjustments​(StepAdjustment... stepAdjustments)

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

        This parameter is required if the policy type is StepScaling and not supported otherwise.

        NOTE: This method appends the values to the existing list (if any). Use setStepAdjustments(java.util.Collection) or withStepAdjustments(java.util.Collection) if you want to override the existing values.

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

        This parameter is required if the policy type is StepScaling and not supported otherwise.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • withStepAdjustments

        public PutScalingPolicyRequest withStepAdjustments​(Collection<StepAdjustment> stepAdjustments)

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

        This parameter is required if the policy type is StepScaling and not supported otherwise.

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

        This parameter is required if the policy type is StepScaling and not supported otherwise.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setEstimatedInstanceWarmup

        public void setEstimatedInstanceWarmup​(Integer estimatedInstanceWarmup)

        The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. The default is to use the value specified for the default cooldown period for the group.

        This parameter is not supported if the policy type is SimpleScaling.

        Parameters:
        estimatedInstanceWarmup - The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. The default is to use the value specified for the default cooldown period for the group.

        This parameter is not supported if the policy type is SimpleScaling.

      • getEstimatedInstanceWarmup

        public Integer getEstimatedInstanceWarmup()

        The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. The default is to use the value specified for the default cooldown period for the group.

        This parameter is not supported if the policy type is SimpleScaling.

        Returns:
        The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. The default is to use the value specified for the default cooldown period for the group.

        This parameter is not supported if the policy type is SimpleScaling.

      • withEstimatedInstanceWarmup

        public PutScalingPolicyRequest withEstimatedInstanceWarmup​(Integer estimatedInstanceWarmup)

        The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. The default is to use the value specified for the default cooldown period for the group.

        This parameter is not supported if the policy type is SimpleScaling.

        Parameters:
        estimatedInstanceWarmup - The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. The default is to use the value specified for the default cooldown period for the group.

        This parameter is not supported if the policy type is SimpleScaling.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • toString

        public String toString()
        Returns a string representation of this object; useful for testing and debugging.
        Overrides:
        toString in class Object
        Returns:
        A string representation of this object.
        See Also:
        Object.toString()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object