@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class MetricStat extends Object implements Serializable, Cloneable
This structure defines the CloudWatch metric to return, along with the statistic and unit.
For more information about the CloudWatch terminology below, see Amazon CloudWatch concepts in the Amazon CloudWatch User Guide.
Constructor and Description |
---|
MetricStat() |
Modifier and Type | Method and Description |
---|---|
MetricStat |
clone() |
boolean |
equals(Object obj) |
Metric |
getMetric()
The CloudWatch metric to return, including the metric name, namespace, and dimensions.
|
String |
getStat()
The statistic to return.
|
String |
getUnit()
The unit to use for the returned data points.
|
int |
hashCode() |
void |
setMetric(Metric metric)
The CloudWatch metric to return, including the metric name, namespace, and dimensions.
|
void |
setStat(String stat)
The statistic to return.
|
void |
setUnit(String unit)
The unit to use for the returned data points.
|
String |
toString()
Returns a string representation of this object.
|
MetricStat |
withMetric(Metric metric)
The CloudWatch metric to return, including the metric name, namespace, and dimensions.
|
MetricStat |
withStat(String stat)
The statistic to return.
|
MetricStat |
withUnit(String unit)
The unit to use for the returned data points.
|
public void setMetric(Metric metric)
The CloudWatch metric to return, including the metric name, namespace, and dimensions. To get the exact metric name, namespace, and dimensions, inspect the Metric object that is returned by a call to ListMetrics.
metric
- The CloudWatch metric to return, including the metric name, namespace, and dimensions. To get the exact
metric name, namespace, and dimensions, inspect the Metric object
that is returned by a call to ListMetrics.public Metric getMetric()
The CloudWatch metric to return, including the metric name, namespace, and dimensions. To get the exact metric name, namespace, and dimensions, inspect the Metric object that is returned by a call to ListMetrics.
public MetricStat withMetric(Metric metric)
The CloudWatch metric to return, including the metric name, namespace, and dimensions. To get the exact metric name, namespace, and dimensions, inspect the Metric object that is returned by a call to ListMetrics.
metric
- The CloudWatch metric to return, including the metric name, namespace, and dimensions. To get the exact
metric name, namespace, and dimensions, inspect the Metric object
that is returned by a call to ListMetrics.public void setStat(String stat)
The statistic to return. It can include any CloudWatch statistic or extended statistic. For a list of valid values, see the table in Statistics in the Amazon CloudWatch User Guide.
The most commonly used metrics for predictive scaling are Average
and Sum
.
stat
- The statistic to return. It can include any CloudWatch statistic or extended statistic. For a list of
valid values, see the table in Statistics in the Amazon CloudWatch User Guide.
The most commonly used metrics for predictive scaling are Average
and Sum
.
public String getStat()
The statistic to return. It can include any CloudWatch statistic or extended statistic. For a list of valid values, see the table in Statistics in the Amazon CloudWatch User Guide.
The most commonly used metrics for predictive scaling are Average
and Sum
.
The most commonly used metrics for predictive scaling are Average
and Sum
.
public MetricStat withStat(String stat)
The statistic to return. It can include any CloudWatch statistic or extended statistic. For a list of valid values, see the table in Statistics in the Amazon CloudWatch User Guide.
The most commonly used metrics for predictive scaling are Average
and Sum
.
stat
- The statistic to return. It can include any CloudWatch statistic or extended statistic. For a list of
valid values, see the table in Statistics in the Amazon CloudWatch User Guide.
The most commonly used metrics for predictive scaling are Average
and Sum
.
public void setUnit(String unit)
The unit to use for the returned data points. For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API Reference.
unit
- The unit to use for the returned data points. For a complete list of the units that CloudWatch supports,
see the MetricDatum
data type in the Amazon CloudWatch API Reference.public String getUnit()
The unit to use for the returned data points. For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API Reference.
public MetricStat withUnit(String unit)
The unit to use for the returned data points. For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API Reference.
unit
- The unit to use for the returned data points. For a complete list of the units that CloudWatch supports,
see the MetricDatum
data type in the Amazon CloudWatch API Reference.public String toString()
toString
in class Object
Object.toString()
public MetricStat clone()