com.amazonaws.services.autoscaling.model
Class ScalingPolicy

java.lang.Object
  extended by com.amazonaws.services.autoscaling.model.ScalingPolicy

public class ScalingPolicy
extends Object

The ScalingPolicy data type.


Constructor Summary
ScalingPolicy()
           
 
Method Summary
 String getAdjustmentType()
          Specifies whether the ScalingAdjustment is an absolute number or a percentage of the current capacity.
 List<Alarm> getAlarms()
          A list of CloudWatch Alarms related to the policy.
 String getAutoScalingGroupName()
          The name of the Auto Scaling group associated with this scaling policy.
 Integer getCooldown()
          The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.
 String getPolicyARN()
          The Amazon Resource Name (ARN) of the policy.
 String getPolicyName()
          The name of the scaling policy.
 Integer getScalingAdjustment()
          The number associated with the specified AdjustmentType.
 void setAdjustmentType(String adjustmentType)
          Specifies whether the ScalingAdjustment is an absolute number or a percentage of the current capacity.
 void setAlarms(Collection<Alarm> alarms)
          A list of CloudWatch Alarms related to the policy.
 void setAutoScalingGroupName(String autoScalingGroupName)
          The name of the Auto Scaling group associated with this scaling policy.
 void setCooldown(Integer cooldown)
          The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.
 void setPolicyARN(String policyARN)
          The Amazon Resource Name (ARN) of the policy.
 void setPolicyName(String policyName)
          The name of the scaling policy.
 void setScalingAdjustment(Integer scalingAdjustment)
          The number associated with the specified AdjustmentType.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 ScalingPolicy withAdjustmentType(String adjustmentType)
          Specifies whether the ScalingAdjustment is an absolute number or a percentage of the current capacity.
 ScalingPolicy withAlarms(Alarm... alarms)
          A list of CloudWatch Alarms related to the policy.
 ScalingPolicy withAlarms(Collection<Alarm> alarms)
          A list of CloudWatch Alarms related to the policy.
 ScalingPolicy withAutoScalingGroupName(String autoScalingGroupName)
          The name of the Auto Scaling group associated with this scaling policy.
 ScalingPolicy withCooldown(Integer cooldown)
          The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.
 ScalingPolicy withPolicyARN(String policyARN)
          The Amazon Resource Name (ARN) of the policy.
 ScalingPolicy withPolicyName(String policyName)
          The name of the scaling policy.
 ScalingPolicy withScalingAdjustment(Integer scalingAdjustment)
          The number associated with the specified AdjustmentType.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScalingPolicy

public ScalingPolicy()
Method Detail

getAutoScalingGroupName

public String getAutoScalingGroupName()
The name of the Auto Scaling group associated with this scaling policy.

Constraints:
Length: 1 - 255
Pattern: [ -??-??-?\r\n\t]*

Returns:
The name of the Auto Scaling group associated with this scaling policy.

setAutoScalingGroupName

public void setAutoScalingGroupName(String autoScalingGroupName)
The name of the Auto Scaling group associated with this scaling policy.

Constraints:
Length: 1 - 255
Pattern: [ -??-??-?\r\n\t]*

Parameters:
autoScalingGroupName - The name of the Auto Scaling group associated with this scaling policy.

withAutoScalingGroupName

public ScalingPolicy withAutoScalingGroupName(String autoScalingGroupName)
The name of the Auto Scaling group associated with this scaling policy.

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

Constraints:
Length: 1 - 255
Pattern: [ -??-??-?\r\n\t]*

Parameters:
autoScalingGroupName - The name of the Auto Scaling group associated with this scaling policy.
Returns:
A reference to this updated object so that method calls can be chained together.

getPolicyName

public String getPolicyName()
The name of the scaling policy.

Constraints:
Length: 1 - 255
Pattern: [ -??-??-?\r\n\t]*

Returns:
The name of the scaling policy.

setPolicyName

public void setPolicyName(String policyName)
The name of the scaling policy.

Constraints:
Length: 1 - 255
Pattern: [ -??-??-?\r\n\t]*

Parameters:
policyName - The name of the scaling policy.

withPolicyName

public ScalingPolicy withPolicyName(String policyName)
The name of the scaling policy.

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

Constraints:
Length: 1 - 255
Pattern: [ -??-??-?\r\n\t]*

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

getScalingAdjustment

public Integer getScalingAdjustment()
The number associated with the specified AdjustmentType. A positive value adds to the current capacity and a negative value removes from the current capacity.

Returns:
The number associated with the specified AdjustmentType. A positive value adds to the current capacity and a negative value removes from the current capacity.

setScalingAdjustment

public void setScalingAdjustment(Integer scalingAdjustment)
The number associated with the specified AdjustmentType. A positive value adds to the current capacity and a negative value removes from the current capacity.

Parameters:
scalingAdjustment - The number associated with the specified AdjustmentType. A positive value adds to the current capacity and a negative value removes from the current capacity.

withScalingAdjustment

public ScalingPolicy withScalingAdjustment(Integer scalingAdjustment)
The number associated with the specified AdjustmentType. A positive value adds to the current capacity and a negative value removes from the current capacity.

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

Parameters:
scalingAdjustment - The number associated with the specified AdjustmentType. A positive value adds to the current capacity and a negative value removes from the current capacity.
Returns:
A reference to this updated object so that method calls can be chained together.

getAdjustmentType

public String getAdjustmentType()
Specifies whether the ScalingAdjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentOfCapacity.

Constraints:
Length: 1 - 255
Pattern: [ -??-??-?\r\n\t]*

Returns:
Specifies whether the ScalingAdjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentOfCapacity.

setAdjustmentType

public void setAdjustmentType(String adjustmentType)
Specifies whether the ScalingAdjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentOfCapacity.

Constraints:
Length: 1 - 255
Pattern: [ -??-??-?\r\n\t]*

Parameters:
adjustmentType - Specifies whether the ScalingAdjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentOfCapacity.

withAdjustmentType

public ScalingPolicy withAdjustmentType(String adjustmentType)
Specifies whether the ScalingAdjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentOfCapacity.

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

Constraints:
Length: 1 - 255
Pattern: [ -??-??-?\r\n\t]*

Parameters:
adjustmentType - Specifies whether the ScalingAdjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentOfCapacity.
Returns:
A reference to this updated object so that method calls can be chained together.

getCooldown

public Integer getCooldown()
The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.

Returns:
The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.

setCooldown

public void setCooldown(Integer cooldown)
The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.

Parameters:
cooldown - The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.

withCooldown

public ScalingPolicy withCooldown(Integer cooldown)
The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.

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

Parameters:
cooldown - The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.
Returns:
A reference to this updated object so that method calls can be chained together.

getPolicyARN

public String getPolicyARN()
The Amazon Resource Name (ARN) of the policy.

Constraints:
Length: 1 - 1600
Pattern: [ -??-??-?\r\n\t]*

Returns:
The Amazon Resource Name (ARN) of the policy.

setPolicyARN

public void setPolicyARN(String policyARN)
The Amazon Resource Name (ARN) of the policy.

Constraints:
Length: 1 - 1600
Pattern: [ -??-??-?\r\n\t]*

Parameters:
policyARN - The Amazon Resource Name (ARN) of the policy.

withPolicyARN

public ScalingPolicy withPolicyARN(String policyARN)
The Amazon Resource Name (ARN) of the policy.

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

Constraints:
Length: 1 - 1600
Pattern: [ -??-??-?\r\n\t]*

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

getAlarms

public List<Alarm> getAlarms()
A list of CloudWatch Alarms related to the policy.

Returns:
A list of CloudWatch Alarms related to the policy.

setAlarms

public void setAlarms(Collection<Alarm> alarms)
A list of CloudWatch Alarms related to the policy.

Parameters:
alarms - A list of CloudWatch Alarms related to the policy.

withAlarms

public ScalingPolicy withAlarms(Alarm... alarms)
A list of CloudWatch Alarms related to the policy.

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

Parameters:
alarms - A list of CloudWatch Alarms related to the policy.
Returns:
A reference to this updated object so that method calls can be chained together.

withAlarms

public ScalingPolicy withAlarms(Collection<Alarm> alarms)
A list of CloudWatch Alarms related to the policy.

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

Parameters:
alarms - A list of CloudWatch Alarms related to the policy.
Returns:
A reference to this updated 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()


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.