Parameters
See plugin common configurations for configuration options available to all plugins.
rules
Rules evaluated in order. Only the first matching rule executes its action.
case
Matching conditions in the form of APISIX expressions. If omitted, the rule always matches. Place an unconditional fallback last. In APISIX 3.19.0, invalid expressions are rejected during configuration validation.
actions
An array of actions to be executed when a condition is successfully matched. Currently, the array only supports one action, and it should be either
return,limit-count, orlimit-conn. If you are using API7 Enterprise, you can also uselimit-count-advancedas the action.Each action is a two-element array
[name, conf], wherenameis the action name andconfis its configuration object. Exactly one action is required per rule. This shape is enforced during configuration validation in APISIX 3.19.0 and by the control plane in API7 Enterprise 3.9.21. Actions without a configuration object, actions with extra elements, and rules with multiple actions are rejected.When the action is set to
return, you can configure an HTTP status code to return to the client when the condition is matched.When the action is set to
limit-count, you can configure all options of thelimit-countplugin, except forgroup.When the action is set to
limit-count-advanced, you can configure all options of thelimit-count-advancedplugin, except forgroup.When the action is set to
limit-conn, you can configure all options of thelimit-connplugin.