Skip to content

Commit 0258639

Browse files
Update create-custom-waf-rules.md
Updating Custom Rule examples to reflect new enabled/disabled capability.
1 parent b46608a commit 0258639

File tree

1 file changed

+27
-9
lines changed

1 file changed

+27
-9
lines changed

articles/web-application-firewall/ag/create-custom-waf-rules.md

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ $rule = New-AzApplicationGatewayFirewallCustomRule `
4747
-Priority 2 `
4848
-RuleType MatchRule `
4949
-MatchCondition $condition `
50-
-Action Block
50+
-Action Block `
51+
-State Enabled
5152
```
5253

5354
And here is the corresponding JSON:
@@ -60,6 +61,7 @@ And here is the corresponding JSON:
6061
"priority": 2,
6162
"ruleType": "MatchRule",
6263
"action": "Block",
64+
"state": "Enabled",
6365
"matchConditions": [
6466
{
6567
"matchVariables": [
@@ -106,7 +108,8 @@ $rule = New-AzApplicationGatewayFirewallCustomRule `
106108
-Priority 2 `
107109
-RuleType MatchRule `
108110
-MatchCondition $condition `
109-
-Action Block
111+
-Action Block `
112+
-State Enabled
110113
```
111114

112115
And the corresponding JSON:
@@ -119,6 +122,7 @@ And the corresponding JSON:
119122
"priority": 2,
120123
"ruleType": "MatchRule",
121124
"action": "Block",
125+
"state": "Enabled",
122126
"matchConditions": [
123127
{
124128
"matchVariables": [
@@ -162,7 +166,8 @@ $rule = New-AzApplicationGatewayFirewallCustomRule `
162166
-Priority 2 `
163167
-RuleType MatchRule `
164168
-MatchCondition $condition `
165-
-Action Block
169+
-Action Block `
170+
-State Enabled
166171
```
167172

168173
And the corresponding JSON:
@@ -175,6 +180,7 @@ And the corresponding JSON:
175180
"priority": 2,
176181
"ruleType": "MatchRule",
177182
"action": "Block",
183+
"state": "Enabled",
178184
"matchConditions": [
179185
{
180186
"matchVariables": [
@@ -220,7 +226,8 @@ $rule = New-AzApplicationGatewayFirewallCustomRule `
220226
-Priority 10 `
221227
-RuleType MatchRule `
222228
-MatchCondition $condition1 `
223-
-Action Block
229+
-Action Block `
230+
-State Enabled
224231
```
225232

226233
Here's the corresponding JSON:
@@ -233,6 +240,7 @@ Here's the corresponding JSON:
233240
"priority": 10,
234241
"ruleType": "MatchRule",
235242
"action": "Block",
243+
"state": "Enabled,
236244
"matchConditions": [
237245
{
238246
"matchVariables": [
@@ -288,7 +296,8 @@ $condition2 = New-AzApplicationGatewayFirewallCondition `
288296
-Priority 10 `
289297
-RuleType MatchRule `
290298
-MatchCondition $condition1, $condition2 `
291-
-Action Block
299+
-Action Block `
300+
-State Enabled
292301
```
293302

294303
Here's the corresponding JSON:
@@ -301,6 +310,7 @@ Here's the corresponding JSON:
301310
"priority": 10,
302311
"ruleType": "MatchRule",
303312
"action": "Block",
313+
"state": "Enabled",
304314
"matchConditions": [
305315
{
306316
"matchVariables": [
@@ -369,14 +379,16 @@ $rule1 = New-AzApplicationGatewayFirewallCustomRule `
369379
-Priority 10 `
370380
-RuleType MatchRule `
371381
-MatchCondition $condition1 `
372-
-Action Block
382+
-Action Block `
383+
-State Enabled
373384
374385
$rule2 = New-AzApplicationGatewayFirewallCustomRule `
375386
-Name myrule2 `
376387
-Priority 20 `
377388
-RuleType MatchRule `
378389
-MatchCondition $condition2 `
379-
-Action Block
390+
-Action Block `
391+
-State Enabled
380392
```
381393

382394
And the corresponding JSON:
@@ -389,6 +401,7 @@ And the corresponding JSON:
389401
"priority": 10,
390402
"ruleType": "MatchRule",
391403
"action": "Block",
404+
"state": "Enabled",
392405
"matchConditions": [
393406
{
394407
"matchVariables": [
@@ -410,6 +423,7 @@ And the corresponding JSON:
410423
"priority": 20,
411424
"ruleType": "MatchRule",
412425
"action": "Block",
426+
"state": "Enabled",
413427
"matchConditions": [
414428
{
415429
"matchVariables": [
@@ -456,7 +470,8 @@ $rule = New-AzApplicationGatewayFirewallCustomRule `
456470
-Priority 2 `
457471
-RuleType MatchRule `
458472
-MatchCondition $condition `
459-
-Action Block
473+
-Action Block `
474+
-State Enabled
460475
```
461476

462477
Corresponding JSON:
@@ -469,6 +484,7 @@ Corresponding JSON:
469484
"priority": 2,
470485
"ruleType": "MatchRule",
471486
"action": "Block",
487+
"state": "Enabled",
472488
"matchConditions": [
473489
{
474490
"matchVariables": [
@@ -515,7 +531,8 @@ $rule = New-AzApplicationGatewayFirewallCustomRule `
515531
-Priority 2 `
516532
-RuleType MatchRule `
517533
-MatchCondition $condition `
518-
-Action Block
534+
-Action Block `
535+
-State Enabled
519536
```
520537

521538
And here is the corresponding JSON:
@@ -528,6 +545,7 @@ And here is the corresponding JSON:
528545
"priority": 2,
529546
"ruleType": "MatchRule",
530547
"action": "Block",
548+
"state": "Enabled",
531549
"matchConditions": [
532550
{
533551
"matchVariables": [

0 commit comments

Comments
 (0)