@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Dimension extends Object implements Serializable, Cloneable
A dimension is a name/value pair that is part of the identity of a metric. Because dimensions are part of the unique
identifier for a metric, whenever you add a unique name/value pair to one of your metrics, you are creating a new
variation of that metric. For example, many Amazon EC2 metrics publish InstanceId
as a dimension name,
and the actual instance ID as the value for that dimension.
You can assign up to 30 dimensions to a metric.
Constructor and Description |
---|
Dimension() |
Modifier and Type | Method and Description |
---|---|
Dimension |
clone() |
boolean |
equals(Object obj) |
String |
getName()
The name of the dimension.
|
String |
getValue()
The value of the dimension.
|
int |
hashCode() |
void |
setName(String name)
The name of the dimension.
|
void |
setValue(String value)
The value of the dimension.
|
String |
toString()
Returns a string representation of this object.
|
Dimension |
withName(String name)
The name of the dimension.
|
Dimension |
withValue(String value)
The value of the dimension.
|
public void setName(String name)
The name of the dimension. Dimension names must contain only ASCII characters, must include at least one
non-whitespace character, and cannot start with a colon (:
). ASCII control characters are not
supported as part of dimension names.
name
- The name of the dimension. Dimension names must contain only ASCII characters, must include at least one
non-whitespace character, and cannot start with a colon (:
). ASCII control characters are not
supported as part of dimension names.public String getName()
The name of the dimension. Dimension names must contain only ASCII characters, must include at least one
non-whitespace character, and cannot start with a colon (:
). ASCII control characters are not
supported as part of dimension names.
:
). ASCII control characters are
not supported as part of dimension names.public Dimension withName(String name)
The name of the dimension. Dimension names must contain only ASCII characters, must include at least one
non-whitespace character, and cannot start with a colon (:
). ASCII control characters are not
supported as part of dimension names.
name
- The name of the dimension. Dimension names must contain only ASCII characters, must include at least one
non-whitespace character, and cannot start with a colon (:
). ASCII control characters are not
supported as part of dimension names.public void setValue(String value)
The value of the dimension. Dimension values must contain only ASCII characters and must include at least one non-whitespace character. ASCII control characters are not supported as part of dimension values.
value
- The value of the dimension. Dimension values must contain only ASCII characters and must include at least
one non-whitespace character. ASCII control characters are not supported as part of dimension values.public String getValue()
The value of the dimension. Dimension values must contain only ASCII characters and must include at least one non-whitespace character. ASCII control characters are not supported as part of dimension values.
public Dimension withValue(String value)
The value of the dimension. Dimension values must contain only ASCII characters and must include at least one non-whitespace character. ASCII control characters are not supported as part of dimension values.
value
- The value of the dimension. Dimension values must contain only ASCII characters and must include at least
one non-whitespace character. ASCII control characters are not supported as part of dimension values.public String toString()
toString
in class Object
Object.toString()