Docs

Parameters

See plugin common configurations (opens in Apache APISIX docs) for configuration options available to all plugins.

  • rules

    array[object]

    required


    Rules evaluated in order. Only the first matching rule executes its action.

    • case

      array[array]


      Matching conditions in the form of APISIX expressions (opens in Apache APISIX docs). If omitted, the rule always matches. Place an unconditional fallback last. In APISIX 3.19.0, invalid expressions are rejected during configuration validation.

    • actions

      array[array]

      required


      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, or limit-conn. If you are using API7 Enterprise, you can also use limit-count-advanced as the action.

      Each action is a two-element array [name, conf], where name is the action name and conf is 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 the limit-count plugin, except for group.

      When the action is set to limit-count-advanced, you can configure all options of the limit-count-advanced plugin, except for group.

      When the action is set to limit-conn, you can configure all options of the limit-conn plugin.