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
 boolean equals(Object obj)
           
 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.
 Integer getMinAdjustmentStep()
          Changes the DesiredCapacity of the Auto Scaling group by at least the specified number of instances.
 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 adjustment type.
 int hashCode()
           
 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 setMinAdjustmentStep(Integer minAdjustmentStep)
          Changes the DesiredCapacity of the Auto Scaling group by at least the specified number of instances.
 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 adjustment type.
 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 withMinAdjustmentStep(Integer minAdjustmentStep)
          Changes the DesiredCapacity of the Auto Scaling group by at least the specified number of instances.
 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 adjustment type.
 
Methods inherited from class java.lang.Object
getClass, 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 adjustment type. A positive value adds to the current capacity and a negative value removes from the current capacity.

Returns:
The number associated with the specified adjustment type. 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 adjustment type. 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 adjustment type. 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 adjustment type. 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 adjustment type. 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 PercentChangeInCapacity.

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 PercentChangeInCapacity.

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 PercentChangeInCapacity.

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 PercentChangeInCapacity.

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 PercentChangeInCapacity.

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 PercentChangeInCapacity.
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.

getMinAdjustmentStep

public Integer getMinAdjustmentStep()
Changes the DesiredCapacity of the Auto Scaling group by at least the specified number of instances.

Returns:
Changes the DesiredCapacity of the Auto Scaling group by at least the specified number of instances.

setMinAdjustmentStep

public void setMinAdjustmentStep(Integer minAdjustmentStep)
Changes the DesiredCapacity of the Auto Scaling group by at least the specified number of instances.

Parameters:
minAdjustmentStep - Changes the DesiredCapacity of the Auto Scaling group by at least the specified number of instances.

withMinAdjustmentStep

public ScalingPolicy withMinAdjustmentStep(Integer minAdjustmentStep)
Changes the DesiredCapacity of the Auto Scaling group by at least the specified number of instances.

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

Parameters:
minAdjustmentStep - Changes the DesiredCapacity of the Auto Scaling group by at least the specified number of instances.
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()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


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