The Metric data type contains information about a specific metric. If you call ListMetrics, Amazon CloudWatch returns information contained by this data type.
The example in the Examples section publishes two metrics named buffers and latency. Both metrics are in the examples namespace. Both metrics have two dimensions, InstanceID and InstanceType.
Declaration Syntax
C# |
public class Metric
Members
All Members | Constructors | Methods | Properties | ||
Icon | Member | Description |
---|---|---|
Metric()()()() | Initializes a new instance of the Metric class | |
Dimensions |
A list of dimensions associated with the metric.
Constraints: | |
Equals(Object) | (Inherited from Object.) | |
GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType()()()() | Gets the type of the current instance. (Inherited from Object.) | |
MetricName |
The name of the metric.
Constraints: | |
Namespace |
The namespace of the metric.
Constraints: | |
ToString()()()() | Returns a string that represents the current object. (Inherited from Object.) | |
WithDimensions(array<Dimension>[]()[][]) | Obsolete.
Adds elements to the Dimensions collection
| |
WithDimensions(IEnumerable<(Of <<'(Dimension>)>>)) | Obsolete.
Adds elements to the Dimensions collection
| |
WithMetricName(String) | Obsolete.
Sets the MetricName property
| |
WithNamespace(String) | Obsolete.
Sets the Namespace property
|
Inheritance Hierarchy
Object | |
Metric |