Skip to content

Commit 1cc74ba

Browse files
nimallerVeryEarly
andauthored
Updated Set-AzExpressRouteGateway to allow either one of -MinScaleUnits and -MaxScaleUnits (#14150)
* initial changes * suppress breaking change message * Update BreakingChangeIssues.csv Co-authored-by: Yabo Hu <[email protected]>
1 parent cea4e1c commit 1cc74ba

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

src/Network/Network/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
## Upcoming Release
2222
* Updated format list and format table views for Get-AzVirtualNetworkGatewayConnectionIkeSa
23+
* Updated `set-azExpressRouteGateway` to allow parameter -MinScaleUnits without specifying -MaxScaleUnits
2324

2425
## Version 4.5.0
2526
* Added new cmdlets for CRUD of VpnGatewayNATRule.

src/Network/Network/Cortex/ExpressRouteGateway/SetAzureRmExpressRouteGatewayCommand.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,13 @@ public class UpdateAzureRmExpressRouteGatewayCommand : ExpressRouteGatewayBaseCm
7373
[Parameter(
7474
Mandatory = false,
7575
HelpMessage = "Min for the scale units for this ExpressRouteGateway.")]
76+
[ValidateRange(1, 100)]
7677
public uint MinScaleUnits { get; set; }
7778

7879
[Parameter(
7980
Mandatory = false,
8081
HelpMessage = "Max for the scale units for this ExpressRouteGateway.")]
82+
[ValidateRange(1, 100)]
8183
public uint MaxScaleUnits { get; set; }
8284

8385
[Parameter(
@@ -116,7 +118,7 @@ public override void Execute()
116118
throw new PSArgumentException(Properties.Resources.ExpressRouteGatewayNotFound);
117119
}
118120

119-
if (this.MinScaleUnits > 0 && this.MaxScaleUnits > 0)
121+
if (this.MinScaleUnits > 0 || this.MaxScaleUnits > 0)
120122
{
121123
if (this.MinScaleUnits > this.MaxScaleUnits)
122124
{
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
"AssemblyFileName","ClassName","Target","Severity","ProblemId","Description","Remediation"
2-
"Microsoft.Azure.PowerShell.Cmdlets.Network.dll","Microsoft.Azure.Commands.Network.NewAzFirewallPolicyNatRuleCommand","New-AzFirewallPolicyNatRule","0","1050","The parameter set '__AllParameterSets' for cmdlet 'New-AzFirewallPolicyNatRule' has been removed.","Add parameter set '__AllParameterSets' back to cmdlet 'New-AzFirewallPolicyNatRule'."
2+
"Microsoft.Azure.PowerShell.Cmdlets.Network.dll","Microsoft.Azure.Commands.Network.NewAzFirewallPolicyNatRuleCommand","New-AzFirewallPolicyNatRule","0","1050","The parameter set '__AllParameterSets' for cmdlet 'New-AzFirewallPolicyNatRule' has been removed.","Add parameter set '__AllParameterSets' back to cmdlet 'New-AzFirewallPolicyNatRule'."
3+
"Microsoft.Azure.PowerShell.Cmdlets.Network.dll","Microsoft.Azure.Commands.Network.UpdateAzureRmExpressRouteGatewayCommand","Set-AzExpressRouteGateway","0","2150","A validate range has been added for parameter 'MinScaleUnits' for cmdlet 'Set-AzExpressRouteGateway'.","Remove the validate range from parameter 'MinScaleUnits'."

0 commit comments

Comments
 (0)