@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Metric extends Object implements Serializable, Cloneable
Represents a specific metric.
Constructor and Description |
---|
Metric() |
Modifier and Type | Method and Description |
---|---|
Metric |
clone() |
boolean |
equals(Object obj) |
List<MetricDimension> |
getDimensions()
The dimensions for the metric.
|
String |
getMetricName()
The name of the metric.
|
String |
getNamespace()
The namespace of the metric.
|
int |
hashCode() |
void |
setDimensions(Collection<MetricDimension> dimensions)
The dimensions for the metric.
|
void |
setMetricName(String metricName)
The name of the metric.
|
void |
setNamespace(String namespace)
The namespace of the metric.
|
String |
toString()
Returns a string representation of this object.
|
Metric |
withDimensions(Collection<MetricDimension> dimensions)
The dimensions for the metric.
|
Metric |
withDimensions(MetricDimension... dimensions)
The dimensions for the metric.
|
Metric |
withMetricName(String metricName)
The name of the metric.
|
Metric |
withNamespace(String namespace)
The namespace of the metric.
|
public void setNamespace(String namespace)
The namespace of the metric. For more information, see the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User Guide.
namespace
- The namespace of the metric. For more information, see the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User
Guide.public String getNamespace()
The namespace of the metric. For more information, see the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User Guide.
public Metric withNamespace(String namespace)
The namespace of the metric. For more information, see the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User Guide.
namespace
- The namespace of the metric. For more information, see the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User
Guide.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 Metric withMetricName(String metricName)
The name of the metric.
metricName
- The name of the metric.public List<MetricDimension> getDimensions()
The dimensions for the metric. For the list of available dimensions, see the Amazon Web Services documentation available from the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User Guide.
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
public void setDimensions(Collection<MetricDimension> dimensions)
The dimensions for the metric. For the list of available dimensions, see the Amazon Web Services documentation available from the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User Guide.
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
dimensions
- The dimensions for the metric. For the list of available dimensions, see the Amazon Web Services
documentation available from the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User
Guide.
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
public Metric withDimensions(MetricDimension... dimensions)
The dimensions for the metric. For the list of available dimensions, see the Amazon Web Services documentation available from the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User Guide.
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
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 for the metric. For the list of available dimensions, see the Amazon Web Services
documentation available from the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User
Guide.
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
public Metric withDimensions(Collection<MetricDimension> dimensions)
The dimensions for the metric. For the list of available dimensions, see the Amazon Web Services documentation available from the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User Guide.
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
dimensions
- The dimensions for the metric. For the list of available dimensions, see the Amazon Web Services
documentation available from the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User
Guide.
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
public String toString()
toString
in class Object
Object.toString()