Skip to content

Add support to AppGw Exception feature #27863

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yanivha6
Copy link

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

@Copilot Copilot AI review requested due to automatic review settings May 28, 2025 08:27
Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Add support for Application Gateway WAF Exceptions by introducing a new exception cmdlet and wiring it through models, help, exports, and tests.

  • Introduce New-AzApplicationGatewayFirewallPolicyException cmdlet and PS model
  • Extend managed rules cmdlets/models to accept exception entries
  • Update help files, module exports, changelog, and add scenario tests

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/Network/Network/help/New-AzApplicationGatewayFirewallPolicyManagedRule.md Added -Exception parameter to syntax and documented it
src/Network/Network/help/New-AzApplicationGatewayFirewallPolicyException.md Created help file for the new exception cmdlet
src/Network/Network/help/Az.Network.md Added reference to the new exception cmdlet
src/Network/Network/Models/PSApplicationGatewayFirewallPolicyManagedRules.cs Added Exceptions property to PS model
src/Network/Network/Models/PSApplicationGatewayFirewallPolicyException.cs Introduced PS model for exception entries
src/Network/Network/FirewallPolicy/ManagedRules/Exception/NewAzureApplicationGatewayFirewallPolicyExceptionCommand.cs Implemented the New-...Exception cmdlet
src/Network/Network/FirewallPolicy/ManagedRules/Exception/AzureApplicationGatewayFirewallPolicyException.cs Defined base parameters and logic for exceptions
src/Network/Network/FirewallPolicy/ManagedRules/AzureApplicationGatewayFirewallPolicyManagedRules.cs Added Exception parameter to managed rules cmdlet
src/Network/Network/ChangeLog.md Logged the new exception cmdlet
src/Network/Network/Az.Network.psd1 Exported the new exception cmdlet
src/Network/Network.Test/ScenarioTests/ApplicationGatewayTests.ps1 Added PowerShell scenario test for exceptions
src/Network/Network.Test/ScenarioTests/ApplicationGatewayTests.cs Added C# test harness for exception scenario
Comments suppressed due to low confidence (1)

src/Network/Network/FirewallPolicy/ManagedRules/AzureApplicationGatewayFirewallPolicyManagedRules.cs:40

  • Rename the Exception property to Exceptions (plural) to match the PS model property and make the API consistent.
public PSApplicationGatewayFirewallPolicyException[] Exception { get; set; }

Accept wildcard characters: False
```
### -ProgressAction
{{ Fill ProgressAction Description }}
Copy link
Preview

Copilot AI May 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace the placeholder with a proper description for the -ProgressAction parameter or remove it if not needed.

Suggested change
{{ Fill ProgressAction Description }}
Specifies how the cmdlet responds to progress updates. The parameter accepts values such as `Continue`, `SilentlyContinue`, `Stop`, or `Inquire`, which determine whether progress updates are displayed, suppressed, or trigger user interaction.

Copilot uses AI. Check for mistakes.

Accept pipeline input: False
Accept wildcard characters: False
```
### -Values
Copy link
Preview

Copilot AI May 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter is named -Value (singular) in the syntax and code; update this header to -Value to match.

Suggested change
### -Values
### -Value

Copilot uses AI. Check for mistakes.

@@ -15,7 +15,8 @@ Create ManagedRules for the firewall policy.
```
New-AzApplicationGatewayFirewallPolicyManagedRule
[-ManagedRuleSet <PSApplicationGatewayFirewallPolicyManagedRuleSet[]>]
[-Exclusion <PSApplicationGatewayFirewallPolicyExclusion[]>] [-DefaultProfile <IAzureContextContainer>]
[-Exclusion <PSApplicationGatewayFirewallPolicyExclusion[]>]
Copy link
Preview

Copilot AI May 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The -Exclusion parameter appears twice in the syntax line; remove the duplicate to avoid confusion.

Suggested change
[-Exclusion <PSApplicationGatewayFirewallPolicyExclusion[]>]
[-Exclusion <PSApplicationGatewayFirewallPolicyExclusion[]>]

Copilot uses AI. Check for mistakes.

```

## DESCRIPTION
The **New-AzApplicationGatewayFirewallPolicyException** cmdlet a new exception rule list for firewall policy.
Copy link
Preview

Copilot AI May 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The synopsis is missing a verb (e.g., "creates"); consider rephrasing to "Creates a new exception rule list for the firewall policy."

Suggested change
The **New-AzApplicationGatewayFirewallPolicyException** cmdlet a new exception rule list for firewall policy.
The **New-AzApplicationGatewayFirewallPolicyException** cmdlet creates a new exception rule list for the firewall policy.

Copilot uses AI. Check for mistakes.

@vidai-msft
Copy link
Contributor

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@yanivha6
Copy link
Author

/azp run

Copy link
Contributor

Commenter does not have sufficient privileges for PR 27863 in repo Azure/azure-powershell

@yanivha6 yanivha6 force-pushed the AppGw-Exceptions branch from cc49340 to 9e6fba7 Compare May 30, 2025 10:26
@yanivha6 yanivha6 changed the title Add support to AppGw Exception feature (#27539) Add support to AppGw Exception feature May 30, 2025
@vidai-msft
Copy link
Contributor

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants