Skip to content

Commit

Permalink
Merge pull request #276 from necusjz/add-example-for-ag
Browse files Browse the repository at this point in the history
Update model for `az network application-gateway waf-policy custom-rule`
  • Loading branch information
kairu-ms authored Aug 16, 2023
2 parents 15ea0f6 + 05c86bf commit c5eccc2
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@ Create an application gateway WAF policy custom rule.
```bash
network application-gateway waf-policy custom-rule create --action Allow --name MyWafPolicyRule --policy-name MyPolicy --priority 500 --resource-group MyResourceGroup --rule-type MatchRule
```

- Create an application gateway WAF policy custom rule with user session identifier.
```bash
network application-gateway waf-policy custom-rule create -g MyResourceGroup --policy-name MyPolicy -n MyRule --priority 3 --action Block --rule-type RateLimitRule --rate-limit-duration FiveMins --rate-limit-threshold 15 --group-by-user-session "[{group-by-variables:[{variable-name:GeoLocation}]}]"
```
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@ Update an application gateway WAF policy custom rule.
```bash
network application-gateway waf-policy custom-rule update --action Allow --name MyWAFPolicyRule --policy-name MyPolicy --priority 500 --resource-group MyResourceGroup --rule-type MatchRule
```

- Update an application gateway WAF policy custom rule with user session identifier.
```bash
network application-gateway waf-policy custom-rule create -g MyResourceGroup --policy-name MyPolicy -n MyRule --rate-limit-duration OneMin --rate-limit-threshold 10 --group-by-user-session "[{group-by-variables:[{variable-name:ClientAddr}]}]"
```
12 changes: 12 additions & 0 deletions Commands/tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -32542,6 +32542,12 @@
"network application-gateway waf-policy custom-rule create --action Allow --name MyWafPolicyRule --policy-name MyPolicy --priority 500 --resource-group MyResourceGroup --rule-type MatchRule"
],
"name": "Create an application gateway WAF policy custom rule."
},
{
"commands": [
"network application-gateway waf-policy custom-rule create -g MyResourceGroup --policy-name MyPolicy -n MyRule --priority 3 --action Block --rule-type RateLimitRule --rate-limit-duration FiveMins --rate-limit-threshold 15 --group-by-user-session \"[{group-by-variables:[{variable-name:GeoLocation}]}]\""
],
"name": "Create an application gateway WAF policy custom rule with user session identifier."
}
],
"name": "2022-11-01",
Expand Down Expand Up @@ -32826,6 +32832,12 @@
"network application-gateway waf-policy custom-rule update --action Allow --name MyWAFPolicyRule --policy-name MyPolicy --priority 500 --resource-group MyResourceGroup --rule-type MatchRule"
],
"name": "Update an application gateway WAF policy custom rule."
},
{
"commands": [
"network application-gateway waf-policy custom-rule create -g MyResourceGroup --policy-name MyPolicy -n MyRule --rate-limit-duration OneMin --rate-limit-threshold 10 --group-by-user-session \"[{group-by-variables:[{variable-name:ClientAddr}]}]\""
],
"name": "Update an application gateway WAF policy custom rule with user session identifier."
}
],
"name": "2022-11-01",
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -11048,8 +11048,8 @@
</enum>
</arg>
</argGroup>
<argGroup name="Parameters.properties.customRules[]">
<arg type="array<object>" var="$parameters.properties.customRules[].groupByUserSession" options="group-by-user-session" group="Parameters.properties.customRules[]">
<argGroup name="Properties">
<arg type="array<object>" var="$parameters.properties.customRules[].groupByUserSession" options="group-by-user-session" group="Properties">
<help short="List of user session identifier group by clauses."/>
<item type="object">
<arg type="array<object>" var="$parameters.properties.customRules[].groupByUserSession[].groupByVariables" options="group-by-variables" required="True">
Expand All @@ -11067,18 +11067,6 @@
</arg>
</item>
</arg>
<arg type="string" var="$parameters.properties.customRules[].rateLimitDuration" options="rate-limit-duration" group="Parameters.properties.customRules[]">
<help short="Duration over which Rate Limit policy will be applied. Applies only when ruleType is RateLimitRule."/>
<enum>
<item name="FiveMins" value="&quot;FiveMins&quot;"/>
<item name="OneMin" value="&quot;OneMin&quot;"/>
</enum>
</arg>
<arg type="integer32" var="$parameters.properties.customRules[].rateLimitThreshold" options="rate-limit-threshold" group="Parameters.properties.customRules[]">
<help short="Rate Limit threshold to apply in case ruleType is RateLimitRule. Must be greater than or equal to 1"/>
</arg>
</argGroup>
<argGroup name="Properties">
<arg type="array<object>" var="$parameters.properties.customRules[].matchConditions" options="match-conditions" required="True" group="Properties">
<help short="List of match conditions."/>
<default value="[]"/>
Expand Down Expand Up @@ -11144,6 +11132,16 @@
</arg>
</item>
</arg>
<arg type="string" var="$parameters.properties.customRules[].rateLimitDuration" options="rate-limit-duration" group="Properties">
<help short="Duration over which Rate Limit policy will be applied. Applies only when ruleType is RateLimitRule."/>
<enum>
<item name="FiveMins" value="&quot;FiveMins&quot;"/>
<item name="OneMin" value="&quot;OneMin&quot;"/>
</enum>
</arg>
<arg type="integer32" var="$parameters.properties.customRules[].rateLimitThreshold" options="rate-limit-threshold" group="Properties">
<help short="Rate Limit threshold to apply in case ruleType is RateLimitRule. Must be greater than or equal to 1"/>
</arg>
</argGroup>
<subresourceSelector var="$Subresource" ref="$Instance">
<json type="object" name="parameters">
Expand Down Expand Up @@ -13757,8 +13755,8 @@
</enum>
</arg>
</argGroup>
<argGroup name="Parameters.properties.customRules[]">
<arg nullable="True" type="array<object>" var="$parameters.properties.customRules[].groupByUserSession" options="group-by-user-session" group="Parameters.properties.customRules[]">
<argGroup name="Properties">
<arg nullable="True" type="array<object>" var="$parameters.properties.customRules[].groupByUserSession" options="group-by-user-session" group="Properties">
<help short="List of user session identifier group by clauses."/>
<item nullable="True" type="object">
<arg type="array<object>" var="$parameters.properties.customRules[].groupByUserSession[].groupByVariables" options="group-by-variables">
Expand All @@ -13776,18 +13774,6 @@
</arg>
</item>
</arg>
<arg nullable="True" type="string" var="$parameters.properties.customRules[].rateLimitDuration" options="rate-limit-duration" group="Parameters.properties.customRules[]">
<help short="Duration over which Rate Limit policy will be applied. Applies only when ruleType is RateLimitRule."/>
<enum>
<item name="FiveMins" value="&quot;FiveMins&quot;"/>
<item name="OneMin" value="&quot;OneMin&quot;"/>
</enum>
</arg>
<arg nullable="True" type="integer32" var="$parameters.properties.customRules[].rateLimitThreshold" options="rate-limit-threshold" group="Parameters.properties.customRules[]">
<help short="Rate Limit threshold to apply in case ruleType is RateLimitRule. Must be greater than or equal to 1"/>
</arg>
</argGroup>
<argGroup name="Properties">
<arg type="array<object>" var="$parameters.properties.customRules[].matchConditions" options="match-conditions" group="Properties">
<help short="List of match conditions."/>
<item nullable="True" type="object">
Expand Down Expand Up @@ -13852,6 +13838,16 @@
</arg>
</item>
</arg>
<arg nullable="True" type="string" var="$parameters.properties.customRules[].rateLimitDuration" options="rate-limit-duration" group="Properties">
<help short="Duration over which Rate Limit policy will be applied. Applies only when ruleType is RateLimitRule."/>
<enum>
<item name="FiveMins" value="&quot;FiveMins&quot;"/>
<item name="OneMin" value="&quot;OneMin&quot;"/>
</enum>
</arg>
<arg nullable="True" type="integer32" var="$parameters.properties.customRules[].rateLimitThreshold" options="rate-limit-threshold" group="Properties">
<help short="Rate Limit threshold to apply in case ruleType is RateLimitRule. Must be greater than or equal to 1"/>
</arg>
</argGroup>
<subresourceSelector var="$Subresource" ref="$Instance">
<json type="object" name="parameters">
Expand Down

0 comments on commit c5eccc2

Please sign in to comment.