AWS SDK for .NET Documentation
Metric Class
AmazonAmazon.CloudWatch.ModelMetric Did this page help you?   Yes   No    Tell us about it...

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 MembersConstructorsMethodsProperties



IconMemberDescription
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>[]()[][]) 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

Assembly: AWSSDK (Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)