-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Feature recordtype flowlog changes #32484
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
base: dev
Are you sure you want to change the base?
Conversation
|
Validation for Azure CLI Full Test Starting...
Thanks for your contribution! |
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for the record-types field to Azure Network Watcher flow log resources, enabling filtering of network traffic logs based on flow states (Begin, Continue, End, Deny). The implementation updates the API version from 2024-03-01 to 2025-03-01 and adds the new field to create, update, show, and wait operations.
- Added
--record-typesparameter to flow log create and update commands with comprehensive help documentation - Updated API version to 2025-03-01 across all flow log operations
- Added unit test for the new record-types feature
- Extended schema definitions to support identity objects for managed identity scenarios
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test_nw_flow_log.py | Adds new unit test for flow log creation with record-types filtering |
| _create.py | Adds record-types argument schema and API version update to 2025-03-01 |
| _update.py | Adds record-types argument schema for updates and API version update |
| _show.py | Updates response schema to include record_types field and identity object |
| _wait.py | Updates response schema to include record_types field and identity object |
| _delete.py | Updates API version to 2025-03-01 for consistency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_nw_flow_log.py
Outdated
Show resolved
Hide resolved
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_nw_flow_log.py
Outdated
Show resolved
Hide resolved
…est_nw_flow_log.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…est_nw_flow_log.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot open a new pull request to apply changes based on the comments in this thread |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_nw_flow_log.py
Outdated
Show resolved
Hide resolved
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/watcher/flow_log/_create.py
Outdated
Show resolved
Hide resolved
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/watcher/flow_log/_update.py
Outdated
Show resolved
Hide resolved
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/watcher/flow_log/_update.py
Outdated
Show resolved
Hide resolved
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_nw_flow_log.py
Show resolved
Hide resolved
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/watcher/flow_log/_create.py
Outdated
Show resolved
Hide resolved
…work/watcher/flow_log/_create.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…est_nw_flow_log.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…work/watcher/flow_log/_update.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…work/watcher/flow_log/_create.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…work/watcher/flow_log/_update.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Related command
az network watcher flow-log create --location centraluseuap --resource-group riddhi_rg3 --name recordtype-FlowLog --vnet vnet-centraluseuap --storage-account riddhicentraluseuap --record-types "B,E"az network watcher flow-log update --location centraluseuap --resource-group riddhi_rg3 --name recordtype-FlowLog --vnet vnet-centraluseuap --storage-account riddhicentraluseuap --record-types "B,C"az network watcher flow-log show --location centraluseuap --name recordtype-FlowLogDescription
This PR introduces a new optional field, "record-types," for the creation and update of the Flowlogs resource. Necessary validations for this field have already been implemented in NRP. Unit tests for this feature have been added as part of this PR.
Additionally, screenshots of the testing performed, beyond unit tests, are included below.
Testing Guide
Help command shows the new field and its proper explanation:

az network watcher flow-log create --location centraluseuap --resource-group riddhi_rg3 --name recordtype-FlowLog --vnet vnet-centraluseuap --storage-account riddhicentraluseuap --record-types "B,E"az network watcher flow-log show --location centraluseuap --name recordtype-FlowLogaz network watcher flow-log update --location centraluseuap --resource-group riddhi_rg3 --name recordtype-FlowLog --vnet vnet-centraluseuap --storage-account riddhicentraluseuap --record-types "B,C"History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.