예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MetricAnomalyAlertConfiguration"/> class.
        /// </summary>
        /// <param name="detectionConfigurationId">The identifier of the anomaly detection configuration to which this configuration applies.</param>
        /// <param name="alertScope">Selects which set of time series should trigger alerts.</param>
        /// <exception cref="ArgumentNullException"><paramref name="detectionConfigurationId"/> or <paramref name="alertScope"/> is null.</exception>
        /// <exception cref="ArgumentException"><paramref name="detectionConfigurationId"/> is empty.</exception>
        public MetricAnomalyAlertConfiguration(string detectionConfigurationId, MetricAnomalyAlertScope alertScope)
        {
            Argument.AssertNotNullOrEmpty(detectionConfigurationId, nameof(detectionConfigurationId));
            Argument.AssertNotNull(alertScope, nameof(alertScope));

            DetectionConfigurationId = detectionConfigurationId;
            AlertScope = alertScope;
        }
예제 #2
0
 internal MetricAnomalyAlertConfiguration(string detectionConfigurationId, MetricAnomalyAlertScopeType anomalyScopeType, bool? useDetectionResultToFilterAnomalies, DimensionKey dimensionAnomalyScope, TopNGroupScope topNAnomalyScope, SeverityCondition severityFilter, MetricAnomalyAlertSnoozeCondition alertSnoozeCondition, MetricBoundaryCondition valueFilter)
 {
     DetectionConfigurationId = detectionConfigurationId;
     AlertScope = new MetricAnomalyAlertScope(anomalyScopeType, dimensionAnomalyScope, topNAnomalyScope);
     UseDetectionResultToFilterAnomalies = useDetectionResultToFilterAnomalies;
     AlertConditions = new MetricAnomalyAlertConditions()
     {
         MetricBoundaryCondition = valueFilter,
         SeverityCondition = severityFilter
     };
     AlertSnoozeCondition = alertSnoozeCondition;
 }