Skip to content

Conversation

@riddhinilawar
Copy link
Contributor

@riddhinilawar riddhinilawar commented Dec 2, 2025

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-FlowLog

Description

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:
image

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"

image

az network watcher flow-log show --location centraluseuap --name recordtype-FlowLog

image

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"

image

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 feature


This checklist is used to make sure that common guidelines for a pull request are followed.

Copilot AI review requested due to automatic review settings December 2, 2025 09:03
@azure-client-tools-bot-prd
Copy link

Validation for Azure CLI Full Test Starting...

Thanks for your contribution!

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

Validation for Breaking Change Starting...

Thanks for your contribution!

@yonzhan
Copy link
Collaborator

yonzhan commented Dec 2, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

github-actions bot commented Dec 2, 2025

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
Contributor

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

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-types parameter 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.

riddhinilawar and others added 2 commits December 2, 2025 16:03
…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>
@riddhinilawar
Copy link
Contributor Author

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link
Contributor

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

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.

riddhinilawar and others added 3 commits December 3, 2025 13:20
…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>
riddhinilawar and others added 2 commits December 3, 2025 13:26
…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>
@riddhinilawar riddhinilawar marked this pull request as draft December 3, 2025 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot Portal az portal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants