Share via


MetricAlertData Class

Definition

A class representing the MetricAlert data model. The metric alert resource.

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

Constructors

MetricAlertData(AzureLocation, Int32, Boolean, IEnumerable<String>, TimeSpan, TimeSpan, MetricAlertCriteria)

Initializes a new instance of MetricAlertData.

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.

Id

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.

(Inherited from ResourceData)
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.

Location

The geo-location where the resource lives.

(Inherited from TrackedResourceData)
Name

The name of the resource.

(Inherited from ResourceData)
ResourceType

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

(Inherited from ResourceData)
Scopes

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

Severity

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

SystemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

(Inherited from ResourceData)
Tags

Resource tags.

(Inherited from TrackedResourceData)
TargetResourceRegion

the region of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource.

TargetResourceType

the resource type of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource.

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<MetricAlertData>.Create(Utf8JsonReader, ModelReaderWriterOptions)

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

IJsonModel<MetricAlertData>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<MetricAlertData>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<MetricAlertData>.GetFormatFromOptions(ModelReaderWriterOptions)

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

IPersistableModel<MetricAlertData>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to