Share via


AlertRuleCondition Class

Definition

The condition that results in the alert rule being activated. Please note AlertRuleCondition is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. The available derived classes include LocationThresholdRuleCondition, ManagementEventRuleCondition and ThresholdRuleCondition.

[System.ClientModel.Primitives.PersistableModelProxy(typeof(Azure.ResourceManager.Monitor.Models.UnknownRuleCondition))]
public abstract class AlertRuleCondition : System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.Monitor.Models.AlertRuleCondition>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.Monitor.Models.AlertRuleCondition>
public abstract class AlertRuleCondition
[<System.ClientModel.Primitives.PersistableModelProxy(typeof(Azure.ResourceManager.Monitor.Models.UnknownRuleCondition))>]
type AlertRuleCondition = class
    interface IJsonModel<AlertRuleCondition>
    interface IPersistableModel<AlertRuleCondition>
type AlertRuleCondition = class
Public MustInherit Class AlertRuleCondition
Implements IJsonModel(Of AlertRuleCondition), IPersistableModel(Of AlertRuleCondition)
Public MustInherit Class AlertRuleCondition
Inheritance
AlertRuleCondition
Derived
Attributes
Implements

Constructors

AlertRuleCondition()

Initializes a new instance of AlertRuleCondition.

Properties

DataSource

the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. Please note RuleDataSource is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. The available derived classes include RuleManagementEventDataSource and RuleMetricDataSource.

Explicit Interface Implementations

IJsonModel<AlertRuleCondition>.Create(Utf8JsonReader, ModelReaderWriterOptions)

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

IJsonModel<AlertRuleCondition>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<AlertRuleCondition>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<AlertRuleCondition>.GetFormatFromOptions(ModelReaderWriterOptions)

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

IPersistableModel<AlertRuleCondition>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to