Skip to content

Commit 0e5a049

Browse files
authored
Add support for State flag in Custom Rule (#22457)
1 parent 1411c5f commit 0e5a049

File tree

6 files changed

+27
-1
lines changed

6 files changed

+27
-1
lines changed

specification/network/resource-manager/Microsoft.Network/stable/2022-09-01/examples/WafListAllPolicies.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
{
3333
"name": "Rule1",
3434
"priority": 1,
35+
"state": "Enabled",
3536
"ruleType": "MatchRule",
3637
"matchConditions": [
3738
{
@@ -55,6 +56,7 @@
5556
{
5657
"name": "Rule2",
5758
"priority": 2,
59+
"state": "Enabled",
5860
"ruleType": "MatchRule",
5961
"matchConditions": [
6062
{

specification/network/resource-manager/Microsoft.Network/stable/2022-09-01/examples/WafListPolicies.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
{
4242
"name": "Rule1",
4343
"priority": 1,
44+
"state": "Enabled",
4445
"ruleType": "MatchRule",
4546
"matchConditions": [
4647
{
@@ -64,6 +65,7 @@
6465
{
6566
"name": "Rule2",
6667
"priority": 2,
68+
"state": "Enabled",
6769
"ruleType": "MatchRule",
6870
"matchConditions": [
6971
{

specification/network/resource-manager/Microsoft.Network/stable/2022-09-01/examples/WafPolicyCreateOrUpdate.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@
238238
{
239239
"name": "Rule1",
240240
"priority": 1,
241+
"state": "Enabled",
241242
"ruleType": "MatchRule",
242243
"matchConditions": [
243244
{
@@ -261,6 +262,7 @@
261262
{
262263
"name": "Rule2",
263264
"priority": 2,
265+
"state": "Enabled",
264266
"ruleType": "MatchRule",
265267
"matchConditions": [
266268
{
@@ -395,6 +397,7 @@
395397
{
396398
"name": "Rule1",
397399
"priority": 1,
400+
"state": "Enabled",
398401
"ruleType": "MatchRule",
399402
"matchConditions": [
400403
{
@@ -418,6 +421,7 @@
418421
{
419422
"name": "Rule2",
420423
"priority": 2,
424+
"state": "Enabled",
421425
"ruleType": "MatchRule",
422426
"matchConditions": [
423427
{

specification/network/resource-manager/Microsoft.Network/stable/2022-09-01/examples/WafPolicyDelete.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
},
88
"responses": {
99
"200": {},
10-
"202": {},
10+
"202": {
11+
"headers": {
12+
"Location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/Policy1?api-version=2022-09-01"
13+
}
14+
},
1115
"204": {}
1216
}
1317
}

specification/network/resource-manager/Microsoft.Network/stable/2022-09-01/examples/WafPolicyGet.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
{
3333
"name": "Rule1",
3434
"priority": 1,
35+
"state": "Enabled",
3536
"ruleType": "MatchRule",
3637
"matchConditions": [
3738
{
@@ -55,6 +56,7 @@
5556
{
5657
"name": "Rule2",
5758
"priority": 2,
59+
"state": "Enabled",
5860
"ruleType": "MatchRule",
5961
"matchConditions": [
6062
{

specification/network/resource-manager/Microsoft.Network/stable/2022-09-01/webapplicationfirewall.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,18 @@
504504
"description": "Priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.",
505505
"type": "integer"
506506
},
507+
"state": {
508+
"description": "Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.",
509+
"type": "string",
510+
"enum": [
511+
"Disabled",
512+
"Enabled"
513+
],
514+
"x-ms-enum": {
515+
"name": "WebApplicationFirewallState",
516+
"modelAsString": true
517+
}
518+
},
507519
"ruleType": {
508520
"description": "The rule type.",
509521
"type": "string",

0 commit comments

Comments
 (0)