Class MetricAlertResourcePatch
The metric alert resource for patch operations.
Namespace: System.Dynamic.ExpandoObject
Assembly: Microsoft.Azure.Management.Monitor.dll
Syntax
[Microsoft.Rest.Serialization.JsonTransformation]
public class MetricAlertResourcePatch
Constructors
MetricAlertResourcePatch()
Initializes a new instance of the MetricAlertResourcePatch class.
Declaration
public MetricAlertResourcePatch ();
MetricAlertResourcePatch(String, Int32, Boolean, TimeSpan, TimeSpan, MetricAlertCriteria, IDictionary<String,String>, IList<String>, String, String, Nullable<Boolean>, IList<MetricAlertAction>, Nullable<DateTime>)
Initializes a new instance of the MetricAlertResourcePatch class.
Declaration
public MetricAlertResourcePatch (string description, int severity, bool enabled, TimeSpan evaluationFrequency, TimeSpan windowSize, Microsoft.Azure.Management.Monitor.Models.MetricAlertCriteria criteria, System.Collections.Generic.IDictionary<string,string> tags = null, System.Collections.Generic.IList<string> scopes = null, string targetResourceType = null, string targetResourceRegion = null, Nullable<bool> autoMitigate = null, System.Collections.Generic.IList<Microsoft.Azure.Management.Monitor.Models.MetricAlertAction> actions = null, Nullable<DateTime> lastUpdatedTime = null);
Parameters
|
String
description
the description of the metric alert that will be included in the alert email. |
|
Int32
severity
Alert severity {0, 1, 2, 3, 4} |
|
Boolean
enabled
the flag that indicates whether the metric alert is enabled. |
|
TimeSpan
evaluationFrequency
how often the metric alert is evaluated represented in ISO 8601 duration format. |
|
TimeSpan
windowSize
the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. |
|
MetricAlertCriteria
criteria
defines the specific alert criteria information. |
|
IDictionary<String,String>
tags
Resource tags |
|
IList<String>
scopes
the list of resource id's that this metric alert is scoped to. |
|
String
targetResourceType
the resource type of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria. |
|
String
targetResourceRegion
the region of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria. |
|
Nullable<Boolean>
autoMitigate
the flag that indicates whether the alert should be auto resolved or not. |
|
IList<MetricAlertAction>
actions
the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. |
|
Nullable<DateTime>
lastUpdatedTime
Last time the rule was updated in ISO8601 format. |
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.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.actions")]
public System.Collections.Generic.IList<Microsoft.Azure.Management.Monitor.Models.MetricAlertAction> Actions { get; set; }
Property Value
|
IList<MetricAlertAction>
|
AutoMitigate
Gets or sets the flag that indicates whether the alert should be auto resolved or not.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.autoMitigate")]
public Nullable<bool> AutoMitigate { get; set; }
Property Value
|
Nullable<Boolean>
|
Criteria
Gets or sets defines the specific alert criteria information.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.criteria")]
public Microsoft.Azure.Management.Monitor.Models.MetricAlertCriteria Criteria { get; set; }
Property Value
|
MetricAlertCriteria
|
Description
Gets or sets the description of the metric alert that will be included in the alert email.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.description")]
public string Description { get; set; }
Property Value
|
String
|
Enabled
Gets or sets the flag that indicates whether the metric alert is enabled.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.enabled")]
public bool Enabled { get; set; }
Property Value
|
Boolean
|
EvaluationFrequency
Gets or sets how often the metric alert is evaluated represented in ISO 8601 duration format.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.evaluationFrequency")]
public TimeSpan EvaluationFrequency { get; set; }
Property Value
|
TimeSpan
|
LastUpdatedTime
Gets last time the rule was updated in ISO8601 format.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.lastUpdatedTime")]
public Nullable<DateTime> LastUpdatedTime { get; }
Property Value
|
Nullable<DateTime>
|
Scopes
Gets or sets the list of resource id's that this metric alert is scoped to.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.scopes")]
public System.Collections.Generic.IList<string> Scopes { get; set; }
Property Value
|
IList<String>
|
Severity
Gets or sets alert severity {0, 1, 2, 3, 4}
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.severity")]
public int Severity { get; set; }
Property Value
|
Int32
|
Tags
Gets or sets resource tags
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="tags")]
public System.Collections.Generic.IDictionary<string,string> Tags { get; set; }
Property Value
|
IDictionary<String,String>
|
TargetResourceRegion
Gets or sets the region of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.targetResourceRegion")]
public string TargetResourceRegion { get; set; }
Property Value
|
String
|
TargetResourceType
Gets or sets the resource type of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.targetResourceType")]
public string TargetResourceType { get; set; }
Property Value
|
String
|
WindowSize
Gets or sets the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.windowSize")]
public TimeSpan WindowSize { get; set; }
Property Value
|
TimeSpan
|
Methods
Validate()
Validate the object.
Declaration
public virtual void Validate ();
Exceptions
|
ValidationException
Thrown if validation fails |