Docs

Fault Injection Configuration

Configuration reference for the Fault Injection plugin (`fault-injection`): the parameters, each attribute with its type, whether it is required, its default and its accepted values.

Parameters

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

abort — object · optional · since APISIX 1.2 · API7 Gateway 3.4.0

Abort action configurations.

http_status — integer · required · since APISIX 1.2 · API7 Gateway 3.4.0

Valid values: greater than or equal to 200

Response HTTP status code to return to client.

body — string · optional · since APISIX 1.2 · API7 Gateway 3.4.0

Body of the response returned to the client. Support the use of built-in variables (opens in Apache APISIX docs) in the body.

headers — object · optional · since APISIX 3.3.0 · API7 Gateway 3.4.0

Headers of the response returned to the client. Support the use of built-in variables (opens in Apache APISIX docs) in headers.

percentage — integer · optional · since APISIX 2.1 · API7 Gateway 3.4.0

Valid values: between 0 and 100 inclusive

Percentage of requests to be aborted.

vars — array[array] · optional · since APISIX 2.3 · API7 Gateway 3.4.0

An array of one or more matching conditions in the form of APISIX expressions (opens in Apache APISIX docs) to conditionally execute the plugin.

delay — object · optional · since APISIX 1.2 · API7 Gateway 3.4.0

Delay action configurations.

duration — number · required · since APISIX 1.2 · API7 Gateway 3.4.0

Delay duration in seconds.

percentage — integer · optional · since APISIX 2.1 · API7 Gateway 3.4.0

Valid values: between 0 and 100 inclusive

Percentage of requests to be delayed.

vars — array[array] · optional · since APISIX 2.3 · API7 Gateway 3.4.0

An array of one or more matching conditions in the form of APISIX expressions (opens in Apache APISIX docs) to conditionally execute the plugin.