Share via


MetricTrigger Constructors

Definition

Overloads

MetricTrigger()

Initializes a new instance of the MetricTrigger class.

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

Initializes a new instance of the MetricTrigger class.

MetricTrigger()

Initializes a new instance of the MetricTrigger class.

public MetricTrigger ();
Public Sub New ()

Applies to

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

Initializes a new instance of the MetricTrigger class.

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)

Parameters

metricName
String

the name of the metric that defines what the rule monitors.

metricResourceUri
String

the resource identifier of the resource the rule monitors.

timeGrain
TimeSpan

the granularity of metrics the rule monitors. Must be one of the predefined values returned from metric definitions for the metric. Must be between 12 hours and 1 minute.

statistic
MetricStatisticType

the metric statistic type. How the metrics from multiple instances are combined. Possible values include: 'Average', 'Min', 'Max', 'Sum', 'Count'

timeWindow
TimeSpan

the range of time in which instance data is collected. This value must be greater than the delay in metric collection, which can vary from resource-to-resource. Must be between 12 hours and 5 minutes.

timeAggregation
TimeAggregationType

time aggregation type. How the data that is collected should be combined over time. The default value is Average. Possible values include: 'Average', 'Minimum', 'Maximum', 'Total', 'Count', 'Last'

operatorProperty
ComparisonOperationType

the operator that is used to compare the metric data and the threshold. Possible values include: 'Equals', 'NotEquals', 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual'

threshold
Double

the threshold of the metric that triggers the scale action.

metricNamespace
String

the namespace of the metric that defines what the rule monitors.

metricResourceLocation
String

the location of the resource the rule monitors.

dimensions
IList<ScaleRuleMetricDimension>

List of dimension conditions. For example: [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}].

dividePerInstance
Nullable<Boolean>

a value indicating whether metric should divide per instance.

Applies to