Share via


MetricAlertPatch Class

Definition

The metric alert resource for patch operations.

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

Constructors

MetricAlertPatch()

Initializes a new instance of MetricAlertPatch.

Properties

Actions

the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.

Criteria

defines the specific alert criteria information. Please note MetricAlertCriteria 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 MetricAlertMultipleResourceMultipleMetricCriteria, MetricAlertSingleResourceMultipleMetricCriteria and WebtestLocationAvailabilityCriteria.

Description

the description of the metric alert that will be included in the alert email.

EvaluationFrequency

how often the metric alert is evaluated represented in ISO 8601 duration format.

IsAutoMitigateEnabled

the flag that indicates whether the alert should be auto resolved or not. The default is true.

IsEnabled

the flag that indicates whether the metric alert is enabled.

IsMigrated

the value indicating whether this alert rule is migrated.

LastUpdatedOn

Last time the rule was updated in ISO8601 format.

Scopes

the list of resource id's that this metric alert is scoped to.

Severity

Alert severity {0, 1, 2, 3, 4}.

Tags

Resource tags.

TargetResourceRegion

the region of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria.

TargetResourceType

the resource type of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria.

WindowSize

the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.

Explicit Interface Implementations

IJsonModel<MetricAlertPatch>.Create(Utf8JsonReader, ModelReaderWriterOptions)

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

IJsonModel<MetricAlertPatch>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<MetricAlertPatch>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<MetricAlertPatch>.GetFormatFromOptions(ModelReaderWriterOptions)

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

IPersistableModel<MetricAlertPatch>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to