このページは、まだ日本語ではご利用いただけません。翻訳中です。
古いプラグインバージョンのドキュメントを閲覧しています。
構成
このプラグインはDBレスモードに対応しています。
パラメータ
このプラグインの設定で使用できるすべてのパラメータのリストは次のとおりです。
-
name or plugin
string requiredプラグイン名。この場合は
response-transformer-advanced。- Kong Admin API、Kong Konnect API、宣言型構成、または decK ファイルを使用する場合、フィールドは
nameです。 - Kubernetes で KongPlugin オブジェクトを使用する場合、フィールドは
pluginです。
- Kong Admin API、Kong Konnect API、宣言型構成、または decK ファイルを使用する場合、フィールドは
-
service.name or service.id
stringプラグインが対象とするサービス名または ID。最上位の
/pluginsエンドポイント. からプラグインをサービスに追加する場合は、これらのパラメータのいずれかを設定してください/services/{serviceName|Id}/pluginsを使用する場合は必要ありません。 -
route.name or route.id
stringプラグインがターゲットとするルート名または ID。最上位の
/pluginsエンドポイント. を通るルートにプラグインを追加する場合は、これらのパラメータのいずれかを設定してください/routes/{routeName|Id}/pluginsを使用する場合は必要ありません。 -
consumer.name or consumer.id
stringプラグインがターゲットとするコンシューマーの名前または ID。 最上位の
/pluginsエンドポイント. からコンシューマーにプラグインを追加する場合は、これらのパラメーターのいずれかを設定してください/consumers/{consumerName|Id}/pluginsを使用する場合は必要ありません。 -
enabled
boolean default:trueこのプラグインが適用されるかどうか。
-
config
record required-
remove
record required-
json
array of typestringList of property names. Remove the property from the JSON body if it is present.
-
headers
array of typestringList of
headername[:value]. If onlyheadernameis given, unset the header field with the givenheadername. Ifheadername:valueis given, unset the header fieldheadernamewhen it has a specificvalue. Ifvaluestarts and ends with a/(slash character), then it is considered to be a regular expression. Note that in accordance with RFC 7230 multiple header values with the same header name are allowed if the entire field value for that header field is defined as a comma-separated list or the header field is aSet-Cookieheader field.
-
if_status
array of typestringList of response status codes or status code ranges to which the transformation will apply. Empty means all response codes.
-
-
rename
record required-
headers
array of typestringList of
headername1:headername2pairs. If a header withheadername1exists andheadername2is valid, rename header toheadername2.
-
if_status
array of typestringList of response status codes or status code ranges to which the transformation will apply. Empty means all response codes.
-
-
replace
record required-
body
stringString with which to replace the entire response body.
-
json
array of typestringList of property
name:valuepairs. If and only if the parameter is already present, replace its old value with the new one. Ignored if the parameter is not already present.
-
json_types
array of typestringMust be one of:boolean,number,stringList of JSON type names. Specify the types of the JSON values returned when replacing JSON properties.
-
headers
array of typestringList of
headername:valuepairs. If and only if the header is already set, replace its old value with the new one. Ignored if the header is not already set.
-
if_status
array of typestringList of response status codes or status code ranges to which the transformation will apply. Empty means all response codes.
-
-
add
record required-
json
array of typestringList of
name:valuepairs. If and only if the property is not present, add a new property with the given value to the JSON body. Ignored if the property is already present.
-
json_types
array of typestringMust be one of:boolean,number,stringList of JSON type names. Specify the types of the JSON values returned when adding a new JSON property.
-
headers
array of typestringList of
headername:valuepairs. If and only if the header is not already set, set a new header with the given value. Ignored if the header is already set.
-
if_status
array of typestringList of response status codes or status code ranges to which the transformation will apply. Empty means all response codes.
-
-
append
record required-
json
array of typestringList of
name:valuepairs. If the property is not present in the JSON body, add it with the given value. If it is already present, the two values (old and new) will be aggregated in an array.
-
json_types
array of typestringMust be one of:boolean,number,stringList of JSON type names. Specify the types of the JSON values returned when appending JSON properties.
-
headers
array of typestringList of
headername:valuepairs. If the header is not set, set it with the given value. If it is already set, a new header with the same name and the new value will be set.
-
if_status
array of typestringList of response status codes or status code ranges to which the transformation will apply. Empty means all response codes.
-
-
allow
record required-
json
set of typestringSet of parameter names. Only allowed parameters are present in the JSON response body.
-
-
transform
record required-
functions
array of typestringSet of Lua functions to perform arbitrary transforms in a response JSON body.
-
if_status
array of typestringList of response status codes or ranges to which the arbitrary transformation applies. Leaving empty implies that the transformations apply to all response codes.
-
json
array of typestringApply Lua functions to a particular list of JSON property
nameorname:valuepairs.
-
-
dots_in_keys
boolean default:trueWhether dots (for example,
customers.info.phone) should be treated as part of a property name or used to descend into nested JSON objects. See Arrays and nested objects.
-