From cabe3419acd241d24fded3cd3f4e8b8a0cda2262 Mon Sep 17 00:00:00 2001 From: Yabo Hu Date: Wed, 25 Nov 2020 16:01:04 +0800 Subject: [PATCH] update new-azautoscaleprofile to accept rule as empty list --- .../Monitor/Autoscale/NewAzureRmAutoscaleProfileCommand.cs | 2 +- src/Monitor/Monitor/ChangeLog.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Monitor/Monitor/Autoscale/NewAzureRmAutoscaleProfileCommand.cs b/src/Monitor/Monitor/Autoscale/NewAzureRmAutoscaleProfileCommand.cs index 51dc39aff1e0..16c774c4e23c 100644 --- a/src/Monitor/Monitor/Autoscale/NewAzureRmAutoscaleProfileCommand.cs +++ b/src/Monitor/Monitor/Autoscale/NewAzureRmAutoscaleProfileCommand.cs @@ -126,7 +126,7 @@ public class NewAzureRmAutoscaleProfileCommand : MonitorCmdletBase [Parameter(ParameterSetName = AddAutoscaleProfileNoScheduleParamGroup, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The rules for the setting")] [Parameter(ParameterSetName = AddAutoscaleProfileFixDateParamGroup, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The rules for the setting")] [Parameter(ParameterSetName = AddAutoscaleProfileRecurrenceParamGroup, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The rules for the setting")] - [ValidateNotNullOrEmpty] + [ValidateNotNull] public List Rule { get; set; } #endregion diff --git a/src/Monitor/Monitor/ChangeLog.md b/src/Monitor/Monitor/ChangeLog.md index fad3d1adb92a..406e2105331d 100644 --- a/src/Monitor/Monitor/ChangeLog.md +++ b/src/Monitor/Monitor/ChangeLog.md @@ -19,6 +19,7 @@ --> ## Upcoming Release +* Changed parameter `Rule` of `New-AzAutoscaleProfile` to accept empty list. [#12903] ## Version 2.2.0 * Fixed the bug that warning message cannot be suppressed. [#12889]