Skip to content

Azure Traffic Manager: Update Traffic Manager CLI commands to correspond to 2024-04-01-preview API#33503

Open
ransinha1989 wants to merge 5 commits into
Azure:devfrom
ransinha1989:feature-tm-preview-update
Open

Azure Traffic Manager: Update Traffic Manager CLI commands to correspond to 2024-04-01-preview API#33503
ransinha1989 wants to merge 5 commits into
Azure:devfrom
ransinha1989:feature-tm-preview-update

Conversation

@ransinha1989
Copy link
Copy Markdown
Member

@ransinha1989 ransinha1989 commented Jun 5, 2026

Related command

az network traffic-manager profile create -g MyResourceGroup -n MyTmProfile --routing-method Priority --unique-dns-name myapp123 --record-type A

Description
Updated to the new API version - 2024-04-01-preview

  • Added record-type in the traffic manager profile properties.
  • Also, we were missing some of the other functionalities, like heatmap and checktrafficmanagernameavailabilityv2.

Testing Guide

  • az network traffic-manager profile update -g MyResourceGroup -n MyTmProfile --record-type AAAA
  • az network traffic-manager profile create -g MyResourceGroup -n MyTmProfile --routing-method Priority --unique-dns-name myapp123 --record-type A
    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 June 5, 2026 19:33
@azure-client-tools-bot-prd
Copy link
Copy Markdown

Validation for Azure CLI Full Test Starting...

Thanks for your contribution!

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

Validation for Breaking Change Starting...

Thanks for your contribution!

Copy link
Copy Markdown
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

Note

Copilot was unable to run its full agentic suite in this review.

This PR updates Azure CLI Network Traffic Manager support to the 2024-04-01-preview API surface, adds --record-type support for Traffic Manager profiles, and introduces new AAZ-generated Traffic Manager commands (heat map, user metrics key, check-dns-v2), along with scenario tests/recordings for the new record-type behavior.

Changes:

  • Add scenario tests + recordings validating --record-type on Traffic Manager profile create/show/list and update flows.
  • Extend legacy custom wrappers and parameter definitions to accept record_type.
  • Regenerate/introduce AAZ commands for Traffic Manager (profiles/endpoints) using 2024-04-01-preview, plus new command groups (heat-map, user-metrics-key, check-dns-v2).

Reviewed changes

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

Show a summary per file
File Description
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py Adds scenario coverage for Traffic Manager profile recordType create and update flows.
src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_network_traffic_manager_subnet_routing.yaml Updates recorded Traffic Manager calls to 2024-04-01-preview.
src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_network_traffic_manager_record_type_update.yaml Adds new recording for record-type update scenario.
src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_network_traffic_manager_record_type.yaml Adds new recording for record-type create/show/list scenario.
src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_network_traffic_manager_always_serve.yaml Updates recorded Traffic Manager calls to 2024-04-01-preview.
src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_network_traffic_manager2.yaml Updates recorded Traffic Manager calls to 2024-04-01-preview.
src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_network_traffic_manager.yaml Updates recorded Traffic Manager calls to 2024-04-01-preview.
src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_dns_tmlink.yaml Updates recorded Traffic Manager calls to 2024-04-01-preview.
src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_dns_alias.yaml Updates recorded Traffic Manager calls to 2024-04-01-preview.
src/azure-cli/azure/cli/command_modules/network/custom.py Adds record_type parameter support in Traffic Manager profile create/update wrappers.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/user_metrics_key/_show.py New AAZ command: show Traffic Manager user-metrics-key.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/user_metrics_key/_delete.py New AAZ command: delete Traffic Manager user-metrics-key.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/user_metrics_key/_create.py New AAZ command: create Traffic Manager user-metrics-key.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/user_metrics_key/init.py Exposes new user-metrics-key command group.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/user_metrics_key/__cmd_group.py Registers network traffic-manager user-metrics-key command group.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/profile/heat_map/_show.py New AAZ command: show Traffic Manager profile heat map.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/profile/heat_map/init.py Exposes new heat-map command group.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/profile/heat_map/__cmd_group.py Registers network traffic-manager profile heat-map command group.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/profile/_update.py Moves profile update to 2024-04-01-preview and adds --record-type wiring.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/profile/_show.py Moves profile show to 2024-04-01-preview and returns recordType.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/profile/_list.py Moves profile list to 2024-04-01-preview and returns recordType.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/profile/_delete.py Moves profile delete to 2024-04-01-preview and changes output behavior.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/profile/_create.py Moves profile create to 2024-04-01-preview and adds --record-type wiring.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/profile/_check_dns_v2.py New AAZ command: check-dns-v2 using 2024-04-01-preview.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/profile/_check_dns.py Moves profile check-dns to 2024-04-01-preview.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/profile/init.py Exposes new check-dns-v2 command.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/endpoint/_update.py Moves endpoint update to 2024-04-01-preview.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/endpoint/_show_geographic_hierarchy.py Moves geographic hierarchy show to 2024-04-01-preview.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/endpoint/_show.py Moves endpoint show to 2024-04-01-preview.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/endpoint/_delete.py Moves endpoint delete to 2024-04-01-preview and changes output behavior.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/traffic_manager/endpoint/_create.py Moves endpoint create to 2024-04-01-preview.
src/azure-cli/azure/cli/command_modules/network/_params.py Adds record_type arg for Traffic Manager profile commands.
Comments suppressed due to low confidence (2)

src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:1

  • The create checks use the JMESPath TrafficManagerProfile.recordType, but the subsequent show/list checks use recordType. If the command output does not include the TrafficManagerProfile wrapper, this assertion will fail. Align the create assertions to the actual output shape (likely recordType, consistent with show/list), so the test validates the same contract across commands.
    src/azure-cli/azure/cli/command_modules/network/custom.py:1
  • In create_traffic_manager_profile, record_type is always included in args even when it is None, while update_traffic_manager_profile adds it conditionally. For consistency and to avoid accidentally sending a null/explicit value through the AAZ pipeline, add record_type to args only when it is not None (same pattern as update).
# --------------------------------------------------------------------------------------------

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

Comment thread src/azure-cli/azure/cli/command_modules/network/custom.py
@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Jun 6, 2026

network

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.

4 participants