|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.autoscaling.model.SetDesiredCapacityRequest
public class SetDesiredCapacityRequest
Container for the parameters to the SetDesiredCapacity operation
.
Adjusts the desired size of the AutoScalingGroup by initiating scaling activities. When reducing the size of the group, it is not possible to define which Amazon EC2 instances will be terminated. This applies to any Auto Scaling decisions that might result in terminating instances.
There are two common use cases for SetDesiredCapacity
:
one for users of the Auto Scaling triggering system, and another for developers who write their own triggering systems. Both use cases
relate to the concept of cooldown.
In the first case, if you use the Auto Scaling triggering system, SetDesiredCapacity
changes the size of your Auto Scaling group without
regard to the cooldown period. This could be useful, for example, if Auto Scaling did something unexpected for some reason. If your cooldown period is
10 minutes, Auto Scaling would normally reject requests to change the size of the group for that entire 10-minute period. The
SetDesiredCapacity
command allows you to circumvent this restriction and change the size of the group before the end of the cooldown
period.
In the second case, if you write your own triggering system, you can use SetDesiredCapacity
to control the size of your Auto Scaling
group. If you want the same cooldown functionality that Auto Scaling offers, you can configure SetDesiredCapacity
to honor cooldown by
setting the HonorCooldown
parameter to true
.
AmazonAutoScaling.setDesiredCapacity(SetDesiredCapacityRequest)
Constructor Summary | |
---|---|
SetDesiredCapacityRequest()
|
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
String |
getAutoScalingGroupName()
The name of the Auto Scaling group. |
Integer |
getDesiredCapacity()
The new capacity setting for the Auto Scaling group. |
Boolean |
getHonorCooldown()
By default, SetDesiredCapacity overrides any cooldown
period. |
int |
hashCode()
|
Boolean |
isHonorCooldown()
By default, SetDesiredCapacity overrides any cooldown
period. |
void |
setAutoScalingGroupName(String autoScalingGroupName)
The name of the Auto Scaling group. |
void |
setDesiredCapacity(Integer desiredCapacity)
The new capacity setting for the Auto Scaling group. |
void |
setHonorCooldown(Boolean honorCooldown)
By default, SetDesiredCapacity overrides any cooldown
period. |
String |
toString()
Returns a string representation of this object; useful for testing and debugging. |
SetDesiredCapacityRequest |
withAutoScalingGroupName(String autoScalingGroupName)
The name of the Auto Scaling group. |
SetDesiredCapacityRequest |
withDesiredCapacity(Integer desiredCapacity)
The new capacity setting for the Auto Scaling group. |
SetDesiredCapacityRequest |
withHonorCooldown(Boolean honorCooldown)
By default, SetDesiredCapacity overrides any cooldown
period. |
Methods inherited from class com.amazonaws.AmazonWebServiceRequest |
---|
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, setDelegationToken, setRequestCredentials |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SetDesiredCapacityRequest()
Method Detail |
---|
public String getAutoScalingGroupName()
Constraints:
Length: 1 - 1600
Pattern: [ --�𐀀-\r\n\t]*
public void setAutoScalingGroupName(String autoScalingGroupName)
Constraints:
Length: 1 - 1600
Pattern: [ --�𐀀-\r\n\t]*
autoScalingGroupName
- The name of the Auto Scaling group.public SetDesiredCapacityRequest withAutoScalingGroupName(String autoScalingGroupName)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 1600
Pattern: [ --�𐀀-\r\n\t]*
autoScalingGroupName
- The name of the Auto Scaling group.
public Integer getDesiredCapacity()
public void setDesiredCapacity(Integer desiredCapacity)
desiredCapacity
- The new capacity setting for the Auto Scaling group.public SetDesiredCapacityRequest withDesiredCapacity(Integer desiredCapacity)
Returns a reference to this object so that method calls can be chained together.
desiredCapacity
- The new capacity setting for the Auto Scaling group.
public Boolean isHonorCooldown()
SetDesiredCapacity
overrides any cooldown
period. Set to True
if you want Auto Scaling to reject
this request when the Auto Scaling group is in cooldown.
SetDesiredCapacity
overrides any cooldown
period. Set to True
if you want Auto Scaling to reject
this request when the Auto Scaling group is in cooldown.public void setHonorCooldown(Boolean honorCooldown)
SetDesiredCapacity
overrides any cooldown
period. Set to True
if you want Auto Scaling to reject
this request when the Auto Scaling group is in cooldown.
honorCooldown
- By default, SetDesiredCapacity
overrides any cooldown
period. Set to True
if you want Auto Scaling to reject
this request when the Auto Scaling group is in cooldown.public SetDesiredCapacityRequest withHonorCooldown(Boolean honorCooldown)
SetDesiredCapacity
overrides any cooldown
period. Set to True
if you want Auto Scaling to reject
this request when the Auto Scaling group is in cooldown.
Returns a reference to this object so that method calls can be chained together.
honorCooldown
- By default, SetDesiredCapacity
overrides any cooldown
period. Set to True
if you want Auto Scaling to reject
this request when the Auto Scaling group is in cooldown.
public Boolean getHonorCooldown()
SetDesiredCapacity
overrides any cooldown
period. Set to True
if you want Auto Scaling to reject
this request when the Auto Scaling group is in cooldown.
SetDesiredCapacity
overrides any cooldown
period. Set to True
if you want Auto Scaling to reject
this request when the Auto Scaling group is in cooldown.public String toString()
toString
in class Object
Object.toString()
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |