Skip to content

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

Open
Jian Hui (huiii99) wants to merge 2 commits into
Azure:devfrom
huiii99:network-ag-advance-routing-34139
Open

Jian Hui (huiii99) wants to merge 2 commits into
Azure:devfrom
huiii99:network-ag-advance-routing-34139

Conversation

@huiii99

Copy link
Copy Markdown
Member

Related command
az network application-gateway advanced-routing-condition-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-condition-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-condition-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-condition-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
[Network] az network application-gateway update: Add --reserved-capacity


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,
)

This branch has not been deployed

No deployments
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

4 participants