@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AutoScalingPolicy extends Object implements Serializable, Cloneable, StructuredPojo
An automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster. An automatic scaling policy defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric. See PutAutoScalingPolicy.
Constructor and Description |
---|
AutoScalingPolicy() |
Modifier and Type | Method and Description |
---|---|
AutoScalingPolicy |
clone() |
boolean |
equals(Object obj) |
ScalingConstraints |
getConstraints()
The upper and lower EC2 instance limits for an automatic scaling policy.
|
List<ScalingRule> |
getRules()
The scale-in and scale-out rules that comprise the automatic scaling policy.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setConstraints(ScalingConstraints constraints)
The upper and lower EC2 instance limits for an automatic scaling policy.
|
void |
setRules(Collection<ScalingRule> rules)
The scale-in and scale-out rules that comprise the automatic scaling policy.
|
String |
toString()
Returns a string representation of this object; useful for testing and debugging.
|
AutoScalingPolicy |
withConstraints(ScalingConstraints constraints)
The upper and lower EC2 instance limits for an automatic scaling policy.
|
AutoScalingPolicy |
withRules(Collection<ScalingRule> rules)
The scale-in and scale-out rules that comprise the automatic scaling policy.
|
AutoScalingPolicy |
withRules(ScalingRule... rules)
The scale-in and scale-out rules that comprise the automatic scaling policy.
|
public void setConstraints(ScalingConstraints constraints)
The upper and lower EC2 instance limits for an automatic scaling policy. Automatic scaling activity will not cause an instance group to grow above or below these limits.
constraints
- The upper and lower EC2 instance limits for an automatic scaling policy. Automatic scaling activity will
not cause an instance group to grow above or below these limits.public ScalingConstraints getConstraints()
The upper and lower EC2 instance limits for an automatic scaling policy. Automatic scaling activity will not cause an instance group to grow above or below these limits.
public AutoScalingPolicy withConstraints(ScalingConstraints constraints)
The upper and lower EC2 instance limits for an automatic scaling policy. Automatic scaling activity will not cause an instance group to grow above or below these limits.
constraints
- The upper and lower EC2 instance limits for an automatic scaling policy. Automatic scaling activity will
not cause an instance group to grow above or below these limits.public List<ScalingRule> getRules()
The scale-in and scale-out rules that comprise the automatic scaling policy.
public void setRules(Collection<ScalingRule> rules)
The scale-in and scale-out rules that comprise the automatic scaling policy.
rules
- The scale-in and scale-out rules that comprise the automatic scaling policy.public AutoScalingPolicy withRules(ScalingRule... rules)
The scale-in and scale-out rules that comprise the automatic scaling policy.
NOTE: This method appends the values to the existing list (if any). Use
setRules(java.util.Collection)
or withRules(java.util.Collection)
if you want to override the
existing values.
rules
- The scale-in and scale-out rules that comprise the automatic scaling policy.public AutoScalingPolicy withRules(Collection<ScalingRule> rules)
The scale-in and scale-out rules that comprise the automatic scaling policy.
rules
- The scale-in and scale-out rules that comprise the automatic scaling policy.public String toString()
toString
in class Object
Object.toString()
public AutoScalingPolicy clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.