Class MetricDefinition
Metric definition class specifies the metadata for a metric.
Namespace: System.Dynamic.ExpandoObject
Assembly: Microsoft.Azure.Management.Monitor.dll
Syntax
public class MetricDefinition
Constructors
MetricDefinition()
Initializes a new instance of the MetricDefinition class.
Declaration
public MetricDefinition ();
MetricDefinition(Nullable<Boolean>, String, String, LocalizableString, Nullable<Unit>, Nullable<AggregationType>, IList<Nullable<AggregationType>>, IList<MetricAvailability>, String, IList<LocalizableString>)
Initializes a new instance of the MetricDefinition class.
Declaration
public MetricDefinition (Nullable<bool> isDimensionRequired = null, string resourceId = null, string namespaceProperty = null, Microsoft.Azure.Management.Monitor.Models.LocalizableString name = null, Nullable<Microsoft.Azure.Management.Monitor.Models.Unit> unit = null, Nullable<Microsoft.Azure.Management.Monitor.Models.AggregationType> primaryAggregationType = null, System.Collections.Generic.IList<Nullable<Microsoft.Azure.Management.Monitor.Models.AggregationType>> supportedAggregationTypes = null, System.Collections.Generic.IList<Microsoft.Azure.Management.Monitor.Models.MetricAvailability> metricAvailabilities = null, string id = null, System.Collections.Generic.IList<Microsoft.Azure.Management.Monitor.Models.LocalizableString> dimensions = null);
Parameters
|
Nullable<Boolean>
isDimensionRequired
Flag to indicate whether the dimension is required. |
|
String
resourceId
the resource identifier of the resource that emitted the metric. |
|
String
namespaceProperty
the namespace the metric belongs to. |
|
LocalizableString
name
the name and the display name of the metric, i.e. it is a localizable string. |
|
Nullable<Unit>
unit
the unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'CountPerSecond', 'BytesPerSecond', 'Percent', 'MilliSeconds', 'ByteSeconds', 'Unspecified', 'Cores', 'MilliCores', 'NanoCores', 'BitsPerSecond' |
|
Nullable<AggregationType>
primaryAggregationType
the primary aggregation type value defining how to use the values for display. Possible values include: 'None', 'Average', 'Count', 'Minimum', 'Maximum', 'Total' |
|
IList<Nullable<AggregationType>>
supportedAggregationTypes
the collection of what aggregation types are supported. |
|
IList<MetricAvailability>
metricAvailabilities
the collection of what aggregation intervals are available to be queried. |
|
String
id
the resource identifier of the metric definition. |
|
IList<LocalizableString>
dimensions
the name and the display name of the dimension, i.e. it is a localizable string. |
Properties
Dimensions
Gets or sets the name and the display name of the dimension, i.e. it is a localizable string.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="dimensions")]
public System.Collections.Generic.IList<Microsoft.Azure.Management.Monitor.Models.LocalizableString> Dimensions { get; set; }
Property Value
|
IList<LocalizableString>
|
Id
Gets or sets the resource identifier of the metric definition.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="id")]
public string Id { get; set; }
Property Value
|
String
|
IsDimensionRequired
Gets or sets flag to indicate whether the dimension is required.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="isDimensionRequired")]
public Nullable<bool> IsDimensionRequired { get; set; }
Property Value
|
Nullable<Boolean>
|
MetricAvailabilities
Gets or sets the collection of what aggregation intervals are available to be queried.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="metricAvailabilities")]
public System.Collections.Generic.IList<Microsoft.Azure.Management.Monitor.Models.MetricAvailability> MetricAvailabilities { get; set; }
Property Value
|
IList<MetricAvailability>
|
Name
Gets or sets the name and the display name of the metric, i.e. it is a localizable string.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="name")]
public Microsoft.Azure.Management.Monitor.Models.LocalizableString Name { get; set; }
Property Value
|
LocalizableString
|
NamespaceProperty
Gets or sets the namespace the metric belongs to.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="namespace")]
public string NamespaceProperty { get; set; }
Property Value
|
String
|
PrimaryAggregationType
Gets or sets the primary aggregation type value defining how to use the values for display. Possible values include: 'None', 'Average', 'Count', 'Minimum', 'Maximum', 'Total'
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="primaryAggregationType")]
public Nullable<Microsoft.Azure.Management.Monitor.Models.AggregationType> PrimaryAggregationType { get; set; }
Property Value
|
Nullable<AggregationType>
|
ResourceId
Gets or sets the resource identifier of the resource that emitted the metric.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="resourceId")]
public string ResourceId { get; set; }
Property Value
|
String
|
SupportedAggregationTypes
Gets or sets the collection of what aggregation types are supported.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="supportedAggregationTypes")]
public System.Collections.Generic.IList<Nullable<Microsoft.Azure.Management.Monitor.Models.AggregationType>> SupportedAggregationTypes { get; set; }
Property Value
|
IList<Nullable<AggregationType>>
|
Unit
Gets or sets the unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'CountPerSecond', 'BytesPerSecond', 'Percent', 'MilliSeconds', 'ByteSeconds', 'Unspecified', 'Cores', 'MilliCores', 'NanoCores', 'BitsPerSecond'
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="unit")]
public Nullable<Microsoft.Azure.Management.Monitor.Models.Unit> Unit { get; set; }
Property Value
|
Nullable<Unit>
|
Methods
Validate()
Validate the object.
Declaration
public virtual void Validate ();
Exceptions
|
ValidationException
Thrown if validation fails |