Skip to content

{Network} az network application-gateway advanced-routing-map/advanced-routing-set: Add new command groups to support advanced routing - #34198

Merged
Ethan Yang (necusjz) merged 4 commits into
Azure:devfrom
huiii99:network-ag-advance-routing-34139
Oct 16, 2026
Merged

Ethan Yang (necusjz) merged 4 commits into
Azure:devfrom
huiii99:network-ag-advance-routing-34139

Conversation

@huiii99

@huiii99 Jian Hui (huiii99) commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

🤖 PR Validation — ⚠️ Review suggested

Breaking Changes Tests
⚠️ None ️✔️ 130/130
⚠️AzureCLI-BreakingChangeTest
⚠️network
rule cmd_name rule_message suggest_message
⚠️ 1011 - SubgroupAdd network application-gateway advanced-routing-map sub group network application-gateway advanced-routing-map added
⚠️ 1011 - SubgroupAdd network application-gateway advanced-routing-set sub group network application-gateway advanced-routing-set added
⚠️ 1010 - ParaPropUpdate network application-gateway routing-rule create cmd network application-gateway routing-rule create update parameter rule_type: updated property choices from ['Basic', 'PathBasedRouting'] to ['AdvancedRouting', 'Basic', 'PathBasedRouting']
⚠️ 1010 - ParaPropUpdate network application-gateway routing-rule update cmd network application-gateway routing-rule update update parameter rule_type: updated property choices from ['Basic', 'PathBasedRouting'] to ['AdvancedRouting', 'Basic', 'PathBasedRouting']
⚠️ 1006 - ParaAdd network application-gateway rule create cmd network application-gateway rule create added parameter advanced_routing_map
⚠️ 1006 - ParaAdd network application-gateway rule create cmd network application-gateway rule create added parameter auth_configs
⚠️ 1010 - ParaPropUpdate network application-gateway rule create cmd network application-gateway rule create update parameter rule_type: updated property choices from ['Basic', 'PathBasedRouting'] to ['AdvancedRouting', 'Basic', 'PathBasedRouting']
⚠️ 1006 - ParaAdd network application-gateway rule update cmd network application-gateway rule update added parameter advanced_routing_map
⚠️ 1006 - ParaAdd network application-gateway rule update cmd network application-gateway rule update added parameter auth_configs
⚠️ 1010 - ParaPropUpdate network application-gateway rule update cmd network application-gateway rule update update parameter rule_type: updated property choices from ['Basic', 'PathBasedRouting'] to ['AdvancedRouting', 'Basic', 'PathBasedRouting']
⚠️ 1006 - ParaAdd network application-gateway update cmd network application-gateway update added parameter reserved_capacity
⚠️ 1010 - ParaPropUpdate network application-gateway update cmd network application-gateway update update parameter sku: updated property choices from ['Basic', 'Standard_Large', 'Standard_Medium', 'Standard_Small', 'Standard_v2', 'WAF_Large', 'WAF_Medium', 'WAF_v2'] to ['Basic', 'Basic_WAF_v2', 'Basic_v2', 'Standard_Large', 'Standard_Medium', 'Standard_Small', 'Standard_v2', 'WAF_Large', 'WAF_Medium', 'WAF_v2']

Related command
az network application-gateway advanced-routing-set
az network application-gateway advanced-routing-map
az network application-gateway rule create/update

Description
Resolves #34139. The generated code comes from Azure/aaz#1116.

  • Upgrades az network application-gateway to API version 2026-01-01.
  • Adds the command groups advanced-routing-set (with a nested condition group) and advanced-routing-map (with a nested rule group).
  • advanced-routing-map create takes the map's first rule inline, because the service requires every map to have at least one rule.
  • rule create/update: adds --advanced-routing-map, used with --rule-type AdvancedRouting.

Testing Guide

az network application-gateway advanced-routing-set create -g MyResourceGroup --gateway-name MyAppGateway -n cs1 --routing-conditions "[{condition-type:Header,property-name:x-env,property-values:[canary]}]"
az network application-gateway advanced-routing-map create -g MyResourceGroup --gateway-name MyAppGateway -n map1 --default-address-pool MyPool --default-http-settings MySettings --rule-name r1 --priority 10 --condition-set cs1 --address-pool MyPool --http-settings MySettings
az network application-gateway rule create -g MyResourceGroup --gateway-name MyAppGateway -n rule2 --http-listener MyListener --rule-type AdvancedRouting --advanced-routing-map map1 --priority 200

New scenario test: test_network_ag_advanced_routing.

History Notes
[Network] az network application-gateway advanced-routing-set/advanced-routing-map: Add new command groups to support advanced routing
[Network] az network application-gateway rule create/update: Add --advanced-routing-map and --auth-configs parameters
[Network] az network application-gateway update: Add --reserved-capacity parameter


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

@yonzhan

Copy link
Copy Markdown
Collaborator

Network

@huiii99
Jian Hui (huiii99) marked this pull request as ready for review October 9, 2026 07:08
@huiii99
Jian Hui (huiii99) requested review from a team as code owners October 9, 2026 07:08
Copilot AI balanced review requested due to automatic review settings October 9, 2026 07:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new auth-config create/update and reserved-capacity update paths lack automated coverage.

1 open finding
What changed in this PR

Implements Application Gateway advanced routing for #34139 using API version 2026-01-01.

Changes:

  • Adds condition-set, routing-map, and nested rule commands.
  • Supports advanced routing maps and authentication configs on request-routing rules.
  • Updates generated AAZ commands, scenario coverage, recordings, and linter exclusions.
File Description
linter_exclusions.yml Adds exclusions for long routing-map options.
network/​commands.py Registers customized advanced-routing-map commands.
network/​custom.py Adds resource-ID formatting and first-rule orchestration.
network/​aaz/​latest/​network/​application_gateway/​** Upgrades generated commands to API 2026-01-01 and adds advanced-routing models.
network/​tests/​latest/​test_network_commands.py Adds the advanced-routing scenario.
network/​tests/​latest/​test_network_unit_tests.py Updates the expected API version.
network/​tests/​latest/​recordings/​** Updates and adds Application Gateway recordings.
monitor/​tests/​latest/​recordings/​test_metric_alert_special_char_scenario.yaml Updates the dependent Application Gateway API version.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +230 to +235
_args_schema.reserved_capacity = AAZIntArg(
options=["--reserved-capacity"],
arg_group="Properties",
help="The reserved capacity of the application gateway resource. Applicable to the Basic_v2 and Basic_WAF_v2 SKU tiers.",
nullable=True,
)
@necusjz

Copy link
Copy Markdown
Member

can we refine the following interface,

Adds the command groups advanced-routing-condition-set (with a nested condition group) and advanced-routing-map (with a nested rule group).

seems,
az network application-gateway advanced-routing-set, with a nested condition group
az network application-gateway advanced-routing-map, with a nexted rule group

more elegant.

@huiii99 Jian Hui (huiii99) changed the title [Network] az network application-gateway advanced-routing-map/advanced-routing-condition-set: Add new command groups to support advanced routing [Network] az network application-gateway advanced-routing-map/advanced-routing-set: Add new command groups to support advanced routing Oct 15, 2026
@necusjz Ethan Yang (necusjz) changed the title [Network] az network application-gateway advanced-routing-map/advanced-routing-set: Add new command groups to support advanced routing {Network} az network application-gateway advanced-routing-map/advanced-routing-set: Add new command groups to support advanced routing Oct 15, 2026
@necusjz
Ethan Yang (necusjz) merged commit b799e5b into Azure:dev Oct 16, 2026
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

act-quality-productivity-squad Auto-Assign Auto assign by bot Network az network vnet/lb/nic/dns/etc...

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add Azure Application Gateway's Advanced Routing Models and Commands

5 participants