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

MetricTrigger 构造函数

定义

重载

MetricTrigger()

初始化 MetricTrigger 类的新实例。

MetricTrigger(String, String, TimeSpan, MetricStatisticType, TimeSpan, TimeAggregationType, ComparisonOperationType, Double, String, String, IList<ScaleRuleMetricDimension>, Nullable<Boolean>)

初始化 MetricTrigger 类的新实例。

MetricTrigger()

初始化 MetricTrigger 类的新实例。

public MetricTrigger ();
Public Sub New ()

适用于

MetricTrigger(String, String, TimeSpan, MetricStatisticType, TimeSpan, TimeAggregationType, ComparisonOperationType, Double, String, String, IList<ScaleRuleMetricDimension>, Nullable<Boolean>)

初始化 MetricTrigger 类的新实例。

public MetricTrigger (string metricName, string metricResourceUri, TimeSpan timeGrain, Microsoft.Azure.Management.Monitor.Models.MetricStatisticType statistic, TimeSpan timeWindow, Microsoft.Azure.Management.Monitor.Models.TimeAggregationType timeAggregation, Microsoft.Azure.Management.Monitor.Models.ComparisonOperationType operatorProperty, double threshold, string metricNamespace = default, string metricResourceLocation = default, System.Collections.Generic.IList<Microsoft.Azure.Management.Monitor.Models.ScaleRuleMetricDimension> dimensions = default, bool? dividePerInstance = default);
new Microsoft.Azure.Management.Monitor.Models.MetricTrigger : string * string * TimeSpan * Microsoft.Azure.Management.Monitor.Models.MetricStatisticType * TimeSpan * Microsoft.Azure.Management.Monitor.Models.TimeAggregationType * Microsoft.Azure.Management.Monitor.Models.ComparisonOperationType * double * string * string * System.Collections.Generic.IList<Microsoft.Azure.Management.Monitor.Models.ScaleRuleMetricDimension> * Nullable<bool> -> Microsoft.Azure.Management.Monitor.Models.MetricTrigger
Public Sub New (metricName As String, metricResourceUri As String, timeGrain As TimeSpan, statistic As MetricStatisticType, timeWindow As TimeSpan, timeAggregation As TimeAggregationType, operatorProperty As ComparisonOperationType, threshold As Double, Optional metricNamespace As String = Nothing, Optional metricResourceLocation As String = Nothing, Optional dimensions As IList(Of ScaleRuleMetricDimension) = Nothing, Optional dividePerInstance As Nullable(Of Boolean) = Nothing)

参数

metricName
String

定义规则监视的指标的名称。

metricResourceUri
String

规则监视的资源的资源标识符。

timeGrain
TimeSpan

规则监视的指标的粒度。 必须是从指标的指标定义返回的预定义值之一。 必须介于 12 小时和 1 分钟之间。

statistic
MetricStatisticType

指标统计信息类型。 来自多个实例的指标进行组合的方式。 可能的值包括:“Average”、“Min”、“Max”、“Sum”、“Count”

timeWindow
TimeSpan

收集实例数据的时间范围。 此值必须大于指标集合中的延迟,可能会因资源而异。 必须介于 12 小时和 5 分钟之间。

timeAggregation
TimeAggregationType

时间聚合类型。 随着时间推移,收集的数据应如何组合。 默认值为 Average。 可能的值包括:“Average”、“Minimum”、“Maximum”、“Total”、“Count”、“Last”

operatorProperty
ComparisonOperationType

用于比较指标数据和阈值的运算符。 可能的值包括:“Equals”、“NotEquals”、“GreaterThan”、“GreaterThanOrEqual”、“LessThan”、“LessThanOrEqual”

threshold
Double

触发缩放操作的指标的阈值。

metricNamespace
String

定义规则监视的指标的命名空间。

metricResourceLocation
String

规则监视的资源的位置。

dimensions
IList<ScaleRuleMetricDimension>

维度条件列表。 例如:[{“DimensionName”:“AppName”,“Operator”:“Equals”,“Values”[“App1”]},{“DimensionName”:“Deployment”,“Operator”:“Equals”,“Values”:[“default”]}]。

dividePerInstance
Nullable<Boolean>

一个 值,该值指示指标是否应按实例划分。

适用于