Språk

MetricAlertData Class

Definition

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>
type MetricAlertData = class
    inherit TrackedResourceData
    interface IJsonModel<MetricAlertData>
    interface IPersistableModel<MetricAlertData>
Public Class MetricAlertData
Inherits TrackedResourceData
Implements IJsonModel(Of MetricAlertData), IPersistableModel(Of MetricAlertData)
Inheritance
Implements

Constructors

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

Initializes a new instance of MetricAlertData.

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

Initializes a new instance of MetricAlertData.

Properties

Name Description
ActionProperties

The properties of an action 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.

CustomProperties

The properties of an alert payload.

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)
Identity

The identity of the resource.

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)
ResolveConfiguration

The configuration for how the alert is resolved. Applicable for PromQLCriteria.

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. You cannot change the scope of a metric rule based on logs.

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.

Methods

Name Description
JsonModelCreateCore(Utf8JsonReader, ModelReaderWriterOptions)
JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)
JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions) (Inherited from TrackedResourceData)
PersistableModelCreateCore(BinaryData, ModelReaderWriterOptions)
PersistableModelWriteCore(ModelReaderWriterOptions)

Explicit Interface Implementations

Name Description
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