-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
MetricAlertPatch.cs
58 lines (53 loc) · 3.42 KB
/
MetricAlertPatch.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
using Azure.Core;
namespace Azure.ResourceManager.Monitor.Models
{
/// <summary> The metric alert resource for patch operations. </summary>
public partial class MetricAlertPatch
{
/// <summary> Initializes a new instance of MetricAlertPatch. </summary>
public MetricAlertPatch()
{
Tags = new ChangeTrackingDictionary<string, string>();
Scopes = new ChangeTrackingList<string>();
Actions = new ChangeTrackingList<MetricAlertAction>();
}
/// <summary> Resource tags. </summary>
public IDictionary<string, string> Tags { get; }
/// <summary> the description of the metric alert that will be included in the alert email. </summary>
public string Description { get; set; }
/// <summary> Alert severity {0, 1, 2, 3, 4}. </summary>
public int? Severity { get; set; }
/// <summary> the flag that indicates whether the metric alert is enabled. </summary>
public bool? IsEnabled { get; set; }
/// <summary> the list of resource id's that this metric alert is scoped to. </summary>
public IList<string> Scopes { get; }
/// <summary> how often the metric alert is evaluated represented in ISO 8601 duration format. </summary>
public TimeSpan? EvaluationFrequency { get; set; }
/// <summary> the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. </summary>
public TimeSpan? WindowSize { get; set; }
/// <summary> the resource type of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria. </summary>
public ResourceType? TargetResourceType { get; set; }
/// <summary> the region of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria. </summary>
public AzureLocation? TargetResourceRegion { get; set; }
/// <summary>
/// defines the specific alert criteria information.
/// Please note <see cref="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 <see cref="MetricAlertMultipleResourceMultipleMetricCriteria"/>, <see cref="MetricAlertSingleResourceMultipleMetricCriteria"/> and <see cref="WebtestLocationAvailabilityCriteria"/>.
/// </summary>
public MetricAlertCriteria Criteria { get; set; }
/// <summary> the flag that indicates whether the alert should be auto resolved or not. The default is true. </summary>
public bool? IsAutoMitigateEnabled { get; set; }
/// <summary> the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. </summary>
public IList<MetricAlertAction> Actions { get; }
/// <summary> Last time the rule was updated in ISO8601 format. </summary>
public DateTimeOffset? LastUpdatedOn { get; }
/// <summary> the value indicating whether this alert rule is migrated. </summary>
public bool? IsMigrated { get; }
}
}