Skip to content

Commit 9f72ba8

Browse files
author
JingnanXu
committed
Upgrade front-door WAF policy commands to API version 2025-11-01
- Updated AAZ-generated code for waf-policy create/delete/list/show/update/wait - Updated managed-rule-definition list - New enum values: JA4 (MatchVariable), AsnMatch/ClientFingerprint (Operator) - New ManagedRuleSetException model with exceptionsList support - LRO final-state-via changed from azure-async-operation to location - Updated test recordings
1 parent a7886ca commit 9f72ba8

16 files changed

Lines changed: 1622 additions & 993 deletions

File tree

src/front-door/HISTORY.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
Release History
44
===============
55

6+
2.2.0
7+
++++++
8+
* Bump swagger version to 2025-11-01
9+
* Add new `JA4` match variable and `AsnMatch`/`ClientFingerprint` operators
10+
* Add `ManagedRuleSetException` support with `exceptionsList` in managed rules
11+
* Add subscription-level WAF policy list
12+
* LRO polling changed from azure-async-operation to location
13+
614
2.1.0
715
++++++
816
* Add `--sensitivity` parameter to `az network front-door waf-policy managed-rules override add` for DDoS rule set support.

src/front-door/azext_front_door/aaz/latest/network/front_door/waf_policy/_create.py

Lines changed: 222 additions & 17 deletions
Large diffs are not rendered by default.

src/front-door/azext_front_door/aaz/latest/network/front_door/waf_policy/_delete.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class Delete(AAZCommand):
2222
"""
2323

2424
_aaz_info = {
25-
"version": "2025-10-01",
25+
"version": "2025-11-01",
2626
"resources": [
27-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/frontdoorwebapplicationfirewallpolicies/{}", "2025-10-01"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/frontdoorwebapplicationfirewallpolicies/{}", "2025-11-01"],
2828
]
2929
}
3030

@@ -84,7 +84,7 @@ def __call__(self, *args, **kwargs):
8484
session,
8585
self.on_200,
8686
self.on_error,
87-
lro_options={"final-state-via": "azure-async-operation"},
87+
lro_options={"final-state-via": "location"},
8888
path_format_arguments=self.url_parameters,
8989
)
9090
if session.http_response.status_code in [200]:
@@ -93,7 +93,7 @@ def __call__(self, *args, **kwargs):
9393
session,
9494
self.on_200,
9595
self.on_error,
96-
lro_options={"final-state-via": "azure-async-operation"},
96+
lro_options={"final-state-via": "location"},
9797
path_format_arguments=self.url_parameters,
9898
)
9999
if session.http_response.status_code in [204]:
@@ -102,7 +102,7 @@ def __call__(self, *args, **kwargs):
102102
session,
103103
self.on_204,
104104
self.on_error,
105-
lro_options={"final-state-via": "azure-async-operation"},
105+
lro_options={"final-state-via": "location"},
106106
path_format_arguments=self.url_parameters,
107107
)
108108

@@ -121,7 +121,7 @@ def method(self):
121121

122122
@property
123123
def error_format(self):
124-
return "MgmtErrorFormat"
124+
return "ODataV4Format"
125125

126126
@property
127127
def url_parameters(self):
@@ -145,7 +145,7 @@ def url_parameters(self):
145145
def query_parameters(self):
146146
parameters = {
147147
**self.serialize_query_param(
148-
"api-version", "2025-10-01",
148+
"api-version", "2025-11-01",
149149
required=True,
150150
),
151151
}

src/front-door/azext_front_door/aaz/latest/network/front_door/waf_policy/_list.py

Lines changed: 77 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class List(AAZCommand):
2222
"""
2323

2424
_aaz_info = {
25-
"version": "2025-10-01",
25+
"version": "2025-11-01",
2626
"resources": [
27-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/frontdoorwebapplicationfirewallpolicies", "2025-10-01"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/frontdoorwebapplicationfirewallpolicies", "2025-11-01"],
2828
]
2929
}
3030

@@ -82,7 +82,7 @@ def __call__(self, *args, **kwargs):
8282
@property
8383
def url(self):
8484
return self.client.format_url(
85-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies",
85+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies",
8686
**self.url_parameters
8787
)
8888

@@ -112,7 +112,7 @@ def url_parameters(self):
112112
def query_parameters(self):
113113
parameters = {
114114
**self.serialize_query_param(
115-
"api-version", "2025-10-01",
115+
"api-version", "2025-11-01",
116116
required=True,
117117
),
118118
}
@@ -276,18 +276,86 @@ def _build_schema_on_200(cls):
276276
transforms.Element = AAZStrType()
277277

278278
frontend_endpoint_links = cls._schema_on_200.value.Element.properties.frontend_endpoint_links
279-
frontend_endpoint_links.Element = AAZObjectType(
280-
flags={"read_only": True},
281-
)
279+
frontend_endpoint_links.Element = AAZObjectType()
282280

283281
_element = cls._schema_on_200.value.Element.properties.frontend_endpoint_links.Element
284282
_element.id = AAZStrType()
285283

286284
managed_rules = cls._schema_on_200.value.Element.properties.managed_rules
285+
managed_rules.exceptions_list = AAZObjectType(
286+
serialized_name="exceptionsList",
287+
)
287288
managed_rules.managed_rule_sets = AAZListType(
288289
serialized_name="managedRuleSets",
289290
)
290291

292+
exceptions_list = cls._schema_on_200.value.Element.properties.managed_rules.exceptions_list
293+
exceptions_list.exceptions = AAZListType()
294+
295+
exceptions = cls._schema_on_200.value.Element.properties.managed_rules.exceptions_list.exceptions
296+
exceptions.Element = AAZObjectType()
297+
298+
_element = cls._schema_on_200.value.Element.properties.managed_rules.exceptions_list.exceptions.Element
299+
_element.match_values = AAZListType(
300+
serialized_name="matchValues",
301+
flags={"required": True},
302+
)
303+
_element.match_variable = AAZStrType(
304+
serialized_name="matchVariable",
305+
flags={"required": True},
306+
)
307+
_element.scopes = AAZListType(
308+
flags={"required": True},
309+
)
310+
_element.selector = AAZStrType()
311+
_element.selector_match_operator = AAZStrType(
312+
serialized_name="selectorMatchOperator",
313+
)
314+
_element.value_match_operator = AAZStrType(
315+
serialized_name="valueMatchOperator",
316+
flags={"required": True},
317+
)
318+
319+
match_values = cls._schema_on_200.value.Element.properties.managed_rules.exceptions_list.exceptions.Element.match_values
320+
match_values.Element = AAZStrType()
321+
322+
scopes = cls._schema_on_200.value.Element.properties.managed_rules.exceptions_list.exceptions.Element.scopes
323+
scopes.Element = AAZObjectType()
324+
325+
_element = cls._schema_on_200.value.Element.properties.managed_rules.exceptions_list.exceptions.Element.scopes.Element
326+
_element.rule_group_scopes = AAZListType(
327+
serialized_name="ruleGroupScopes",
328+
)
329+
_element.rule_set_type = AAZStrType(
330+
serialized_name="ruleSetType",
331+
flags={"required": True},
332+
)
333+
_element.rule_set_version = AAZStrType(
334+
serialized_name="ruleSetVersion",
335+
flags={"required": True},
336+
)
337+
338+
rule_group_scopes = cls._schema_on_200.value.Element.properties.managed_rules.exceptions_list.exceptions.Element.scopes.Element.rule_group_scopes
339+
rule_group_scopes.Element = AAZObjectType()
340+
341+
_element = cls._schema_on_200.value.Element.properties.managed_rules.exceptions_list.exceptions.Element.scopes.Element.rule_group_scopes.Element
342+
_element.rule_group_name = AAZStrType(
343+
serialized_name="ruleGroupName",
344+
flags={"required": True},
345+
)
346+
_element.rule_scopes = AAZListType(
347+
serialized_name="ruleScopes",
348+
)
349+
350+
rule_scopes = cls._schema_on_200.value.Element.properties.managed_rules.exceptions_list.exceptions.Element.scopes.Element.rule_group_scopes.Element.rule_scopes
351+
rule_scopes.Element = AAZObjectType()
352+
353+
_element = cls._schema_on_200.value.Element.properties.managed_rules.exceptions_list.exceptions.Element.scopes.Element.rule_group_scopes.Element.rule_scopes.Element
354+
_element.rule_id = AAZStrType(
355+
serialized_name="ruleId",
356+
flags={"required": True},
357+
)
358+
291359
managed_rule_sets = cls._schema_on_200.value.Element.properties.managed_rules.managed_rule_sets
292360
managed_rule_sets.Element = AAZObjectType()
293361

@@ -396,17 +464,13 @@ def _build_schema_on_200(cls):
396464
_element.state = AAZStrType()
397465

398466
routing_rule_links = cls._schema_on_200.value.Element.properties.routing_rule_links
399-
routing_rule_links.Element = AAZObjectType(
400-
flags={"read_only": True},
401-
)
467+
routing_rule_links.Element = AAZObjectType()
402468

403469
_element = cls._schema_on_200.value.Element.properties.routing_rule_links.Element
404470
_element.id = AAZStrType()
405471

406472
security_policy_links = cls._schema_on_200.value.Element.properties.security_policy_links
407-
security_policy_links.Element = AAZObjectType(
408-
flags={"read_only": True},
409-
)
473+
security_policy_links.Element = AAZObjectType()
410474

411475
_element = cls._schema_on_200.value.Element.properties.security_policy_links.Element
412476
_element.id = AAZStrType()

src/front-door/azext_front_door/aaz/latest/network/front_door/waf_policy/_show.py

Lines changed: 76 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class Show(AAZCommand):
2222
"""
2323

2424
_aaz_info = {
25-
"version": "2025-10-01",
25+
"version": "2025-11-01",
2626
"resources": [
27-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/frontdoorwebapplicationfirewallpolicies/{}", "2025-10-01"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/frontdoorwebapplicationfirewallpolicies/{}", "2025-11-01"],
2828
]
2929
}
3030

@@ -123,7 +123,7 @@ def url_parameters(self):
123123
def query_parameters(self):
124124
parameters = {
125125
**self.serialize_query_param(
126-
"api-version", "2025-10-01",
126+
"api-version", "2025-11-01",
127127
required=True,
128128
),
129129
}
@@ -276,18 +276,86 @@ def _build_schema_on_200(cls):
276276
transforms.Element = AAZStrType()
277277

278278
frontend_endpoint_links = cls._schema_on_200.properties.frontend_endpoint_links
279-
frontend_endpoint_links.Element = AAZObjectType(
280-
flags={"read_only": True},
281-
)
279+
frontend_endpoint_links.Element = AAZObjectType()
282280

283281
_element = cls._schema_on_200.properties.frontend_endpoint_links.Element
284282
_element.id = AAZStrType()
285283

286284
managed_rules = cls._schema_on_200.properties.managed_rules
285+
managed_rules.exceptions_list = AAZObjectType(
286+
serialized_name="exceptionsList",
287+
)
287288
managed_rules.managed_rule_sets = AAZListType(
288289
serialized_name="managedRuleSets",
289290
)
290291

292+
exceptions_list = cls._schema_on_200.properties.managed_rules.exceptions_list
293+
exceptions_list.exceptions = AAZListType()
294+
295+
exceptions = cls._schema_on_200.properties.managed_rules.exceptions_list.exceptions
296+
exceptions.Element = AAZObjectType()
297+
298+
_element = cls._schema_on_200.properties.managed_rules.exceptions_list.exceptions.Element
299+
_element.match_values = AAZListType(
300+
serialized_name="matchValues",
301+
flags={"required": True},
302+
)
303+
_element.match_variable = AAZStrType(
304+
serialized_name="matchVariable",
305+
flags={"required": True},
306+
)
307+
_element.scopes = AAZListType(
308+
flags={"required": True},
309+
)
310+
_element.selector = AAZStrType()
311+
_element.selector_match_operator = AAZStrType(
312+
serialized_name="selectorMatchOperator",
313+
)
314+
_element.value_match_operator = AAZStrType(
315+
serialized_name="valueMatchOperator",
316+
flags={"required": True},
317+
)
318+
319+
match_values = cls._schema_on_200.properties.managed_rules.exceptions_list.exceptions.Element.match_values
320+
match_values.Element = AAZStrType()
321+
322+
scopes = cls._schema_on_200.properties.managed_rules.exceptions_list.exceptions.Element.scopes
323+
scopes.Element = AAZObjectType()
324+
325+
_element = cls._schema_on_200.properties.managed_rules.exceptions_list.exceptions.Element.scopes.Element
326+
_element.rule_group_scopes = AAZListType(
327+
serialized_name="ruleGroupScopes",
328+
)
329+
_element.rule_set_type = AAZStrType(
330+
serialized_name="ruleSetType",
331+
flags={"required": True},
332+
)
333+
_element.rule_set_version = AAZStrType(
334+
serialized_name="ruleSetVersion",
335+
flags={"required": True},
336+
)
337+
338+
rule_group_scopes = cls._schema_on_200.properties.managed_rules.exceptions_list.exceptions.Element.scopes.Element.rule_group_scopes
339+
rule_group_scopes.Element = AAZObjectType()
340+
341+
_element = cls._schema_on_200.properties.managed_rules.exceptions_list.exceptions.Element.scopes.Element.rule_group_scopes.Element
342+
_element.rule_group_name = AAZStrType(
343+
serialized_name="ruleGroupName",
344+
flags={"required": True},
345+
)
346+
_element.rule_scopes = AAZListType(
347+
serialized_name="ruleScopes",
348+
)
349+
350+
rule_scopes = cls._schema_on_200.properties.managed_rules.exceptions_list.exceptions.Element.scopes.Element.rule_group_scopes.Element.rule_scopes
351+
rule_scopes.Element = AAZObjectType()
352+
353+
_element = cls._schema_on_200.properties.managed_rules.exceptions_list.exceptions.Element.scopes.Element.rule_group_scopes.Element.rule_scopes.Element
354+
_element.rule_id = AAZStrType(
355+
serialized_name="ruleId",
356+
flags={"required": True},
357+
)
358+
291359
managed_rule_sets = cls._schema_on_200.properties.managed_rules.managed_rule_sets
292360
managed_rule_sets.Element = AAZObjectType()
293361

@@ -396,17 +464,13 @@ def _build_schema_on_200(cls):
396464
_element.state = AAZStrType()
397465

398466
routing_rule_links = cls._schema_on_200.properties.routing_rule_links
399-
routing_rule_links.Element = AAZObjectType(
400-
flags={"read_only": True},
401-
)
467+
routing_rule_links.Element = AAZObjectType()
402468

403469
_element = cls._schema_on_200.properties.routing_rule_links.Element
404470
_element.id = AAZStrType()
405471

406472
security_policy_links = cls._schema_on_200.properties.security_policy_links
407-
security_policy_links.Element = AAZObjectType(
408-
flags={"read_only": True},
409-
)
473+
security_policy_links.Element = AAZObjectType()
410474

411475
_element = cls._schema_on_200.properties.security_policy_links.Element
412476
_element.id = AAZStrType()

0 commit comments

Comments
 (0)