This feature applies to the following operations for function trigger rules under a Site:
Supports adding, deleting, modifying, and querying function trigger rules under a Site.
Execution methods supported: execute a specific function, execute different functions based on weight, and execute different functions based on region.
Supports quickly adjusting the priority of trigger rules, which are executed in sequential order by rule number. If a request URL matches multiple rules, only the rule with the smallest sequence number is executed, and subsequent rules are not executed.
Directions
Creating a triggering rule
1. Log in to the Tencent Cloud EdgeOne console, enter Service Overview in the left menu bar, and click the site to be configured under Website Security Acceleration.
2. On the site details page, click Edge Functions> Function Triggers. On the Function Trigger page, click the
icon to the right of the rule list.
Configuration Item
Configuration Description
Description
Optional field, supports a maximum of 50 characters.
Trigger Condition
Select the matching type, operator, and value as needed. For more parameter descriptions, please refer to the Rule Engine.
Execute Function
Execute a specific function: Requests matching the trigger condition will directly execute the specified edge function.
Execute different functions based on weight: Functions are executed according to weight, with a configurable range of 1-100. The total weight must equal 100, and each weight must correspond to a different execution function. Supports a maximum of 5 functions.
Execute different functions based on region: Functions are executed according to the specified country/region. Supports a maximum of 5 functions. The selected countries/regions must not overlap, and each country/region must correspond to a different execution function. If the execution does not match any configured region, the function for the default region will be executed.
3. Click OK to complete the creation.
View and Modify Trigger Rules
1. Query Trigger Rules
On the Trigger Configuration page, click
to the right of the Rule List. Enter the Rule ID keyword in the search input box to complete the query.
2. Edit Trigger Rules
2.1 On the Trigger Configuration page, select the rule you want to modify and click Edit.
2.2 In the Edit Trigger Rule dialog box, modify the relevant parameters and click OK to finish editing the trigger rule.
3. Delete Trigger Rules
3.1 On the Trigger Configuration page, click the priority adjustment icon
to the right of the Rule List.
3.2 Find the rule to delete and click the
icon.
4. Adjust Trigger Rule Priority
4.1 On the Trigger Configuration page, click the priority adjustment icon
to the right of the Rule List.
4.2 Find the rule. Click the
icon to move the rule up by one row or the
icon to move the rule down by one row. Then, click Save.
Note:
If the request URL matches multiple triggering rules, such as Rules 01 and 02 in the following figure, only the triggering rule on the top will be executed. In this example, only Rule 01 will be executed.