diff --git a/eng/mgmt/mgmtmetadata/monitor_resource-manager.txt b/eng/mgmt/mgmtmetadata/monitor_resource-manager.txt
index b046e9a764fa..f9d615e33a51 100644
--- a/eng/mgmt/mgmtmetadata/monitor_resource-manager.txt
+++ b/eng/mgmt/mgmtmetadata/monitor_resource-manager.txt
@@ -1,14 +1,14 @@
-Installing AutoRest version: 2.0.4413
+Installing AutoRest version: v2
AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
-cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/monitor/resource-manager/readme.md --csharp --version=2.0.4413 --reflect-api-versions --tag=package-2020-03 --csharp-sdks-folder=C:\Users\sivang\Source\Repos\azure-sdk-for-net\sdk
-2020-04-27 07:01:35 UTC
+cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/monitor/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --tag=package-2020-03 --csharp-sdks-folder=C:\users\odhutzle\Documents\repositories\azure-sdk-for-net\sdk
+2020-09-07 13:00:39 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
-Commit: fbdb37ec047a2ec3893f9f873b64b6f21f8bceeb
+Commit: 35d24315a39e1519597ec5d5b55f73921f12b57a
AutoRest information
-Requested version: 2.0.4413
+Requested version: v2
Bootstrapper version: autorest@2.0.4413
diff --git a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/Action.cs b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/Action.cs
index a9e6e84f7b24..31f552c14562 100644
--- a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/Action.cs
+++ b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/Action.cs
@@ -10,13 +10,11 @@
namespace Microsoft.Azure.Management.Monitor.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Action descriptor.
///
- [Newtonsoft.Json.JsonObject("Action")]
public partial class Action
{
///
diff --git a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/DynamicMetricCriteria.cs b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/DynamicMetricCriteria.cs
index 901f174c6ba4..7b8099392e66 100644
--- a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/DynamicMetricCriteria.cs
+++ b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/DynamicMetricCriteria.cs
@@ -51,11 +51,14 @@ public DynamicMetricCriteria()
/// message are deserialized this collection
/// Namespace of the metric.
/// List of dimension conditions.
+ /// Allows creating an alert rule on
+ /// a custom metric that isn't yet emitted, by causing the metric
+ /// validation to be skipped.
/// Use this option to set the date from
/// which to start learning the metric historical data and calculate
/// the dynamic thresholds (in ISO8601 format)
- public DynamicMetricCriteria(string name, string metricName, object timeAggregation, string operatorProperty, string alertSensitivity, DynamicThresholdFailingPeriods failingPeriods, IDictionary additionalProperties = default(IDictionary), string metricNamespace = default(string), IList dimensions = default(IList), System.DateTime? ignoreDataBefore = default(System.DateTime?))
- : base(name, metricName, timeAggregation, additionalProperties, metricNamespace, dimensions)
+ public DynamicMetricCriteria(string name, string metricName, object timeAggregation, string operatorProperty, string alertSensitivity, DynamicThresholdFailingPeriods failingPeriods, IDictionary additionalProperties = default(IDictionary), string metricNamespace = default(string), IList dimensions = default(IList), bool? skipMetricValidation = default(bool?), System.DateTime? ignoreDataBefore = default(System.DateTime?))
+ : base(name, metricName, timeAggregation, additionalProperties, metricNamespace, dimensions, skipMetricValidation)
{
OperatorProperty = operatorProperty;
AlertSensitivity = alertSensitivity;
diff --git a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/MetricAlertCriteria.cs b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/MetricAlertCriteria.cs
index e5d00fa0cdee..a3ba1b45aa0e 100644
--- a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/MetricAlertCriteria.cs
+++ b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/MetricAlertCriteria.cs
@@ -18,7 +18,6 @@ namespace Microsoft.Azure.Management.Monitor.Models
///
/// The rule criteria that defines the conditions of the alert rule.
///
- [Newtonsoft.Json.JsonObject("MetricAlertCriteria")]
public partial class MetricAlertCriteria
{
///
diff --git a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/MetricCriteria.cs b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/MetricCriteria.cs
index af85cdd1c6fc..d595365129bc 100644
--- a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/MetricCriteria.cs
+++ b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/MetricCriteria.cs
@@ -46,8 +46,11 @@ public MetricCriteria()
/// message are deserialized this collection
/// Namespace of the metric.
/// List of dimension conditions.
- public MetricCriteria(string name, string metricName, object timeAggregation, string operatorProperty, double threshold, IDictionary additionalProperties = default(IDictionary), string metricNamespace = default(string), IList dimensions = default(IList))
- : base(name, metricName, timeAggregation, additionalProperties, metricNamespace, dimensions)
+ /// Allows creating an alert rule on
+ /// a custom metric that isn't yet emitted, by causing the metric
+ /// validation to be skipped.
+ public MetricCriteria(string name, string metricName, object timeAggregation, string operatorProperty, double threshold, IDictionary additionalProperties = default(IDictionary), string metricNamespace = default(string), IList dimensions = default(IList), bool? skipMetricValidation = default(bool?))
+ : base(name, metricName, timeAggregation, additionalProperties, metricNamespace, dimensions, skipMetricValidation)
{
OperatorProperty = operatorProperty;
Threshold = threshold;
diff --git a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/MetricTrigger.cs b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/MetricTrigger.cs
index 5a5ca0117cae..03738b6e53bf 100644
--- a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/MetricTrigger.cs
+++ b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/MetricTrigger.cs
@@ -12,6 +12,8 @@ namespace Microsoft.Azure.Management.Monitor.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
using System.Linq;
///
@@ -55,9 +57,14 @@ public MetricTrigger()
/// 'LessThan', 'LessThanOrEqual'
/// the threshold of the metric that triggers
/// the scale action.
- public MetricTrigger(string metricName, string metricResourceUri, System.TimeSpan timeGrain, MetricStatisticType statistic, System.TimeSpan timeWindow, TimeAggregationType timeAggregation, ComparisonOperationType operatorProperty, double threshold)
+ /// the namespace of the metric that
+ /// defines what the rule monitors.
+ /// List of dimension conditions. For example:
+ /// [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}].
+ public MetricTrigger(string metricName, string metricResourceUri, System.TimeSpan timeGrain, MetricStatisticType statistic, System.TimeSpan timeWindow, TimeAggregationType timeAggregation, ComparisonOperationType operatorProperty, double threshold, string metricNamespace = default(string), IList dimensions = default(IList))
{
MetricName = metricName;
+ MetricNamespace = metricNamespace;
MetricResourceUri = metricResourceUri;
TimeGrain = timeGrain;
Statistic = statistic;
@@ -65,6 +72,7 @@ public MetricTrigger(string metricName, string metricResourceUri, System.TimeSpa
TimeAggregation = timeAggregation;
OperatorProperty = operatorProperty;
Threshold = threshold;
+ Dimensions = dimensions;
CustomInit();
}
@@ -80,6 +88,13 @@ public MetricTrigger(string metricName, string metricResourceUri, System.TimeSpa
[JsonProperty(PropertyName = "metricName")]
public string MetricName { get; set; }
+ ///
+ /// Gets or sets the namespace of the metric that defines what the rule
+ /// monitors.
+ ///
+ [JsonProperty(PropertyName = "metricNamespace")]
+ public string MetricNamespace { get; set; }
+
///
/// Gets or sets the resource identifier of the resource the rule
/// monitors.
@@ -136,6 +151,13 @@ public MetricTrigger(string metricName, string metricResourceUri, System.TimeSpa
[JsonProperty(PropertyName = "threshold")]
public double Threshold { get; set; }
+ ///
+ /// Gets or sets list of dimension conditions. For example:
+ /// [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}].
+ ///
+ [JsonProperty(PropertyName = "dimensions")]
+ public IList Dimensions { get; set; }
+
///
/// Validate the object.
///
@@ -152,6 +174,16 @@ public virtual void Validate()
{
throw new ValidationException(ValidationRules.CannotBeNull, "MetricResourceUri");
}
+ if (Dimensions != null)
+ {
+ foreach (var element in Dimensions)
+ {
+ if (element != null)
+ {
+ element.Validate();
+ }
+ }
+ }
}
}
}
diff --git a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/MultiMetricCriteria.cs b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/MultiMetricCriteria.cs
index 400ff4ebfc9d..f83400684fce 100644
--- a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/MultiMetricCriteria.cs
+++ b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/MultiMetricCriteria.cs
@@ -19,7 +19,6 @@ namespace Microsoft.Azure.Management.Monitor.Models
///
/// The types of conditions for a multi resource alert.
///
- [Newtonsoft.Json.JsonObject("MultiMetricCriteria")]
public partial class MultiMetricCriteria
{
///
@@ -41,7 +40,10 @@ public MultiMetricCriteria()
/// message are deserialized this collection
/// Namespace of the metric.
/// List of dimension conditions.
- public MultiMetricCriteria(string name, string metricName, object timeAggregation, IDictionary additionalProperties = default(IDictionary), string metricNamespace = default(string), IList dimensions = default(IList))
+ /// Allows creating an alert rule on
+ /// a custom metric that isn't yet emitted, by causing the metric
+ /// validation to be skipped.
+ public MultiMetricCriteria(string name, string metricName, object timeAggregation, IDictionary additionalProperties = default(IDictionary), string metricNamespace = default(string), IList dimensions = default(IList), bool? skipMetricValidation = default(bool?))
{
AdditionalProperties = additionalProperties;
Name = name;
@@ -49,6 +51,7 @@ public MultiMetricCriteria()
MetricNamespace = metricNamespace;
TimeAggregation = timeAggregation;
Dimensions = dimensions;
+ SkipMetricValidation = skipMetricValidation;
CustomInit();
}
@@ -94,6 +97,13 @@ public MultiMetricCriteria()
[JsonProperty(PropertyName = "dimensions")]
public IList Dimensions { get; set; }
+ ///
+ /// Gets or sets allows creating an alert rule on a custom metric that
+ /// isn't yet emitted, by causing the metric validation to be skipped.
+ ///
+ [JsonProperty(PropertyName = "skipMetricValidation")]
+ public bool? SkipMetricValidation { get; set; }
+
///
/// Validate the object.
///
diff --git a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/RuleAction.cs b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/RuleAction.cs
index 477a7bd77c29..5343ce85fdd6 100644
--- a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/RuleAction.cs
+++ b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/RuleAction.cs
@@ -10,14 +10,12 @@
namespace Microsoft.Azure.Management.Monitor.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// The action that is performed when the alert rule becomes active, and
/// when an alert condition is resolved.
///
- [Newtonsoft.Json.JsonObject("RuleAction")]
public partial class RuleAction
{
///
diff --git a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/RuleCondition.cs b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/RuleCondition.cs
index 4a1d4ec4aa1f..a784e064f69b 100644
--- a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/RuleCondition.cs
+++ b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/RuleCondition.cs
@@ -16,7 +16,6 @@ namespace Microsoft.Azure.Management.Monitor.Models
///
/// The condition that results in the alert rule being activated.
///
- [Newtonsoft.Json.JsonObject("RuleCondition")]
public partial class RuleCondition
{
///
diff --git a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/RuleDataSource.cs b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/RuleDataSource.cs
index b90c98ce97b9..64f93af629ca 100644
--- a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/RuleDataSource.cs
+++ b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/RuleDataSource.cs
@@ -16,7 +16,6 @@ namespace Microsoft.Azure.Management.Monitor.Models
///
/// The resource from which the rule collects its data.
///
- [Newtonsoft.Json.JsonObject("RuleDataSource")]
public partial class RuleDataSource
{
///
diff --git a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/ScaleRuleMetricDimension.cs b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/ScaleRuleMetricDimension.cs
new file mode 100644
index 000000000000..9cb036d6fed2
--- /dev/null
+++ b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/ScaleRuleMetricDimension.cs
@@ -0,0 +1,99 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Monitor.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Specifies an auto scale rule metric dimension.
+ ///
+ public partial class ScaleRuleMetricDimension
+ {
+ ///
+ /// Initializes a new instance of the ScaleRuleMetricDimension class.
+ ///
+ public ScaleRuleMetricDimension()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ScaleRuleMetricDimension class.
+ ///
+ /// Name of the dimension.
+ /// the dimension operator. Only
+ /// 'Equals' and 'NotEquals' are supported. 'Equals' being equal to any
+ /// of the values. 'NotEquals' being not equal to all of the values.
+ /// Possible values include: 'Equals', 'NotEquals'
+ /// list of dimension values. For example:
+ /// ["App1","App2"].
+ public ScaleRuleMetricDimension(string dimensionName, string operatorProperty, IList values)
+ {
+ DimensionName = dimensionName;
+ OperatorProperty = operatorProperty;
+ Values = values;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets name of the dimension.
+ ///
+ [JsonProperty(PropertyName = "DimensionName")]
+ public string DimensionName { get; set; }
+
+ ///
+ /// Gets or sets the dimension operator. Only 'Equals' and 'NotEquals'
+ /// are supported. 'Equals' being equal to any of the values.
+ /// 'NotEquals' being not equal to all of the values. Possible values
+ /// include: 'Equals', 'NotEquals'
+ ///
+ [JsonProperty(PropertyName = "Operator")]
+ public string OperatorProperty { get; set; }
+
+ ///
+ /// Gets or sets list of dimension values. For example:
+ /// ["App1","App2"].
+ ///
+ [JsonProperty(PropertyName = "Values")]
+ public IList Values { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (DimensionName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "DimensionName");
+ }
+ if (OperatorProperty == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "OperatorProperty");
+ }
+ if (Values == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Values");
+ }
+ }
+ }
+}
diff --git a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/ScaleRuleMetricDimensionOperationType.cs b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/ScaleRuleMetricDimensionOperationType.cs
new file mode 100644
index 000000000000..3ff0455f3c4e
--- /dev/null
+++ b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/Models/ScaleRuleMetricDimensionOperationType.cs
@@ -0,0 +1,22 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Monitor.Models
+{
+
+ ///
+ /// Defines values for ScaleRuleMetricDimensionOperationType.
+ ///
+ public static class ScaleRuleMetricDimensionOperationType
+ {
+ public const string Equals = "Equals";
+ public const string NotEquals = "NotEquals";
+ }
+}
diff --git a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/SdkInfo_MonitorClient.cs b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/SdkInfo_MonitorClient.cs
index bbac3b0b4841..e3c5a4b62921 100644
--- a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/SdkInfo_MonitorClient.cs
+++ b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Generated/SdkInfo_MonitorClient.cs
@@ -49,12 +49,12 @@ public static IEnumerable> ApiInfo_MonitorClient
}
}
// BEGIN: Code Generation Metadata Section
- public static readonly String AutoRestVersion = "2.0.4413";
+ public static readonly String AutoRestVersion = "v2";
public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413";
- public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/monitor/resource-manager/readme.md --csharp --version=2.0.4413 --reflect-api-versions --tag=package-2020-03 --csharp-sdks-folder=C:\\Users\\sivang\\Source\\Repos\\azure-sdk-for-net\\sdk";
+ public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/monitor/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --tag=package-2020-03 --csharp-sdks-folder=C:\\users\\odhutzle\\Documents\\repositories\\azure-sdk-for-net\\sdk";
public static readonly String GithubForkName = "Azure";
public static readonly String GithubBranchName = "master";
- public static readonly String GithubCommidId = "fbdb37ec047a2ec3893f9f873b64b6f21f8bceeb";
+ public static readonly String GithubCommidId = "35d24315a39e1519597ec5d5b55f73921f12b57a";
public static readonly String CodeGenerationErrors = "";
public static readonly String GithubRepoName = "azure-rest-api-specs";
// END: Code Generation Metadata Section
diff --git a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Microsoft.Azure.Management.Monitor.csproj b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Microsoft.Azure.Management.Monitor.csproj
index 5a98b0ea0e57..a22a86799e41 100644
--- a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Microsoft.Azure.Management.Monitor.csproj
+++ b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Microsoft.Azure.Management.Monitor.csproj
@@ -6,11 +6,11 @@
Microsoft Azure Monitor Library
Microsoft.Azure.Management.Monitor
- 0.25.1-preview
+ 0.25.2-preview
Microsoft.Azure.Management.Monitor
Management.Monitor;Management.Monitoring;metrics;alerts;autoscale;activityLogs;events;operations;logs;privatelinkscope
- - Fixing API **2018-03-01/metricAlert_API**. Fix WebtestLocationAvailabilityCriteria criteria type.
+ - Adding API **2018-03-01/metricAlert_API**. Support SkipMetricValidation property.
diff --git a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Properties/AssemblyInfo.cs b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Properties/AssemblyInfo.cs
index b45a4e45fba6..9e5235fd2ee8 100644
--- a/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Properties/AssemblyInfo.cs
+++ b/sdk/monitor/Microsoft.Azure.Management.Monitor/src/Properties/AssemblyInfo.cs
@@ -7,8 +7,8 @@
[assembly: AssemblyTitle("Microsoft Azure Monitor Library")]
[assembly: AssemblyDescription("Provides Microsoft Azure Monitor operations.")]
-[assembly: AssemblyVersion("0.25.1.0")]
-[assembly: AssemblyFileVersion("0.25.1.0")]
+[assembly: AssemblyVersion("0.25.2.0")]
+[assembly: AssemblyFileVersion("0.25.2.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Microsoft Azure .NET SDK")]