/// <summary>
 /// Initializes a new instance of the LocationThresholdRuleCondition
 /// class.
 /// </summary>
 /// <param name="failedLocationCount">the number of locations that must
 /// fail to activate the alert.</param>
 /// <param name="dataSource">the resource from which the rule collects
 /// its data. For this type dataSource will always be of type
 /// RuleMetricDataSource.</param>
 /// <param name="windowSize">the period of time (in ISO 8601 duration
 /// format) that is used to monitor alert activity based on the
 /// threshold. If specified then it must be between 5 minutes and 1
 /// day.</param>
 public LocationThresholdRuleCondition(int failedLocationCount, RuleDataSource dataSource = default(RuleDataSource), System.TimeSpan?windowSize = default(System.TimeSpan?))
     : base(dataSource)
 {
     WindowSize          = windowSize;
     FailedLocationCount = failedLocationCount;
     CustomInit();
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the RuleCondition class.
 /// </summary>
 /// <param name="dataSource">the resource from which the rule collects
 /// its data. For this type dataSource will always be of type
 /// RuleMetricDataSource.</param>
 public RuleCondition(RuleDataSource dataSource = default(RuleDataSource))
 {
     DataSource = dataSource;
     CustomInit();
 }
Exemple #3
0
 /// <summary>
 /// Initializes a new instance of the ThresholdRuleCondition class.
 /// </summary>
 /// <param name="operatorProperty">the operator used to compare the
 /// data and the threshold. Possible values include: 'GreaterThan',
 /// 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual'</param>
 /// <param name="threshold">the threshold value that activates the
 /// alert.</param>
 /// <param name="dataSource">the resource from which the rule collects
 /// its data. For this type dataSource will always be of type
 /// RuleMetricDataSource.</param>
 /// <param name="windowSize">the period of time (in ISO 8601 duration
 /// format) that is used to monitor alert activity based on the
 /// threshold. If specified then it must be between 5 minutes and 1
 /// day.</param>
 /// <param name="timeAggregation">the time aggregation operator. How
 /// the data that are collected should be combined over time. The
 /// default value is the PrimaryAggregationType of the Metric. Possible
 /// values include: 'Average', 'Minimum', 'Maximum', 'Total',
 /// 'Last'</param>
 public ThresholdRuleCondition(ConditionOperator operatorProperty, double threshold, RuleDataSource dataSource = default(RuleDataSource), System.TimeSpan?windowSize = default(System.TimeSpan?), TimeAggregationOperator?timeAggregation = default(TimeAggregationOperator?))
     : base(dataSource)
 {
     OperatorProperty = operatorProperty;
     Threshold        = threshold;
     WindowSize       = windowSize;
     TimeAggregation  = timeAggregation;
     CustomInit();
 }
 /// <summary>
 /// Initializes a new instance of the ManagementEventRuleCondition
 /// class.
 /// </summary>
 /// <param name="dataSource">the resource from which the rule collects
 /// its data. For this type dataSource will always be of type
 /// RuleMetricDataSource.</param>
 /// <param name="aggregation">How the data that is collected should be
 /// combined over time and when the alert is activated. Note that for
 /// management event alerts aggregation is optional – if it is not
 /// provided then any event will cause the alert to activate.</param>
 public ManagementEventRuleCondition(RuleDataSource dataSource = default(RuleDataSource), ManagementEventAggregationCondition aggregation = default(ManagementEventAggregationCondition))
     : base(dataSource)
 {
     Aggregation = aggregation;
     CustomInit();
 }