You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/ruleset-engine/basic-operations/add-rule-phase-rulesets.mdx
+73-82Lines changed: 73 additions & 82 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,9 @@ type: overview
4
4
title: Add rules to phase entry point rulesets
5
5
sidebar:
6
6
order: 3
7
-
8
7
---
9
8
10
-
import { Details } from"~/components"
9
+
import { Details } from"~/components";
11
10
12
11
A [phase entry point ruleset](/ruleset-engine/about/rulesets/#entry-point-ruleset) contains an ordered list of rules that run in that phase. A rule in an entry point ruleset can execute a different ruleset. You can have entry point rulesets for each phase at the account level and at the zone level.
13
12
@@ -16,19 +15,14 @@ To add one or more rules to a phase entry point ruleset, use one of the [ruleset
16
15
If you are adding a **single** rule to a ruleset, consider using one of the [rule creation operations](/ruleset-engine/rulesets-api/add-rule/) instead. In this case, the request will only include the definition of the new rule.
17
16
18
17
:::note[Creating an entry point ruleset]
19
-
20
-
21
18
Instead of relying on the automatic creation of an entry point ruleset, you can also create this ruleset explicitly using one of the [ruleset creation operations](/ruleset-engine/rulesets-api/create/).
22
-
23
-
24
19
:::
25
20
26
-
27
21
<Detailsheader="Example: Set the rules of a phase entry point ruleset at the zone level">
28
22
29
23
The following example sets the rules of a phase entry point ruleset at the zone level for the `http_request_firewall_managed` phase using the [Update a zone ruleset](/api/operations/updateZoneRuleset) operation.
<Detailsheader="Example: Add a single rule to a phase entry point ruleset at the zone level">
100
92
101
93
The following example adds a single rule to a phase entry point ruleset (with ID `{ruleset_id}`) at the zone level using the [Create a zone ruleset rule](/api/operations/createZoneRulesetRule) operation.
Copy file name to clipboardExpand all lines: src/content/docs/ruleset-engine/basic-operations/deploy-rulesets.mdx
+33-38Lines changed: 33 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,32 +4,27 @@ type: overview
4
4
title: Deploy rulesets
5
5
sidebar:
6
6
order: 4
7
-
8
7
---
9
8
10
9
Use the [Rulesets API](/ruleset-engine/rulesets-api/) to deploy a ruleset. To deploy a ruleset, add a rule with `"action": "execute"` to a phase entry point ruleset, specifying the ruleset ID to execute as an action parameter. Use a separate rule for each ruleset you want to deploy.
11
10
12
11
A rule that executes a ruleset consists of:
13
12
14
-
* The **ID of the ruleset** you want to execute.
15
-
* An **expression**.
16
-
* An **action**, set to `execute`.
13
+
- The **ID of the ruleset** you want to execute.
14
+
- An **expression**.
15
+
- An **action**, set to `execute`.
17
16
18
17
The rules in the ruleset execute when a request satisfies the expression.
19
18
20
19
:::note
21
-
22
-
23
20
To apply a rule to every request in a phase at the **zone** level, set the rule expression to `true`.
24
-
25
-
26
21
:::
27
22
28
23
## Example
29
24
30
25
The following example deploys a managed ruleset to the `http_request_firewall_managed` phase of a given zone (`{zone_id}`) by adding a rule that executes the managed ruleset.
0 commit comments