Delen via


MetricAlertResource Class

Definition

The metric alert resource.

[Microsoft.Rest.Serialization.JsonTransformation]
public class MetricAlertResource : Microsoft.Azure.Management.Monitor.Models.Resource
[<Microsoft.Rest.Serialization.JsonTransformation>]
type MetricAlertResource = class
    inherit Resource
Public Class MetricAlertResource
Inherits Resource
Inheritance
MetricAlertResource
Attributes

Constructors

MetricAlertResource()

Initializes a new instance of the MetricAlertResource class.

MetricAlertResource(String, Int32, Boolean, IList<String>, TimeSpan, TimeSpan, MetricAlertCriteria, String, String, String, IDictionary<String, String>, String, String, String, String, String, Nullable<Boolean>, IList<MetricAlertAction>, Nullable<DateTime>, Nullable<Boolean>)

Initializes a new instance of the MetricAlertResource class.

Properties

Actions

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

AutoMitigate

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

Criteria

Gets or sets defines the specific alert criteria information.

Description

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

Enabled

Gets or sets the flag that indicates whether the metric alert is enabled.

Etag

Gets the etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.

(Inherited from Resource)
EvaluationFrequency

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

Id

Gets azure resource Id

(Inherited from Resource)
IsMigrated

Gets the value indicating whether this alert rule is migrated.

Kind

Gets metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.

(Inherited from Resource)
LastUpdatedTime

Gets last time the rule was updated in ISO8601 format.

Location

Gets or sets resource location

(Inherited from Resource)
Name

Gets azure resource name

(Inherited from Resource)
Scopes

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

Severity

Gets or sets alert severity {0, 1, 2, 3, 4}

Tags

Gets or sets resource tags

(Inherited from Resource)
TargetResourceRegion

Gets or sets 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

Gets or sets 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.

Type

Gets azure resource type

(Inherited from Resource)
WindowSize

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

Methods

Validate()

Validate the object.

Applies to