From ecc43ec3ddc25248aa62b431ce9229502a43d7e6 Mon Sep 17 00:00:00 2001 From: Ben Eshed Date: Tue, 28 Oct 2025 10:33:41 -0700 Subject: [PATCH 1/3] Remove ShouldProcess Paramter from Azure Firewall related Resources --- src/Network/Network/AzureFirewall/SetAzureFirewallCommand.cs | 3 ++- .../SetAzureFirewallPolicyRuleCollectionGroupCmdlet.cs | 3 ++- .../AzureFirewallPolicy/SetAzureFirewallPolicyCommand.cs | 3 ++- src/Network/Network/ChangeLog.md | 1 + src/Network/Network/IpGroup/SetIpGroupCommand.cs | 3 ++- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/Network/Network/AzureFirewall/SetAzureFirewallCommand.cs b/src/Network/Network/AzureFirewall/SetAzureFirewallCommand.cs index f63ff23edfa8..89b7594b5665 100644 --- a/src/Network/Network/AzureFirewall/SetAzureFirewallCommand.cs +++ b/src/Network/Network/AzureFirewall/SetAzureFirewallCommand.cs @@ -21,7 +21,8 @@ namespace Microsoft.Azure.Commands.Network { - [Cmdlet(VerbsCommon.Set, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "Firewall", SupportsShouldProcess = true), OutputType(typeof(PSAzureFirewall))] + // TODO: Support WhatIf https://github.com/Azure/azure-powershell/issues/27667 + [Cmdlet(VerbsCommon.Set, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "Firewall", SupportsShouldProcess = false), OutputType(typeof(PSAzureFirewall))] public class SetAzureFirewallCommand : AzureFirewallBaseCmdlet { [Parameter( diff --git a/src/Network/Network/AzureFirewallPolicy/RuleGroup/SetAzureFirewallPolicyRuleCollectionGroupCmdlet.cs b/src/Network/Network/AzureFirewallPolicy/RuleGroup/SetAzureFirewallPolicyRuleCollectionGroupCmdlet.cs index f31886f92a15..8e87c070bf6f 100644 --- a/src/Network/Network/AzureFirewallPolicy/RuleGroup/SetAzureFirewallPolicyRuleCollectionGroupCmdlet.cs +++ b/src/Network/Network/AzureFirewallPolicy/RuleGroup/SetAzureFirewallPolicyRuleCollectionGroupCmdlet.cs @@ -27,7 +27,8 @@ namespace Microsoft.Azure.Commands.Network { - [Cmdlet(VerbsCommon.Set, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FirewallPolicyRuleCollectionGroup", SupportsShouldProcess = true, DefaultParameterSetName = SetByNameParameterSet), OutputType(typeof(PSAzureFirewallPolicyRuleCollectionGroup))] + // TODO: Support WhatIf https://github.com/Azure/azure-powershell/issues/27667 + [Cmdlet(VerbsCommon.Set, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FirewallPolicyRuleCollectionGroup", SupportsShouldProcess = false, DefaultParameterSetName = SetByNameParameterSet), OutputType(typeof(PSAzureFirewallPolicyRuleCollectionGroup))] public class SetAzureFirewallPolicyRuleGroupCommand : AzureFirewallPolicyRuleCollectionGroupBaseCmdlet { diff --git a/src/Network/Network/AzureFirewallPolicy/SetAzureFirewallPolicyCommand.cs b/src/Network/Network/AzureFirewallPolicy/SetAzureFirewallPolicyCommand.cs index 7f5c5857a859..fa3745ce489f 100644 --- a/src/Network/Network/AzureFirewallPolicy/SetAzureFirewallPolicyCommand.cs +++ b/src/Network/Network/AzureFirewallPolicy/SetAzureFirewallPolicyCommand.cs @@ -27,7 +27,8 @@ namespace Microsoft.Azure.Commands.Network { - [Cmdlet(VerbsCommon.Set, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FirewallPolicy", SupportsShouldProcess = true, DefaultParameterSetName = SetByNameParameterSet), OutputType(typeof(PSAzureFirewallPolicy))] + // TODO: Support WhatIf https://github.com/Azure/azure-powershell/issues/27667 + [Cmdlet(VerbsCommon.Set, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FirewallPolicy", SupportsShouldProcess = false, DefaultParameterSetName = SetByNameParameterSet), OutputType(typeof(PSAzureFirewallPolicy))] public class SetAzureFirewallPolicyCommand : AzureFirewallPolicyBaseCmdlet { diff --git a/src/Network/Network/ChangeLog.md b/src/Network/Network/ChangeLog.md index 35ad9379a46f..3f7df9a33e93 100644 --- a/src/Network/Network/ChangeLog.md +++ b/src/Network/Network/ChangeLog.md @@ -21,6 +21,7 @@ ## Upcoming Release * Bug fix for `AzureFirewallPolicy` to ensure `BasePolicy` is properly set via `Set-AzFirewallPolicy` cmdlet either via pipe or direct value. +* Removal of `ShouldProcess` from `Set-AzFirewallPolicyRuleCollectionGroup`, `Set-AzFirewallPolicy`, `Set-AzFirewall`, and `Set-AzIpGroup` parameter as it has not been implemented yet. ## Version 7.22.0 * Added new RouteTableUsageMode property for Network Manager Routing Configuration diff --git a/src/Network/Network/IpGroup/SetIpGroupCommand.cs b/src/Network/Network/IpGroup/SetIpGroupCommand.cs index 86dc6abe5505..76f605b25246 100644 --- a/src/Network/Network/IpGroup/SetIpGroupCommand.cs +++ b/src/Network/Network/IpGroup/SetIpGroupCommand.cs @@ -21,7 +21,8 @@ namespace Microsoft.Azure.Commands.Network { - [Cmdlet(VerbsCommon.Set, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "IpGroup", SupportsShouldProcess = true), OutputType(typeof(PSIpGroup))] + // TODO: Support WhatIf https://github.com/Azure/azure-powershell/issues/27667 + [Cmdlet(VerbsCommon.Set, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "IpGroup", SupportsShouldProcess = false), OutputType(typeof(PSIpGroup))] public class SetIpGroupsCommand : IpGroupBaseCmdlet { [Parameter( From dc60b0e12461986ca99b55d2f8965571d723ee17 Mon Sep 17 00:00:00 2001 From: Ben Eshed <105308016+bewatersmsft@users.noreply.github.com> Date: Tue, 28 Oct 2025 11:06:33 -0700 Subject: [PATCH 2/3] Update src/Network/Network/ChangeLog.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/Network/Network/ChangeLog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Network/Network/ChangeLog.md b/src/Network/Network/ChangeLog.md index 3f7df9a33e93..3e40c1eeb08a 100644 --- a/src/Network/Network/ChangeLog.md +++ b/src/Network/Network/ChangeLog.md @@ -21,7 +21,7 @@ ## Upcoming Release * Bug fix for `AzureFirewallPolicy` to ensure `BasePolicy` is properly set via `Set-AzFirewallPolicy` cmdlet either via pipe or direct value. -* Removal of `ShouldProcess` from `Set-AzFirewallPolicyRuleCollectionGroup`, `Set-AzFirewallPolicy`, `Set-AzFirewall`, and `Set-AzIpGroup` parameter as it has not been implemented yet. +* Removal of `SupportsShouldProcess` attribute from `Set-AzFirewallPolicyRuleCollectionGroup`, `Set-AzFirewallPolicy`, `Set-AzFirewall`, and `Set-AzIpGroup` cmdlets as it has not been implemented yet. ## Version 7.22.0 * Added new RouteTableUsageMode property for Network Manager Routing Configuration From 3be608c4b7c0a012bb416e35f4c5c9684d7558c5 Mon Sep 17 00:00:00 2001 From: Ben Eshed Date: Tue, 28 Oct 2025 11:08:27 -0700 Subject: [PATCH 3/3] ipGroups support ShouldProcess --- src/Network/Network/ChangeLog.md | 2 +- src/Network/Network/IpGroup/SetIpGroupCommand.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Network/Network/ChangeLog.md b/src/Network/Network/ChangeLog.md index 3e40c1eeb08a..638723e52335 100644 --- a/src/Network/Network/ChangeLog.md +++ b/src/Network/Network/ChangeLog.md @@ -21,7 +21,7 @@ ## Upcoming Release * Bug fix for `AzureFirewallPolicy` to ensure `BasePolicy` is properly set via `Set-AzFirewallPolicy` cmdlet either via pipe or direct value. -* Removal of `SupportsShouldProcess` attribute from `Set-AzFirewallPolicyRuleCollectionGroup`, `Set-AzFirewallPolicy`, `Set-AzFirewall`, and `Set-AzIpGroup` cmdlets as it has not been implemented yet. +* Removal of `SupportsShouldProcess` attribute from `Set-AzFirewallPolicyRuleCollectionGroup`, `Set-AzFirewallPolicy`, and `Set-AzFirewall` cmdlets as it has not been implemented yet. ## Version 7.22.0 * Added new RouteTableUsageMode property for Network Manager Routing Configuration diff --git a/src/Network/Network/IpGroup/SetIpGroupCommand.cs b/src/Network/Network/IpGroup/SetIpGroupCommand.cs index 76f605b25246..86dc6abe5505 100644 --- a/src/Network/Network/IpGroup/SetIpGroupCommand.cs +++ b/src/Network/Network/IpGroup/SetIpGroupCommand.cs @@ -21,8 +21,7 @@ namespace Microsoft.Azure.Commands.Network { - // TODO: Support WhatIf https://github.com/Azure/azure-powershell/issues/27667 - [Cmdlet(VerbsCommon.Set, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "IpGroup", SupportsShouldProcess = false), OutputType(typeof(PSIpGroup))] + [Cmdlet(VerbsCommon.Set, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "IpGroup", SupportsShouldProcess = true), OutputType(typeof(PSIpGroup))] public class SetIpGroupsCommand : IpGroupBaseCmdlet { [Parameter(