diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md index c7ef30ab6ad7..1ee4a6b5cbe6 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md @@ -17,6 +17,7 @@ - Renamed class `ServicePrincipalDatasourceCredential` to `DataSourceServicePrincipal`. - Renamed class `ServicePrincipalInKeyVaultDatasourceCredential` to `DataSourceServicePrincipalInKeyVault`. - Renamed class `SqlConnectionStringDatasourceCredential` to `DataSourceSqlConnectionString`. +- Renamed class `MetricAnomalyAlertConfiguration` to `MetricAlertConfiguration`. - Split the method `GetAnomalies` into two different methods: `GetAnomaliesForAlert` and `GetAnomaliesForDetectionConfiguration`. - Split the method `GetIncidents` into two different methods: `GetIncidentsForAlert` and `GetIncidentsForDetectionConfiguration`. - `DataFeedIngestionSettings` constructor now takes the required `ingestionStartTime` parameter. For this reason, the property `IngestionStartTime` is not nullable anymore. diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/README.md b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/README.md index 249199930274..cd2e4e7b5a62 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/README.md +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/README.md @@ -345,7 +345,7 @@ AnomalyAlertConfiguration alertConfiguration = new AnomalyAlertConfiguration() alertConfiguration.IdsOfHooksToAlert.Add(hookId); var scope = MetricAnomalyAlertScope.GetScopeForWholeSeries(); -var metricAlertConfiguration = new MetricAnomalyAlertConfiguration(anomalyDetectionConfigurationId, scope); +var metricAlertConfiguration = new MetricAlertConfiguration(anomalyDetectionConfigurationId, scope); alertConfiguration.MetricAlertConfigurations.Add(metricAlertConfiguration); diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/api/Azure.AI.MetricsAdvisor.netstandard2.0.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/api/Azure.AI.MetricsAdvisor.netstandard2.0.cs index 47f2b0a1a697..9cc2e85acef2 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/api/Azure.AI.MetricsAdvisor.netstandard2.0.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/api/Azure.AI.MetricsAdvisor.netstandard2.0.cs @@ -552,7 +552,7 @@ public AnomalyAlertConfiguration() { } public string Description { get { throw null; } set { } } public string Id { get { throw null; } } public System.Collections.Generic.IList IdsOfHooksToAlert { get { throw null; } } - public System.Collections.Generic.IList MetricAlertConfigurations { get { throw null; } } + public System.Collections.Generic.IList MetricAlertConfigurations { get { throw null; } } public string Name { get { throw null; } set { } } } public partial class AnomalyDetectionConfiguration @@ -1068,21 +1068,21 @@ internal IncidentRootCause() { } public static bool operator !=(Azure.AI.MetricsAdvisor.Models.IngestionStatusType left, Azure.AI.MetricsAdvisor.Models.IngestionStatusType right) { throw null; } public override string ToString() { throw null; } } - public partial class MetricAnomalyAlertConditions - { - public MetricAnomalyAlertConditions() { } - public Azure.AI.MetricsAdvisor.Models.MetricBoundaryCondition MetricBoundaryCondition { get { throw null; } set { } } - public Azure.AI.MetricsAdvisor.Models.SeverityCondition SeverityCondition { get { throw null; } set { } } - } - public partial class MetricAnomalyAlertConfiguration + public partial class MetricAlertConfiguration { - public MetricAnomalyAlertConfiguration(string detectionConfigurationId, Azure.AI.MetricsAdvisor.Models.MetricAnomalyAlertScope alertScope) { } + public MetricAlertConfiguration(string detectionConfigurationId, Azure.AI.MetricsAdvisor.Models.MetricAnomalyAlertScope alertScope) { } public Azure.AI.MetricsAdvisor.Models.MetricAnomalyAlertConditions AlertConditions { get { throw null; } set { } } public Azure.AI.MetricsAdvisor.Models.MetricAnomalyAlertScope AlertScope { get { throw null; } set { } } public Azure.AI.MetricsAdvisor.Models.MetricAnomalyAlertSnoozeCondition AlertSnoozeCondition { get { throw null; } set { } } public string DetectionConfigurationId { get { throw null; } set { } } public bool? UseDetectionResultToFilterAnomalies { get { throw null; } set { } } } + public partial class MetricAnomalyAlertConditions + { + public MetricAnomalyAlertConditions() { } + public Azure.AI.MetricsAdvisor.Models.MetricBoundaryCondition MetricBoundaryCondition { get { throw null; } set { } } + public Azure.AI.MetricsAdvisor.Models.SeverityCondition SeverityCondition { get { throw null; } set { } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct MetricAnomalyAlertConfigurationsOperator : System.IEquatable { diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/MicrosoftAzureMetricsAdvisorRestAPIOpenAPIV2ModelFactory.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/MicrosoftAzureMetricsAdvisorRestAPIOpenAPIV2ModelFactory.cs index a375a3a6e252..4218899efd81 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/MicrosoftAzureMetricsAdvisorRestAPIOpenAPIV2ModelFactory.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/MicrosoftAzureMetricsAdvisorRestAPIOpenAPIV2ModelFactory.cs @@ -29,11 +29,11 @@ internal static partial class MicrosoftAzureMetricsAdvisorRestAPIOpenAPIV2ModelF /// hook unique ids. /// Anomaly alerting configurations. /// A new instance for mocking. - public static AnomalyAlertConfiguration AnomalyAlertConfiguration(string id = default, string name = default, string description = default, MetricAnomalyAlertConfigurationsOperator? crossMetricsOperator = default, IList splitAlertByDimensions = default, IList idsOfHooksToAlert = default, IList metricAlertConfigurations = default) + public static AnomalyAlertConfiguration AnomalyAlertConfiguration(string id = default, string name = default, string description = default, MetricAnomalyAlertConfigurationsOperator? crossMetricsOperator = default, IList splitAlertByDimensions = default, IList idsOfHooksToAlert = default, IList metricAlertConfigurations = default) { splitAlertByDimensions ??= new List(); idsOfHooksToAlert ??= new List(); - metricAlertConfigurations ??= new List(); + metricAlertConfigurations ??= new List(); return new AnomalyAlertConfiguration(id, name, description, crossMetricsOperator, splitAlertByDimensions, idsOfHooksToAlert, metricAlertConfigurations); } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyAlertConfiguration.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyAlertConfiguration.Serialization.cs index 9e821c560ea7..ae6bcace53da 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyAlertConfiguration.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyAlertConfiguration.Serialization.cs @@ -63,7 +63,7 @@ internal static AnomalyAlertConfiguration DeserializeAnomalyAlertConfiguration(J Optional crossMetricsOperator = default; Optional> splitAlertByDimensions = default; IList hookIds = default; - IList metricAlertingConfigurations = default; + IList metricAlertingConfigurations = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("anomalyAlertingConfigurationId")) @@ -118,10 +118,10 @@ internal static AnomalyAlertConfiguration DeserializeAnomalyAlertConfiguration(J } if (property.NameEquals("metricAlertingConfigurations")) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MetricAnomalyAlertConfiguration.DeserializeMetricAnomalyAlertConfiguration(item)); + array.Add(MetricAlertConfiguration.DeserializeMetricAlertConfiguration(item)); } metricAlertingConfigurations = array; continue; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyAlertConfiguration.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyAlertConfiguration.cs index d092c80a0b1b..6c1d781d3cc4 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyAlertConfiguration.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyAlertConfiguration.cs @@ -30,7 +30,7 @@ public partial class AnomalyAlertConfiguration /// dimensions used to split alert. /// hook unique ids. /// Anomaly alerting configurations. - internal AnomalyAlertConfiguration(string id, string name, string description, MetricAnomalyAlertConfigurationsOperator? crossMetricsOperator, IList splitAlertByDimensions, IList idsOfHooksToAlert, IList metricAlertConfigurations) + internal AnomalyAlertConfiguration(string id, string name, string description, MetricAnomalyAlertConfigurationsOperator? crossMetricsOperator, IList splitAlertByDimensions, IList idsOfHooksToAlert, IList metricAlertConfigurations) { Id = id; Name = name; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyAlertingConfigurationPatch.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyAlertingConfigurationPatch.cs index 70f78cf73f9a..9b1b414e9cbe 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyAlertingConfigurationPatch.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/AnomalyAlertingConfigurationPatch.cs @@ -19,7 +19,7 @@ public AnomalyAlertingConfigurationPatch() { SplitAlertByDimensions = new ChangeTrackingList(); HookIds = new ChangeTrackingList(); - MetricAlertingConfigurations = new ChangeTrackingList(); + MetricAlertingConfigurations = new ChangeTrackingList(); } /// Anomaly alerting configuration name. diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MetricAnomalyAlertConfiguration.Serialization.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MetricAlertConfiguration.Serialization.cs similarity index 92% rename from sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MetricAnomalyAlertConfiguration.Serialization.cs rename to sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MetricAlertConfiguration.Serialization.cs index f7b09958756b..b4152cf2dcc1 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MetricAnomalyAlertConfiguration.Serialization.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MetricAlertConfiguration.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.AI.MetricsAdvisor.Models { - public partial class MetricAnomalyAlertConfiguration : IUtf8JsonSerializable + public partial class MetricAlertConfiguration : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -52,7 +52,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static MetricAnomalyAlertConfiguration DeserializeMetricAnomalyAlertConfiguration(JsonElement element) + internal static MetricAlertConfiguration DeserializeMetricAlertConfiguration(JsonElement element) { string anomalyDetectionConfigurationId = default; MetricAnomalyAlertScopeType anomalyScopeType = default; @@ -135,7 +135,7 @@ internal static MetricAnomalyAlertConfiguration DeserializeMetricAnomalyAlertCon continue; } } - return new MetricAnomalyAlertConfiguration(anomalyDetectionConfigurationId, anomalyScopeType, Optional.ToNullable(negationOperation), dimensionAnomalyScope.Value, topNAnomalyScope.Value, severityFilter.Value, snoozeFilter.Value, valueFilter.Value); + return new MetricAlertConfiguration(anomalyDetectionConfigurationId, anomalyScopeType, Optional.ToNullable(negationOperation), dimensionAnomalyScope.Value, topNAnomalyScope.Value, severityFilter.Value, snoozeFilter.Value, valueFilter.Value); } } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MetricAnomalyAlertConfiguration.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MetricAlertConfiguration.cs similarity index 82% rename from sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MetricAnomalyAlertConfiguration.cs rename to sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MetricAlertConfiguration.cs index 6a58319198b2..efffed8b6a7e 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MetricAnomalyAlertConfiguration.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Models/MetricAlertConfiguration.cs @@ -10,7 +10,7 @@ namespace Azure.AI.MetricsAdvisor.Models { /// The MetricAlertingConfiguration. - public partial class MetricAnomalyAlertConfiguration + public partial class MetricAlertConfiguration { } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/GetAllFeedbackOptions.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/GetAllFeedbackOptions.cs index 2dadd44a30fc..02bef399e05a 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/GetAllFeedbackOptions.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/GetAllFeedbackOptions.cs @@ -20,7 +20,7 @@ public GetAllFeedbackOptions() } /// The dimension filter. - internal FeedbackDimensionFilter DimensionFilter => Filter.Dimension == null ? null : new FeedbackDimensionFilter(Filter.Dimension); + internal FeedbackDimensionFilter DimensionFilter => Filter?.Dimension == null ? null : new FeedbackDimensionFilter(Filter.Dimension); /// /// Filters the result by series. Only feedbacks for the series in the time series group specified will diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/MetricsAdvisorClient.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/MetricsAdvisorClient.cs index a5ad801b9994..07af48b1a520 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/MetricsAdvisorClient.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/MetricsAdvisorClient.cs @@ -807,7 +807,7 @@ public virtual Response GetFeedback(string feedbackId, Cancellat /// /// Gets a collection of items describing the anomalies detected by a given . /// - /// The unique identifier of the . + /// The unique identifier of the . /// The set of options used to configure the request's behavior. /// A controlling the request lifetime. /// An containing the collection of instances. @@ -866,7 +866,7 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHi /// /// Gets a collection of items describing the anomalies detected by a given . /// - /// The unique identifier of the . + /// The unique identifier of the . /// The set of options used to configure the request's behavior. /// A controlling the request lifetime. /// A containing the collection of instances. @@ -925,7 +925,7 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) /// /// Gets a collection of items describing the incidents detected by a given . /// - /// The unique identifier of the . + /// The unique identifier of the . /// The set of options used to configure the request's behavior. /// A controlling the request lifetime. /// An containing the collection of instances. @@ -985,7 +985,7 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHin /// /// Gets a collection of items describing the incidents detected by a given . /// - /// The unique identifier of the . + /// The unique identifier of the . /// The set of options used to configure the request's behavior. /// A controlling the request lifetime. /// A containing the collection of instances. @@ -1045,7 +1045,7 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) /// /// Gets the suggestions for likely root causes of an incident. /// - /// The unique identifier of the . + /// The unique identifier of the . /// The unique identifier of the . /// A controlling the request lifetime. /// An containing the collection of s. @@ -1081,7 +1081,7 @@ async Task> FirstPageFunc(int? pageSizeHint) /// /// Gets the suggestions for likely root causes of an incident. /// - /// The unique identifier of the . + /// The unique identifier of the . /// The unique identifier of the . /// A controlling the request lifetime. /// A containing the collection of s. @@ -1184,9 +1184,9 @@ Page FirstPageFunc(int? pageSizeHint) /// /// Gets all the values a specified dimension has assumed for anomalous data points detected by a - /// . + /// . /// - /// The unique identifier of the . + /// The unique identifier of the . /// The name of the dimension. /// The set of options used to configure the request's behavior. /// A controlling the request lifetime. @@ -1246,9 +1246,9 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint) /// /// Gets all the values a specified dimension has assumed for anomalous data points detected by a - /// . + /// . /// - /// The unique identifier of the . + /// The unique identifier of the . /// The name of the dimension. /// The set of options used to configure the request's behavior. /// A controlling the request lifetime. @@ -1309,7 +1309,7 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) /// /// Query series enriched by anomaly detection. /// - /// The unique identifier of the . + /// The unique identifier of the . /// The detection series keys. /// Filters the result. Only data points after this point in time, in UTC, will be returned. /// Filters the result. Only data points after this point in time, in UTC, will be returned. @@ -1349,7 +1349,7 @@ async Task> FirstPageFunc(int? pageSizeHint) /// /// Query series enriched by anomaly detection. /// - /// The unique identifier of the . + /// The unique identifier of the . /// The detection series keys. /// Filters the result. Only data points after this point in time, in UTC, will be returned. /// Filters the result. Only data points after this point in time, in UTC, will be returned. diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AlertTriggering/AnomalyAlertConfiguration.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AlertTriggering/AnomalyAlertConfiguration.cs index 2cfba51d9798..2905e0b5889d 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AlertTriggering/AnomalyAlertConfiguration.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AlertTriggering/AnomalyAlertConfiguration.cs @@ -13,7 +13,7 @@ namespace Azure.AI.MetricsAdvisor.Models /// Defines the set of rules that must be satisfied by an anomaly before it can trigger an alert. /// [CodeGenModel("AnomalyAlertingConfiguration")] - [CodeGenSuppress(nameof(AnomalyAlertConfiguration), typeof(string), typeof(IEnumerable), typeof(IEnumerable))] + [CodeGenSuppress(nameof(AnomalyAlertConfiguration), typeof(string), typeof(IEnumerable), typeof(IEnumerable))] public partial class AnomalyAlertConfiguration { /// @@ -22,7 +22,7 @@ public partial class AnomalyAlertConfiguration public AnomalyAlertConfiguration() { IdsOfHooksToAlert = new ChangeTrackingList(); - MetricAlertConfigurations = new ChangeTrackingList(); + MetricAlertConfigurations = new ChangeTrackingList(); SplitAlertByDimensions = new ChangeTrackingList(); } @@ -48,10 +48,10 @@ public AnomalyAlertConfiguration() /// The configurations that define which anomalies are eligible for triggering an alert. /// [CodeGenMember("MetricAlertingConfigurations")] - public IList MetricAlertConfigurations { get; } + public IList MetricAlertConfigurations { get; } /// - /// The operator to be applied between s in this + /// The operator to be applied between s in this /// instance. This property must be set if more than one /// configuration is defined in . /// diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AlertTriggering/MetricAnomalyAlertConfiguration.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AlertTriggering/MetricAlertConfiguration.cs similarity index 84% rename from sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AlertTriggering/MetricAnomalyAlertConfiguration.cs rename to sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AlertTriggering/MetricAlertConfiguration.cs index dd47f65429d3..3d339e404661 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AlertTriggering/MetricAnomalyAlertConfiguration.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AlertTriggering/MetricAlertConfiguration.cs @@ -11,17 +11,17 @@ namespace Azure.AI.MetricsAdvisor.Models /// triggering an alert. /// [CodeGenModel("MetricAlertingConfiguration")] - [CodeGenSuppress(nameof(MetricAnomalyAlertConfiguration), typeof(string), typeof(MetricAnomalyAlertScopeType))] - public partial class MetricAnomalyAlertConfiguration + [CodeGenSuppress(nameof(MetricAlertConfiguration), typeof(string), typeof(MetricAnomalyAlertScopeType))] + public partial class MetricAlertConfiguration { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The identifier of the anomaly detection configuration to which this configuration applies. /// Selects which set of time series should trigger alerts. /// or is null. /// is empty. - public MetricAnomalyAlertConfiguration(string detectionConfigurationId, MetricAnomalyAlertScope alertScope) + public MetricAlertConfiguration(string detectionConfigurationId, MetricAnomalyAlertScope alertScope) { Argument.AssertNotNullOrEmpty(detectionConfigurationId, nameof(detectionConfigurationId)); Argument.AssertNotNull(alertScope, nameof(alertScope)); @@ -30,7 +30,7 @@ public MetricAnomalyAlertConfiguration(string detectionConfigurationId, MetricAn AlertScope = alertScope; } - internal MetricAnomalyAlertConfiguration(string detectionConfigurationId, MetricAnomalyAlertScopeType anomalyScopeType, bool? useDetectionResultToFilterAnomalies, DimensionKey dimensionAnomalyScope, TopNGroupScope topNAnomalyScope, SeverityCondition severityFilter, MetricAnomalyAlertSnoozeCondition alertSnoozeCondition, MetricBoundaryCondition valueFilter) + internal MetricAlertConfiguration(string detectionConfigurationId, MetricAnomalyAlertScopeType anomalyScopeType, bool? useDetectionResultToFilterAnomalies, DimensionKey dimensionAnomalyScope, TopNGroupScope topNAnomalyScope, SeverityCondition severityFilter, MetricAnomalyAlertSnoozeCondition alertSnoozeCondition, MetricBoundaryCondition valueFilter) { DetectionConfigurationId = detectionConfigurationId; AlertScope = new MetricAnomalyAlertScope(anomalyScopeType, dimensionAnomalyScope, topNAnomalyScope); @@ -55,7 +55,7 @@ internal MetricAnomalyAlertConfiguration(string detectionConfigurationId, Metric public MetricAnomalyAlertScope AlertScope { get; set; } /// - /// If defined, this won't trigger alerts by itself. It + /// If defined, this won't trigger alerts by itself. It /// will only serve as a filter to its containing , specifying /// which anomalies can trigger an alert. If true, anomalies need to satisfy the conditions /// set by this filter to trigger an alert. If false, anomalies must not satisfy those diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AlertTriggering/MetricAnomalyAlertConfigurationsOperator.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AlertTriggering/MetricAnomalyAlertConfigurationsOperator.cs index f0765ba519f7..e9890e67011c 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AlertTriggering/MetricAnomalyAlertConfigurationsOperator.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AlertTriggering/MetricAnomalyAlertConfigurationsOperator.cs @@ -6,30 +6,30 @@ namespace Azure.AI.MetricsAdvisor.Models { /// - /// The operator to be applied between s in the same + /// The operator to be applied between s in the same /// instance. /// [CodeGenModel("AnomalyAlertingConfigurationLogicType")] public readonly partial struct MetricAnomalyAlertConfigurationsOperator { /// - /// The data point will trigger an alert if every defined + /// The data point will trigger an alert if every defined /// in is satisfied. Note: If two - /// s have different dimension names, an alert will never + /// s have different dimension names, an alert will never /// be triggered. /// [CodeGenMember("AND")] public static MetricAnomalyAlertConfigurationsOperator And { get; } = new MetricAnomalyAlertConfigurationsOperator(AndValue); /// - /// The data point will trigger an alert if at least one + /// The data point will trigger an alert if at least one /// defined in is satisfied. /// [CodeGenMember("OR")] public static MetricAnomalyAlertConfigurationsOperator Or { get; } = new MetricAnomalyAlertConfigurationsOperator(OrValue); /// - /// It can be used only when there are up to two s defined + /// It can be used only when there are up to two s defined /// in . The data point will trigger an alert if exactly one of the /// configurations is satisfied. /// diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AlertTriggering/MetricAnomalyAlertScope.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AlertTriggering/MetricAnomalyAlertScope.cs index 9f26666eaf95..9985936f395f 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AlertTriggering/MetricAnomalyAlertScope.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AlertTriggering/MetricAnomalyAlertScope.cs @@ -7,7 +7,7 @@ namespace Azure.AI.MetricsAdvisor.Models { /// - /// Selects which set of time series should trigger alerts in a . It + /// Selects which set of time series should trigger alerts in a . It /// must be instantiated by one of its static methods. /// public class MetricAnomalyAlertScope diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/CodeGenInternal/AnomalyAlertingConfigurationPatch.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/CodeGenInternal/AnomalyAlertingConfigurationPatch.cs index 3aa25cd3d570..99acda33c6d9 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/CodeGenInternal/AnomalyAlertingConfigurationPatch.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/CodeGenInternal/AnomalyAlertingConfigurationPatch.cs @@ -13,6 +13,6 @@ internal partial class AnomalyAlertingConfigurationPatch public IList HookIds { get; internal set; } /// Anomaly alerting configurations. - public IList MetricAlertingConfigurations { get; internal set; } + public IList MetricAlertingConfigurations { get; internal set; } } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClient/AnomalyAlertConfigurationLiveTests.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClient/AnomalyAlertConfigurationLiveTests.cs index 985bed667578..0a60e77765b4 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClient/AnomalyAlertConfigurationLiveTests.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClient/AnomalyAlertConfigurationLiveTests.cs @@ -30,7 +30,7 @@ public async Task CreateAndGetAlertConfigurationWithWholeSeriesScope(bool useTok var detectionConfigId = disposableDetectionConfig.Configuration.Id; var scope = MetricAnomalyAlertScope.GetScopeForWholeSeries(); - var metricAlertConfig = new MetricAnomalyAlertConfiguration(detectionConfigId, scope); + var metricAlertConfig = new MetricAlertConfiguration(detectionConfigId, scope); string configName = Recording.GenerateAlphaNumericId("config"); @@ -51,7 +51,7 @@ public async Task CreateAndGetAlertConfigurationWithWholeSeriesScope(bool useTok Assert.That(createdConfig.IdsOfHooksToAlert, Is.Not.Null.And.Empty); Assert.That(createdConfig.MetricAlertConfigurations, Is.Not.Null); - MetricAnomalyAlertConfiguration createdMetricAlertConfig = createdConfig.MetricAlertConfigurations.Single(); + MetricAlertConfiguration createdMetricAlertConfig = createdConfig.MetricAlertConfigurations.Single(); Assert.That(createdMetricAlertConfig.DetectionConfigurationId, Is.EqualTo(detectionConfigId)); @@ -81,7 +81,7 @@ public async Task CreateAndGetAlertConfigurationWithSeriesGroupScope() var detectionConfigId = disposableDetectionConfig.Configuration.Id; var scope = MetricAnomalyAlertScope.GetScopeForSeriesGroup(groupKey); - var metricAlertConfig = new MetricAnomalyAlertConfiguration(detectionConfigId, scope); + var metricAlertConfig = new MetricAlertConfiguration(detectionConfigId, scope); string configName = Recording.GenerateAlphaNumericId("config"); @@ -102,7 +102,7 @@ public async Task CreateAndGetAlertConfigurationWithSeriesGroupScope() Assert.That(createdConfig.IdsOfHooksToAlert, Is.Not.Null.And.Empty); Assert.That(createdConfig.MetricAlertConfigurations, Is.Not.Null); - MetricAnomalyAlertConfiguration createdMetricAlertConfig = createdConfig.MetricAlertConfigurations.Single(); + MetricAlertConfiguration createdMetricAlertConfig = createdConfig.MetricAlertConfigurations.Single(); Assert.That(createdMetricAlertConfig.DetectionConfigurationId, Is.EqualTo(detectionConfigId)); @@ -131,7 +131,7 @@ public async Task CreateAndGetAlertConfigurationWithTopNScope() var detectionConfigId = disposableDetectionConfig.Configuration.Id; var topNGroup = new TopNGroupScope(30, 20, 10); var scope = MetricAnomalyAlertScope.GetScopeForTopNGroup(topNGroup); - var metricAlertConfig = new MetricAnomalyAlertConfiguration(detectionConfigId, scope); + var metricAlertConfig = new MetricAlertConfiguration(detectionConfigId, scope); string configName = Recording.GenerateAlphaNumericId("config"); @@ -152,7 +152,7 @@ public async Task CreateAndGetAlertConfigurationWithTopNScope() Assert.That(createdConfig.IdsOfHooksToAlert, Is.Not.Null.And.Empty); Assert.That(createdConfig.MetricAlertConfigurations, Is.Not.Null); - MetricAnomalyAlertConfiguration createdMetricAlertConfig = createdConfig.MetricAlertConfigurations.Single(); + MetricAlertConfiguration createdMetricAlertConfig = createdConfig.MetricAlertConfigurations.Single(); Assert.That(createdMetricAlertConfig.DetectionConfigurationId, Is.EqualTo(detectionConfigId)); @@ -195,7 +195,7 @@ public async Task CreateAndGetAlertConfigurationWithOptionalSingleMetricConfigur var detectionConfigId = disposableDetectionConfig.Configuration.Id; var scope = MetricAnomalyAlertScope.GetScopeForWholeSeries(); - var metricAlertConfig = new MetricAnomalyAlertConfiguration(detectionConfigId, scope) + var metricAlertConfig = new MetricAlertConfiguration(detectionConfigId, scope) { AlertSnoozeCondition = new MetricAnomalyAlertSnoozeCondition(12, SnoozeScope.Series, true), AlertConditions = new MetricAnomalyAlertConditions() @@ -235,7 +235,7 @@ public async Task CreateAndGetAlertConfigurationWithOptionalSingleMetricConfigur Assert.That(createdConfig.IdsOfHooksToAlert.Contains(disposableHook1.Hook.Id)); Assert.That(createdConfig.MetricAlertConfigurations, Is.Not.Null); - MetricAnomalyAlertConfiguration createdMetricAlertConfig = createdConfig.MetricAlertConfigurations.Single(); + MetricAlertConfiguration createdMetricAlertConfig = createdConfig.MetricAlertConfigurations.Single(); Assert.That(createdMetricAlertConfig.DetectionConfigurationId, Is.EqualTo(detectionConfigId)); @@ -271,11 +271,11 @@ public async Task CreateAndGetAlertConfigurationWithMultipleMetricConfigurations string metricId = disposableDataFeed.DataFeed.MetricIds[TempDataFeedMetricName]; await using DisposableDetectionConfiguration disposableDetectionConfig = await CreateTempDetectionConfigurationAsync(adminClient, metricId); - // Configure the Metric Anomaly Alert Configurations to be used. + // Configure the Metric Alert Configurations to be used. var detectionConfigId = disposableDetectionConfig.Configuration.Id; var scope = MetricAnomalyAlertScope.GetScopeForWholeSeries(); - var metricAlertConfig0 = new MetricAnomalyAlertConfiguration(detectionConfigId, scope) + var metricAlertConfig0 = new MetricAlertConfiguration(detectionConfigId, scope) { AlertConditions = new MetricAnomalyAlertConditions() { @@ -283,7 +283,7 @@ public async Task CreateAndGetAlertConfigurationWithMultipleMetricConfigurations }, UseDetectionResultToFilterAnomalies = true }; - var metricAlertConfig1 = new MetricAnomalyAlertConfiguration(detectionConfigId, scope) + var metricAlertConfig1 = new MetricAlertConfiguration(detectionConfigId, scope) { AlertConditions = new MetricAnomalyAlertConditions() { @@ -316,9 +316,9 @@ public async Task CreateAndGetAlertConfigurationWithMultipleMetricConfigurations Assert.That(createdConfig.MetricAlertConfigurations, Is.Not.Null); Assert.That(createdConfig.MetricAlertConfigurations.Count, Is.EqualTo(2)); - // Validate the first Metric Anomaly Alert Configuration. + // Validate the first Metric Alert Configuration. - MetricAnomalyAlertConfiguration createdMetricAlertConfig0 = createdConfig.MetricAlertConfigurations[0]; + MetricAlertConfiguration createdMetricAlertConfig0 = createdConfig.MetricAlertConfigurations[0]; Assert.That(createdMetricAlertConfig0.DetectionConfigurationId, Is.EqualTo(detectionConfigId)); @@ -339,9 +339,9 @@ public async Task CreateAndGetAlertConfigurationWithMultipleMetricConfigurations Assert.That(createdMetricAlertConfig0.AlertSnoozeCondition, Is.Null); Assert.That(createdMetricAlertConfig0.UseDetectionResultToFilterAnomalies, Is.True); - // Validate the second Metric Anomaly Alert Configuration. + // Validate the second Metric Alert Configuration. - MetricAnomalyAlertConfiguration createdMetricAlertConfig1 = createdConfig.MetricAlertConfigurations[1]; + MetricAlertConfiguration createdMetricAlertConfig1 = createdConfig.MetricAlertConfigurations[1]; Assert.That(createdMetricAlertConfig1.DetectionConfigurationId, Is.EqualTo(detectionConfigId)); @@ -373,7 +373,7 @@ public async Task UpdateAlertConfigurationWithMinimumSetup(bool useTokenCrendent string metricId = disposableDataFeed.DataFeed.MetricIds[TempDataFeedMetricName]; await using DisposableDetectionConfiguration disposableDetectionConfig = await CreateTempDetectionConfigurationAsync(adminClient, metricId); - // Configure the Metric Anomaly Alert Configurations to be used. + // Configure the Metric Alert Configurations to be used. string hookName = Recording.GenerateAlphaNumericId("hook"); var hookToCreate = new EmailNotificationHook(hookName) { EmailsToAlert = { "fake@email.com" } }; @@ -382,7 +382,7 @@ public async Task UpdateAlertConfigurationWithMinimumSetup(bool useTokenCrendent var detectionConfigId = disposableDetectionConfig.Configuration.Id; var scope = MetricAnomalyAlertScope.GetScopeForWholeSeries(); - var metricAlertConfig0 = new MetricAnomalyAlertConfiguration(detectionConfigId, scope) + var metricAlertConfig0 = new MetricAlertConfiguration(detectionConfigId, scope) { AlertSnoozeCondition = new MetricAnomalyAlertSnoozeCondition(12, SnoozeScope.Series, true), AlertConditions = new MetricAnomalyAlertConditions() @@ -397,7 +397,7 @@ public async Task UpdateAlertConfigurationWithMinimumSetup(bool useTokenCrendent SeverityCondition = new SeverityCondition(AnomalySeverity.Low, AnomalySeverity.Medium) } }; - var metricAlertConfig1 = new MetricAnomalyAlertConfiguration(detectionConfigId, scope) + var metricAlertConfig1 = new MetricAlertConfiguration(detectionConfigId, scope) { UseDetectionResultToFilterAnomalies = true }; @@ -435,9 +435,9 @@ public async Task UpdateAlertConfigurationWithMinimumSetup(bool useTokenCrendent Assert.That(updatedConfig.MetricAlertConfigurations, Is.Not.Null); Assert.That(updatedConfig.MetricAlertConfigurations.Count, Is.EqualTo(2)); - // Validate the first Metric Anomaly Alert Configuration. + // Validate the first Metric Alert Configuration. - MetricAnomalyAlertConfiguration updatedMetricAlertConfig0 = updatedConfig.MetricAlertConfigurations[0]; + MetricAlertConfiguration updatedMetricAlertConfig0 = updatedConfig.MetricAlertConfigurations[0]; Assert.That(updatedMetricAlertConfig0.DetectionConfigurationId, Is.EqualTo(detectionConfigId)); @@ -464,9 +464,9 @@ public async Task UpdateAlertConfigurationWithMinimumSetup(bool useTokenCrendent Assert.That(updatedMetricAlertConfig0.UseDetectionResultToFilterAnomalies, Is.False); - // Validate the second Metric Anomaly Alert Configuration. + // Validate the second Metric Alert Configuration. - MetricAnomalyAlertConfiguration updatedMetricAlertConfig1 = updatedConfig.MetricAlertConfigurations[1]; + MetricAlertConfiguration updatedMetricAlertConfig1 = updatedConfig.MetricAlertConfigurations[1]; Assert.That(updatedMetricAlertConfig1.DetectionConfigurationId, Is.EqualTo(detectionConfigId)); @@ -490,7 +490,7 @@ public async Task UpdateAlertConfigurationWithEveryMember() string metricId = disposableDataFeed.DataFeed.MetricIds[TempDataFeedMetricName]; await using DisposableDetectionConfiguration disposableDetectionConfig = await CreateTempDetectionConfigurationAsync(adminClient, metricId); - // Configure the Metric Anomaly Alert Configurations to be used. + // Configure the Metric Alert Configurations to be used. string hookName = Recording.GenerateAlphaNumericId("hook"); var hookToCreate = new EmailNotificationHook(hookName) { EmailsToAlert = { "fake@email.com" } }; @@ -499,7 +499,7 @@ public async Task UpdateAlertConfigurationWithEveryMember() var detectionConfigId = disposableDetectionConfig.Configuration.Id; var scope = MetricAnomalyAlertScope.GetScopeForWholeSeries(); - var metricAlertConfig0 = new MetricAnomalyAlertConfiguration(detectionConfigId, scope) + var metricAlertConfig0 = new MetricAlertConfiguration(detectionConfigId, scope) { AlertSnoozeCondition = new MetricAnomalyAlertSnoozeCondition(12, SnoozeScope.Series, true), AlertConditions = new MetricAnomalyAlertConditions() @@ -514,7 +514,7 @@ public async Task UpdateAlertConfigurationWithEveryMember() SeverityCondition = new SeverityCondition(AnomalySeverity.Low, AnomalySeverity.Medium) } }; - var metricAlertConfig1 = new MetricAnomalyAlertConfiguration(detectionConfigId, scope) + var metricAlertConfig1 = new MetricAlertConfiguration(detectionConfigId, scope) { UseDetectionResultToFilterAnomalies = true }; @@ -524,7 +524,7 @@ public async Task UpdateAlertConfigurationWithEveryMember() string configName = Recording.GenerateAlphaNumericId("config"); var description = "This hook was created to test the .NET client."; var hookIds = new List() { disposableHook.Hook.Id }; - var metricAlertConfigs = new List() { metricAlertConfig0, metricAlertConfig1 }; + var metricAlertConfigs = new List() { metricAlertConfig0, metricAlertConfig1 }; var configToCreate = new AnomalyAlertConfiguration() { @@ -546,14 +546,14 @@ public async Task UpdateAlertConfigurationWithEveryMember() configToUpdate.MetricAlertConfigurations.RemoveAt(1); var newScope = MetricAnomalyAlertScope.GetScopeForTopNGroup(new TopNGroupScope(50, 40, 30)); - var newMetricAlertConfig = new MetricAnomalyAlertConfiguration(detectionConfigId, newScope) + var newMetricAlertConfig = new MetricAlertConfiguration(detectionConfigId, newScope) { AlertSnoozeCondition = new MetricAnomalyAlertSnoozeCondition(4, SnoozeScope.Metric, true), UseDetectionResultToFilterAnomalies = true }; configToUpdate.MetricAlertConfigurations.Add(newMetricAlertConfig); - MetricAnomalyAlertConfiguration metricAlertConfigToUpdate = configToUpdate.MetricAlertConfigurations[0]; + MetricAlertConfiguration metricAlertConfigToUpdate = configToUpdate.MetricAlertConfigurations[0]; metricAlertConfigToUpdate.AlertConditions.MetricBoundaryCondition.UpperBound = 15.0; metricAlertConfigToUpdate.AlertConditions.MetricBoundaryCondition.LowerBound = 5.0; @@ -575,9 +575,9 @@ public async Task UpdateAlertConfigurationWithEveryMember() Assert.That(updatedConfig.IdsOfHooksToAlert, Is.Not.Null.And.Empty); Assert.That(updatedConfig.MetricAlertConfigurations, Is.Not.Null); - // Validate the first Metric Anomaly Alert Configuration. + // Validate the first Metric Alert Configuration. - MetricAnomalyAlertConfiguration updatedMetricAlertConfig0 = updatedConfig.MetricAlertConfigurations[0]; + MetricAlertConfiguration updatedMetricAlertConfig0 = updatedConfig.MetricAlertConfigurations[0]; Assert.That(updatedMetricAlertConfig0.DetectionConfigurationId, Is.EqualTo(detectionConfigId)); @@ -600,9 +600,9 @@ public async Task UpdateAlertConfigurationWithEveryMember() Assert.That(updatedMetricAlertConfig0.AlertSnoozeCondition, Is.Null); Assert.That(updatedMetricAlertConfig0.UseDetectionResultToFilterAnomalies, Is.False); - // Validate the second Metric Anomaly Alert Configuration. + // Validate the second Metric Alert Configuration. - MetricAnomalyAlertConfiguration updatedMetricAlertConfig1 = updatedConfig.MetricAlertConfigurations[1]; + MetricAlertConfiguration updatedMetricAlertConfig1 = updatedConfig.MetricAlertConfigurations[1]; Assert.That(updatedMetricAlertConfig1.DetectionConfigurationId, Is.EqualTo(detectionConfigId)); @@ -665,9 +665,9 @@ public async Task GetAlertConfigurations(bool useTokenCredential) Assert.That(hookId, Is.Not.Null.And.Not.Empty); } - foreach (MetricAnomalyAlertConfiguration metricConfig in config.MetricAlertConfigurations) + foreach (MetricAlertConfiguration metricConfig in config.MetricAlertConfigurations) { - ValidateMetricAnomalyAlertConfiguration(metricConfig); + ValidateMetricAlertConfiguration(metricConfig); } if (++configCount >= MaximumSamplesCount) @@ -719,7 +719,7 @@ public async Task DeleteAlertConfiguration(bool useTokenCredential) } } - private void ValidateMetricAnomalyAlertConfiguration(MetricAnomalyAlertConfiguration configuration) + private void ValidateMetricAlertConfiguration(MetricAlertConfiguration configuration) { Assert.That(configuration.DetectionConfigurationId, Is.Not.Null.And.Not.Empty); Assert.That(configuration.AlertScope, Is.Not.Null); diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClient/AnomalyAlertConfigurationTests.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClient/AnomalyAlertConfigurationTests.cs index 2fe432ebe817..75a2aae7159a 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClient/AnomalyAlertConfigurationTests.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClient/AnomalyAlertConfigurationTests.cs @@ -72,7 +72,7 @@ public void UpdateAlertConfigurationRespectsTheCancellationToken() { MetricsAdvisorAdministrationClient adminClient = GetMetricsAdvisorAdministrationClient(); - var config = new AnomalyAlertConfiguration(FakeGuid, default, default, default, new List(), new List(), new List()); + var config = new AnomalyAlertConfiguration(FakeGuid, default, default, default, new List(), new List(), new List()); using var cancellationSource = new CancellationTokenSource(); cancellationSource.Cancel(); diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample05_AlertConfigurationCrudOperations.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample05_AlertConfigurationCrudOperations.cs index fc0b57ff2367..44dcb6ec3faf 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample05_AlertConfigurationCrudOperations.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample05_AlertConfigurationCrudOperations.cs @@ -42,7 +42,7 @@ public async Task CreateAndDeleteAlertConfigurationAsync() alertConfiguration.IdsOfHooksToAlert.Add(hookId); var scope = MetricAnomalyAlertScope.GetScopeForWholeSeries(); - var metricAlertConfiguration = new MetricAnomalyAlertConfiguration(anomalyDetectionConfigurationId, scope); + var metricAlertConfiguration = new MetricAlertConfiguration(anomalyDetectionConfigurationId, scope); alertConfiguration.MetricAlertConfigurations.Add(metricAlertConfiguration); @@ -88,7 +88,7 @@ public async Task GetAlertConfigurationAsync() Console.WriteLine(); Console.WriteLine("Metric anomaly alert configurations:"); - foreach (MetricAnomalyAlertConfiguration metricAlertConfiguration in alertConfiguration.MetricAlertConfigurations) + foreach (MetricAlertConfiguration metricAlertConfiguration in alertConfiguration.MetricAlertConfigurations) { Console.Write($" Scope type: {metricAlertConfiguration.AlertScope.ScopeType}, "); Console.WriteLine($"Anomaly detection configuration ID: {metricAlertConfiguration.DetectionConfigurationId}");