Skip to content

Powershell Ddos custom policy cmdlets#29387

Open
venkatasaimaram7 wants to merge 5 commits intoAzure:release-network-2025-07-01from
venkatasaimaram7:ddos-custom-policy-cmdlets
Open

Powershell Ddos custom policy cmdlets#29387
venkatasaimaram7 wants to merge 5 commits intoAzure:release-network-2025-07-01from
venkatasaimaram7:ddos-custom-policy-cmdlets

Conversation

@venkatasaimaram7
Copy link
Copy Markdown
Member

@venkatasaimaram7 venkatasaimaram7 commented Apr 9, 2026

Description

Add comprehensive DDoS Custom Policy management cmdlets to Azure PowerShell. These cmdlets enable users to create, retrieve, update, and delete DDoS custom protection policies with detection rules for threat mitigation.

Cmdlets Added:

  • New-AzDdosCustomPolicy - Create a new DDoS custom policy
  • Get-AzDdosCustomPolicy - Retrieve DDoS custom policies
  • Set-AzDdosCustomPolicy - Update existing DDoS custom policies
  • Remove-AzDdosCustomPolicy - Delete DDoS custom policies
  • New-AzDdosCustomPolicyDetectionRule - Create detection rule configurations
  • Add-AzDdosCustomPolicyDetectionRule - Add rules to policies
  • Remove-AzDdosCustomPolicyDetectionRule - Remove rules from policies

Features:

  • Full CRUD operations for DDoS custom policies
  • In-memory modification workflow (Add/Remove, then Set to persist)
  • Detection rule object construction and policy rule management
  • Complete markdown help documentation

Validation:

  • Scenario tests (full DDoS suite): Passed 20/20
  • Session records committed for all recordable DDoS scenario tests (`20 tests)

Validation Doc
-DCP_cmdlets_E2E_Validation.docx

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Updated src/Network/Network/ChangeLog.md with DDoS Custom Policy feature notes
  • SHOULD regenerate markdown help files if there is cmdlet API change
    • Generated markdown help files for all new cmdlets
  • SHOULD have proper test coverage for changes in pull request
    • Added comprehensive scenario tests covering:
      • CRUD operations
      • Detection rule management
      • In-memory mutation workflow
      • Validation/error behavior
  • SHOULD NOT adjust version of module manually in pull request
    • Version not adjusted manually

@azure-client-tools-bot-prd
Copy link
Copy Markdown

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

@venkatasaimaram7 venkatasaimaram7 force-pushed the ddos-custom-policy-cmdlets branch from 49b565d to 55a7001 Compare April 9, 2026 22:03
@VeryEarly
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Comment thread src/Network/Network/DdosCustomPolicy/DdosCustomPolicyDetectionRuleValidator.cs Outdated
@VeryEarly VeryEarly self-assigned this Apr 10, 2026
@venkatasaimaram7 venkatasaimaram7 force-pushed the ddos-custom-policy-cmdlets branch 4 times, most recently from f875aa4 to a13d882 Compare April 10, 2026 18:23
- New cmdlets: New-AzDdosCustomPolicy, Get-AzDdosCustomPolicy, Set-AzDdosCustomPolicy, Remove-AzDdosCustomPolicy
- New cmdlets: New-AzDdosCustomPolicyDetectionRule, Add-AzDdosCustomPolicyDetectionRule, Remove-AzDdosCustomPolicyDetectionRule
- Models: PSDdosCustomPolicy and PSDdosCustomPolicyDetectionRule
- Validation: DdosCustomPolicyDetectionRuleValidator for threshold rules
- Help: Complete markdown documentation for all cmdlets
- Tests: Comprehensive scenario tests for CRUD operations and validation
- Updated module manifest and resource mappings
@venkatasaimaram7 venkatasaimaram7 force-pushed the ddos-custom-policy-cmdlets branch from a13d882 to 2504094 Compare April 10, 2026 18:27
@VeryEarly
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@VeryEarly
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@venkatasaimaram7
Copy link
Copy Markdown
Member Author

as i see those checks are failing not because of my changes

@venkatasaimaram7
Copy link
Copy Markdown
Member Author

I investigated the failing checks on this PR and validated the DDoS custom policy changes separately.

What I validated:

DDoS custom policy tests pass in live run: Failed 0, Passed 20, Skipped 0, Total 20.
The failing CI jobs are from the full Az.Network test leg, which includes many unrelated scenario suites.
The failures are in pre-existing/non-DDoS areas (for example ApplicationGateway, LoadBalancer, AzureFirewall, NetworkWatcher, VirtualNetwork, VirtualNetworkGateway, Cortex), not in the DdosCustomPolicy scenarios touched by this PR.
Conclusion:

The current check failures are not caused by this PR’s DDoS custom policy cmdlet changes.
This PR is currently blocked by broader Az.Network test instability outside the changed scope.
Request:

Please review this PR based on the scoped DDoS validation and treat the current CI failures as unrelated/pre-existing for this change.

@VeryEarly
Copy link
Copy Markdown
Collaborator

I investigated the failing checks on this PR and validated the DDoS custom policy changes separately.

What I validated:

DDoS custom policy tests pass in live run: Failed 0, Passed 20, Skipped 0, Total 20. The failing CI jobs are from the full Az.Network test leg, which includes many unrelated scenario suites. The failures are in pre-existing/non-DDoS areas (for example ApplicationGateway, LoadBalancer, AzureFirewall, NetworkWatcher, VirtualNetwork, VirtualNetworkGateway, Cortex), not in the DdosCustomPolicy scenarios touched by this PR. Conclusion:

The current check failures are not caused by this PR’s DDoS custom policy cmdlet changes. This PR is currently blocked by broader Az.Network test instability outside the changed scope. Request:

Please review this PR based on the scoped DDoS validation and treat the current CI failures as unrelated/pre-existing for this change.

Hi failed test case was introduced by this PR:
image

Venkata M added 3 commits April 14, 2026 19:17
- 17 tests have fresh session recordings from live Azure API calls
- Replaces broken 403 authorization error recordings with valid responses
- Tests now pass in playback mode for check-in validation
- 3 detection rule tests remain as LiveOnly (no recordings created)
…n recordings

- DdosCustomPolicyTests: Change all 20 tests from LiveOnly to CheckIn
- Session Recordings: 17 updated + 3 newly created with fresh recordings
@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines:
4 pipeline(s) require an authorized user to comment /azp run to run.

@VeryEarly
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines:
Successfully started running 3 pipeline(s).

@venkatasaimaram7
Copy link
Copy Markdown
Member Author

@VeryEarly
all checks are passing, please do review.

@venkatasaimaram7
Copy link
Copy Markdown
Member Author

venkatasaimaram7 commented Apr 17, 2026

all checks are passing, please do review and approve this pr

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.

3 participants