@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class TargetTrackingConfiguration extends Object implements Serializable, Cloneable
Represents a target tracking scaling policy configuration to use with Amazon EC2 Auto Scaling.
Constructor and Description |
---|
TargetTrackingConfiguration() |
Modifier and Type | Method and Description |
---|---|
TargetTrackingConfiguration |
clone() |
boolean |
equals(Object obj) |
CustomizedMetricSpecification |
getCustomizedMetricSpecification()
A customized metric.
|
Boolean |
getDisableScaleIn()
Indicates whether scaling in by the target tracking scaling policy is disabled.
|
PredefinedMetricSpecification |
getPredefinedMetricSpecification()
A predefined metric.
|
Double |
getTargetValue()
The target value for the metric.
|
int |
hashCode() |
Boolean |
isDisableScaleIn()
Indicates whether scaling in by the target tracking scaling policy is disabled.
|
void |
setCustomizedMetricSpecification(CustomizedMetricSpecification customizedMetricSpecification)
A customized metric.
|
void |
setDisableScaleIn(Boolean disableScaleIn)
Indicates whether scaling in by the target tracking scaling policy is disabled.
|
void |
setPredefinedMetricSpecification(PredefinedMetricSpecification predefinedMetricSpecification)
A predefined metric.
|
void |
setTargetValue(Double targetValue)
The target value for the metric.
|
String |
toString()
Returns a string representation of this object.
|
TargetTrackingConfiguration |
withCustomizedMetricSpecification(CustomizedMetricSpecification customizedMetricSpecification)
A customized metric.
|
TargetTrackingConfiguration |
withDisableScaleIn(Boolean disableScaleIn)
Indicates whether scaling in by the target tracking scaling policy is disabled.
|
TargetTrackingConfiguration |
withPredefinedMetricSpecification(PredefinedMetricSpecification predefinedMetricSpecification)
A predefined metric.
|
TargetTrackingConfiguration |
withTargetValue(Double targetValue)
The target value for the metric.
|
public void setPredefinedMetricSpecification(PredefinedMetricSpecification predefinedMetricSpecification)
A predefined metric. You must specify either a predefined metric or a customized metric.
predefinedMetricSpecification
- A predefined metric. You must specify either a predefined metric or a customized metric.public PredefinedMetricSpecification getPredefinedMetricSpecification()
A predefined metric. You must specify either a predefined metric or a customized metric.
public TargetTrackingConfiguration withPredefinedMetricSpecification(PredefinedMetricSpecification predefinedMetricSpecification)
A predefined metric. You must specify either a predefined metric or a customized metric.
predefinedMetricSpecification
- A predefined metric. You must specify either a predefined metric or a customized metric.public void setCustomizedMetricSpecification(CustomizedMetricSpecification customizedMetricSpecification)
A customized metric. You must specify either a predefined metric or a customized metric.
customizedMetricSpecification
- A customized metric. You must specify either a predefined metric or a customized metric.public CustomizedMetricSpecification getCustomizedMetricSpecification()
A customized metric. You must specify either a predefined metric or a customized metric.
public TargetTrackingConfiguration withCustomizedMetricSpecification(CustomizedMetricSpecification customizedMetricSpecification)
A customized metric. You must specify either a predefined metric or a customized metric.
customizedMetricSpecification
- A customized metric. You must specify either a predefined metric or a customized metric.public void setTargetValue(Double targetValue)
The target value for the metric.
Some metrics are based on a count instead of a percentage, such as the request count for an Application Load Balancer or the number of messages in an SQS queue. If the scaling policy specifies one of these metrics, specify the target utilization as the optimal average request or message count per instance during any one-minute interval.
targetValue
- The target value for the metric. Some metrics are based on a count instead of a percentage, such as the request count for an Application Load Balancer or the number of messages in an SQS queue. If the scaling policy specifies one of these metrics, specify the target utilization as the optimal average request or message count per instance during any one-minute interval.
public Double getTargetValue()
The target value for the metric.
Some metrics are based on a count instead of a percentage, such as the request count for an Application Load Balancer or the number of messages in an SQS queue. If the scaling policy specifies one of these metrics, specify the target utilization as the optimal average request or message count per instance during any one-minute interval.
Some metrics are based on a count instead of a percentage, such as the request count for an Application Load Balancer or the number of messages in an SQS queue. If the scaling policy specifies one of these metrics, specify the target utilization as the optimal average request or message count per instance during any one-minute interval.
public TargetTrackingConfiguration withTargetValue(Double targetValue)
The target value for the metric.
Some metrics are based on a count instead of a percentage, such as the request count for an Application Load Balancer or the number of messages in an SQS queue. If the scaling policy specifies one of these metrics, specify the target utilization as the optimal average request or message count per instance during any one-minute interval.
targetValue
- The target value for the metric. Some metrics are based on a count instead of a percentage, such as the request count for an Application Load Balancer or the number of messages in an SQS queue. If the scaling policy specifies one of these metrics, specify the target utilization as the optimal average request or message count per instance during any one-minute interval.
public void setDisableScaleIn(Boolean disableScaleIn)
Indicates whether scaling in by the target tracking scaling policy is disabled. If scaling in is disabled, the
target tracking scaling policy doesn't remove instances from the Auto Scaling group. Otherwise, the target
tracking scaling policy can remove instances from the Auto Scaling group. The default is false
.
disableScaleIn
- Indicates whether scaling in by the target tracking scaling policy is disabled. If scaling in is disabled,
the target tracking scaling policy doesn't remove instances from the Auto Scaling group. Otherwise, the
target tracking scaling policy can remove instances from the Auto Scaling group. The default is
false
.public Boolean getDisableScaleIn()
Indicates whether scaling in by the target tracking scaling policy is disabled. If scaling in is disabled, the
target tracking scaling policy doesn't remove instances from the Auto Scaling group. Otherwise, the target
tracking scaling policy can remove instances from the Auto Scaling group. The default is false
.
false
.public TargetTrackingConfiguration withDisableScaleIn(Boolean disableScaleIn)
Indicates whether scaling in by the target tracking scaling policy is disabled. If scaling in is disabled, the
target tracking scaling policy doesn't remove instances from the Auto Scaling group. Otherwise, the target
tracking scaling policy can remove instances from the Auto Scaling group. The default is false
.
disableScaleIn
- Indicates whether scaling in by the target tracking scaling policy is disabled. If scaling in is disabled,
the target tracking scaling policy doesn't remove instances from the Auto Scaling group. Otherwise, the
target tracking scaling policy can remove instances from the Auto Scaling group. The default is
false
.public Boolean isDisableScaleIn()
Indicates whether scaling in by the target tracking scaling policy is disabled. If scaling in is disabled, the
target tracking scaling policy doesn't remove instances from the Auto Scaling group. Otherwise, the target
tracking scaling policy can remove instances from the Auto Scaling group. The default is false
.
false
.public String toString()
toString
in class Object
Object.toString()
public TargetTrackingConfiguration clone()