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.

Namespace: Amazon.CloudWatch.Model
Assembly: AWSSDK (in AWSSDK.dll) Version: 1.4.10.0 (1.4.10.0)

Syntax

         
 C#  Visual Basic  Visual C++ 
public class Metric
Public Class Metric
public ref class Metric

Members

            
 All Members  Constructors   Properties   Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
Metric()()()()
Initializes a new instance of the Metric class
Dimensions
A list of dimensions associated with the metric.

Constraints:

Length
0 - 10

Equals(Object)
Determines whether the specified Object is equal to the current 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:

Length
1 - 255

Namespace
The namespace of the metric.

Constraints:

Length
1 - 255
Pattern
[^:].*

ToString()()()()
Returns a String that represents the current Object.
(Inherited from Object.)
WithDimensions(array<Dimension>[]()[][])
Adds elements to the Dimensions collection
WithDimensions(IEnumerable<(Of <<'(Dimension>)>>))
Adds elements to the Dimensions collection
WithMetricName(String)
Sets the MetricName property
WithNamespace(String)
Sets the Namespace property

Inheritance Hierarchy

System..::..Object
  Amazon.CloudWatch.Model..::..Metric

See Also