@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class CustomizedLoadMetricSpecification extends Object implements Serializable, Cloneable, StructuredPojo
Represents a CloudWatch metric of your choosing that can be used for predictive scaling.
For predictive scaling to work with a customized load metric specification, AWS Auto Scaling needs access to the
Sum
and Average
statistics that CloudWatch computes from metric data. Statistics are
calculations used to aggregate data over specified time periods.
When you choose a load metric, make sure that the required Sum
and Average
statistics for
your metric are available in CloudWatch and that they provide relevant data for predictive scaling. The
Sum
statistic must represent the total load on the resource, and the Average
statistic must
represent the average load per capacity unit of the resource. For example, there is a metric that counts the number
of requests processed by your Auto Scaling group. If the Sum
statistic represents the total request
count processed by the group, then the Average
statistic for the specified metric must represent the
average request count processed by each instance of the group.
For information about terminology, available metrics, or how to publish new metrics, see Amazon CloudWatch Concepts in the Amazon CloudWatch User Guide.
Constructor and Description |
---|
CustomizedLoadMetricSpecification() |
Modifier and Type | Method and Description |
---|---|
CustomizedLoadMetricSpecification |
clone() |
boolean |
equals(Object obj) |
List<MetricDimension> |
getDimensions()
The dimensions of the metric.
|
String |
getMetricName()
The name of the metric.
|
String |
getNamespace()
The namespace of the metric.
|
String |
getStatistic()
The statistic of the metric.
|
String |
getUnit()
The unit of the metric.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setDimensions(Collection<MetricDimension> dimensions)
The dimensions of the metric.
|
void |
setMetricName(String metricName)
The name of the metric.
|
void |
setNamespace(String namespace)
The namespace of the metric.
|
void |
setStatistic(String statistic)
The statistic of the metric.
|
void |
setUnit(String unit)
The unit of the metric.
|
String |
toString()
Returns a string representation of this object.
|
CustomizedLoadMetricSpecification |
withDimensions(Collection<MetricDimension> dimensions)
The dimensions of the metric.
|
CustomizedLoadMetricSpecification |
withDimensions(MetricDimension... dimensions)
The dimensions of the metric.
|
CustomizedLoadMetricSpecification |
withMetricName(String metricName)
The name of the metric.
|
CustomizedLoadMetricSpecification |
withNamespace(String namespace)
The namespace of the metric.
|
CustomizedLoadMetricSpecification |
withStatistic(MetricStatistic statistic)
The statistic of the metric.
|
CustomizedLoadMetricSpecification |
withStatistic(String statistic)
The statistic of the metric.
|
CustomizedLoadMetricSpecification |
withUnit(String unit)
The unit of the metric.
|
public void setMetricName(String metricName)
The name of the metric.
metricName
- The name of the metric.public String getMetricName()
The name of the metric.
public CustomizedLoadMetricSpecification withMetricName(String metricName)
The name of the metric.
metricName
- The name of the metric.public void setNamespace(String namespace)
The namespace of the metric.
namespace
- The namespace of the metric.public String getNamespace()
The namespace of the metric.
public CustomizedLoadMetricSpecification withNamespace(String namespace)
The namespace of the metric.
namespace
- The namespace of the metric.public List<MetricDimension> getDimensions()
The dimensions of the metric.
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your customized load metric specification.
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your customized load metric specification.
public void setDimensions(Collection<MetricDimension> dimensions)
The dimensions of the metric.
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your customized load metric specification.
dimensions
- The dimensions of the metric.
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your customized load metric specification.
public CustomizedLoadMetricSpecification withDimensions(MetricDimension... dimensions)
The dimensions of the metric.
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your customized load metric specification.
NOTE: This method appends the values to the existing list (if any). Use
setDimensions(java.util.Collection)
or withDimensions(java.util.Collection)
if you want to
override the existing values.
dimensions
- The dimensions of the metric.
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your customized load metric specification.
public CustomizedLoadMetricSpecification withDimensions(Collection<MetricDimension> dimensions)
The dimensions of the metric.
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your customized load metric specification.
dimensions
- The dimensions of the metric.
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your customized load metric specification.
public void setStatistic(String statistic)
The statistic of the metric. Currently, the value must always be Sum
.
statistic
- The statistic of the metric. Currently, the value must always be Sum
.MetricStatistic
public String getStatistic()
The statistic of the metric. Currently, the value must always be Sum
.
Sum
.MetricStatistic
public CustomizedLoadMetricSpecification withStatistic(String statistic)
The statistic of the metric. Currently, the value must always be Sum
.
statistic
- The statistic of the metric. Currently, the value must always be Sum
.MetricStatistic
public CustomizedLoadMetricSpecification withStatistic(MetricStatistic statistic)
The statistic of the metric. Currently, the value must always be Sum
.
statistic
- The statistic of the metric. Currently, the value must always be Sum
.MetricStatistic
public void setUnit(String unit)
The unit of the metric.
unit
- The unit of the metric.public String getUnit()
The unit of the metric.
public CustomizedLoadMetricSpecification withUnit(String unit)
The unit of the metric.
unit
- The unit of the metric.public String toString()
toString
in class Object
Object.toString()
public CustomizedLoadMetricSpecification 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.