Skip to content

Conversation

@riddhinilawar
Copy link
Contributor

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.

Riddhi Nilawar and others added 4 commits December 3, 2025 13:39
…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 AI review requested due to automatic review settings December 3, 2025 08:12
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Dec 3, 2025

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

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

azure-client-tools-bot-prd bot commented Dec 3, 2025

⚠️AzureCLI-BreakingChangeTest
⚠️network
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd network watcher flow-log create cmd network watcher flow-log create added parameter record_types
⚠️ 1006 - ParaAdd network watcher flow-log update cmd network watcher flow-log update added parameter record_types

@yonzhan
Copy link
Collaborator

yonzhan commented Dec 3, 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 3, 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 parameter to Azure CLI's flow log commands, allowing users to filter network traffic logs based on flow states (Begin, Continue, End, Deny). The feature is implemented by updating the API version from 2024-03-01 to 2025-03-01 across multiple flow log command files.

  • Added --record-types parameter to flow-log create and flow-log update commands
  • Updated API version to 2025-03-01 for create, update, show, delete, and wait operations
  • Added unit test for flow log creation with record-types filtering

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
test_nw_flow_log.py Adds test case test_nw_flow_log_create_vnetfl_with_record_types to verify flow log creation with record-types parameter
_create.py Adds --record-types parameter, updates API version to 2025-03-01, includes identity schema enhancements, and adds example for record-types usage
_update.py Adds --record-types parameter to update command, updates API version to 2025-03-01, and adds example for record-types usage
_show.py Updates API version to 2025-03-01, adds record_types field to response schema, and includes identity schema enhancements
_delete.py Updates API version to 2025-03-01 for consistency with other flow log commands
_wait.py Updates API version to 2025-03-01, adds record_types field and identity schema enhancements to response schema

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

riddhinilawar and others added 2 commits December 3, 2025 14:21
…est_nw_flow_log.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@necusjz
Copy link
Member

necusjz commented Dec 4, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@riddhinilawar riddhinilawar changed the title Feature recordtypes parameters support in flowlog {cli} Changes for adding an optional field for RecordTypes Filtering to Azure Cli commands for flow logs resource creation and updation Dec 5, 2025
@necusjz necusjz changed the title {cli} Changes for adding an optional field for RecordTypes Filtering to Azure Cli commands for flow logs resource creation and updation [Network] az network watcher flow-log: Add --record-types parameter Dec 8, 2025
@necusjz
Copy link
Member

necusjz commented Dec 8, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@riddhinilawar
Copy link
Contributor Author

Azure/aaz#911
AAZ repo changes. Request to approve this too.

@necusjz necusjz merged commit 104cb2e into Azure:dev Dec 8, 2025
48 checks passed
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