Sdílet prostřednictvím


MetricCriteria Class

Definition

Criterion to filter metrics.

public class MetricCriteria : Azure.ResourceManager.Monitor.Models.MultiMetricCriteria, System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.Monitor.Models.MetricCriteria>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.Monitor.Models.MetricCriteria>
type MetricCriteria = class
    inherit MultiMetricCriteria
    interface IJsonModel<MetricCriteria>
    interface IPersistableModel<MetricCriteria>
Public Class MetricCriteria
Inherits MultiMetricCriteria
Implements IJsonModel(Of MetricCriteria), IPersistableModel(Of MetricCriteria)
Inheritance
MetricCriteria
Implements

Constructors

MetricCriteria(String, String, MetricCriteriaTimeAggregationType, MetricCriteriaOperator, Double)

Initializes a new instance of MetricCriteria.

Properties

AdditionalProperties

Additional Properties

To assign an object to the value of this property use FromObjectAsJson<T>(T, JsonSerializerOptions).

To assign an already formatted json string to this property use FromString(String).

Examples:

  • BinaryData.FromObjectAsJson("foo"): Creates a payload of "foo".
  • BinaryData.FromString("\"foo\""): Creates a payload of "foo".
  • BinaryData.FromObjectAsJson(new { key = "value" }): Creates a payload of { "key": "value" }.
  • BinaryData.FromString("{\"key\": \"value\"}"): Creates a payload of { "key": "value" }.

(Inherited from MultiMetricCriteria)
Dimensions

List of dimension conditions.

(Inherited from MultiMetricCriteria)
MetricName

Name of the metric.

(Inherited from MultiMetricCriteria)
MetricNamespace

Namespace of the metric.

(Inherited from MultiMetricCriteria)
Name

Name of the criteria.

(Inherited from MultiMetricCriteria)
Operator

the criteria operator.

SkipMetricValidation

Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.

(Inherited from MultiMetricCriteria)
Threshold

the criteria threshold value that activates the alert.

TimeAggregation

the criteria time aggregation types.

(Inherited from MultiMetricCriteria)

Explicit Interface Implementations

IJsonModel<MetricCriteria>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<MetricCriteria>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IJsonModel<MultiMetricCriteria>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

(Inherited from MultiMetricCriteria)
IJsonModel<MultiMetricCriteria>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

(Inherited from MultiMetricCriteria)
IPersistableModel<MetricCriteria>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<MetricCriteria>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<MetricCriteria>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

IPersistableModel<MultiMetricCriteria>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

(Inherited from MultiMetricCriteria)
IPersistableModel<MultiMetricCriteria>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

(Inherited from MultiMetricCriteria)
IPersistableModel<MultiMetricCriteria>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

(Inherited from MultiMetricCriteria)

Applies to