MetricAlertResource Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
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. |
MetricAlertResource()
Initializes a new instance of the MetricAlertResource class.
public MetricAlertResource ();
Public Sub New ()
Applies to
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.
public MetricAlertResource (string location, int severity, bool enabled, System.Collections.Generic.IList<string> scopes, TimeSpan evaluationFrequency, TimeSpan windowSize, Microsoft.Azure.Management.Monitor.Models.MetricAlertCriteria criteria, string id = default, string name = default, string type = default, System.Collections.Generic.IDictionary<string,string> tags = default, string kind = default, string etag = default, string description = default, string targetResourceType = default, string targetResourceRegion = default, bool? autoMitigate = default, System.Collections.Generic.IList<Microsoft.Azure.Management.Monitor.Models.MetricAlertAction> actions = default, DateTime? lastUpdatedTime = default, bool? isMigrated = default);
new Microsoft.Azure.Management.Monitor.Models.MetricAlertResource : string * int * bool * System.Collections.Generic.IList<string> * TimeSpan * TimeSpan * Microsoft.Azure.Management.Monitor.Models.MetricAlertCriteria * string * string * string * System.Collections.Generic.IDictionary<string, string> * string * string * string * string * string * Nullable<bool> * System.Collections.Generic.IList<Microsoft.Azure.Management.Monitor.Models.MetricAlertAction> * Nullable<DateTime> * Nullable<bool> -> Microsoft.Azure.Management.Monitor.Models.MetricAlertResource
Public Sub New (location As String, severity As Integer, enabled As Boolean, scopes As IList(Of String), evaluationFrequency As TimeSpan, windowSize As TimeSpan, criteria As MetricAlertCriteria, Optional id As String = Nothing, Optional name As String = Nothing, Optional type As String = Nothing, Optional tags As IDictionary(Of String, String) = Nothing, Optional kind As String = Nothing, Optional etag As String = Nothing, Optional description As String = Nothing, Optional targetResourceType As String = Nothing, Optional targetResourceRegion As String = Nothing, Optional autoMitigate As Nullable(Of Boolean) = Nothing, Optional actions As IList(Of MetricAlertAction) = Nothing, Optional lastUpdatedTime As Nullable(Of DateTime) = Nothing, Optional isMigrated As Nullable(Of Boolean) = Nothing)
Parameters
- location
- String
Resource location
- severity
- Int32
Alert severity {0, 1, 2, 3, 4}
- enabled
- Boolean
the flag that indicates whether the metric alert is enabled.
- evaluationFrequency
- TimeSpan
how often the metric alert is evaluated represented in ISO 8601 duration format.
- windowSize
- TimeSpan
the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.
- criteria
- MetricAlertCriteria
defines the specific alert criteria information.
- id
- String
Azure resource Id
- name
- String
Azure resource name
- type
- String
Azure resource type
- tags
- IDictionary<String,String>
Resource tags
- kind
- String
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.
- etag
- String
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.
- description
- String
the description of the metric alert that will be included in the alert email.
- targetResourceType
- String
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.
- targetResourceRegion
- String
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.
the flag that indicates whether the alert should be auto resolved or not. The default is true.
- actions
- IList<MetricAlertAction>
the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.