你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

MetricAlertResource 构造函数

定义

重载

MetricAlertResource()

初始化 MetricAlertResource 类的新实例。

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

初始化 MetricAlertResource 类的新实例。

MetricAlertResource()

初始化 MetricAlertResource 类的新实例。

public MetricAlertResource ();
Public Sub New ()

适用于

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

初始化 MetricAlertResource 类的新实例。

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)

参数

location
String

资源位置

severity
Int32

警报严重性 {0, 1, 2, 3, 4}

enabled
Boolean

指示是否启用指标警报的标志。

scopes
IList<String>

此指标警报的作用域为的资源 ID 的列表。

evaluationFrequency
TimeSpan

以 ISO 8601 持续时间格式表示的指标警报评估频率。

windowSize
TimeSpan

iso 8601 持续时间格式 (的时间段) ,用于根据阈值监视警报活动。

criteria
MetricAlertCriteria

定义特定的警报条件信息。

id
String

Azure 资源 ID

name
String

Azure 资源名称

type
String

Azure 资源类型

tags
IDictionary<String,String>

资源标记

kind
String

门户/工具等用于呈现相同类型资源的不同 UX 体验的元数据;例如,ApiApps 是一种 Microsoft.Web/sites 类型。 如果受支持,资源提供程序必须验证并保留此值。

etag
String

etag 字段 是必需的。 如果响应正文中提供了它,则还必须根据常规 etag 约定将其作为标头提供。 实体标记用于比较同一请求资源中的两个或多个实体。 HTTP/1.1 使用 etag (第 14.19 节) 、If-Match (第 14.24 节) 、If-None-Match (第 14.26 节) 中的实体标记,以及第 14.27 节If-Range () 标头字段。

description
String

警报电子邮件中将包含的指标警报的说明。

targetResourceType
String

创建/更新警报的目标资源 () 的资源类型。 如果范围包含订阅、资源组或多个资源,则为必需。

targetResourceRegion
String

目标资源的区域 (创建/更新警报的) 。 如果范围包含订阅、资源组或多个资源,则为必需。

autoMitigate
Nullable<Boolean>

指示是否应自动解决警报的标志。 默认值为 true。

actions
IList<MetricAlertAction>

警报规则变为活动状态时以及解决警报条件时执行的操作数组。

lastUpdatedTime
Nullable<DateTime>

上次以 ISO8601 格式更新规则的时间。

isMigrated
Nullable<Boolean>

指示是否迁移此警报规则的值。

适用于