# HG changeset patch # User Ruslan Ermilov # Date 1512983589 -10800 # Node ID fee7627f6a5ac3dd91ac4d38848e55f7079899de # Parent f29bd40e9a62f3ff21217f65545974eecae263ce Updated docs for the upcoming NGINX Plus release. diff --git a/xml/en/GNUmakefile b/xml/en/GNUmakefile --- a/xml/en/GNUmakefile +++ b/xml/en/GNUmakefile @@ -106,6 +106,7 @@ REFS = \ stream/ngx_stream_geo_module \ stream/ngx_stream_geoip_module \ stream/ngx_stream_js_module \ + stream/ngx_stream_keyval_module \ stream/ngx_stream_limit_conn_module \ stream/ngx_stream_log_module \ stream/ngx_stream_map_module \ diff --git a/xml/en/docs/http/ngx_http_api_module.xml b/xml/en/docs/http/ngx_http_api_module.xml --- a/xml/en/docs/http/ngx_http_api_module.xml +++ b/xml/en/docs/http/ngx_http_api_module.xml @@ -97,24 +97,25 @@ stream { } } -All API requests include a supported API version in the URI. +All API requests include +a supported API version in the URI. Examples of API requests with this configuration: -http://127.0.0.1/api/1/ -http://127.0.0.1/api/1/nginx -http://127.0.0.1/api/1/connections -http://127.0.0.1/api/1/http/requests -http://127.0.0.1/api/1/http/server_zones/server_backend -http://127.0.0.1/api/1/http/caches/cache_backend -http://127.0.0.1/api/1/http/upstreams/backend -http://127.0.0.1/api/1/http/upstreams/backend/servers/ -http://127.0.0.1/api/1/http/upstreams/backend/servers/1 -http://127.0.0.1/api/1/http/keyvals/one?key=arg1 -http://127.0.0.1/api/1/stream/ -http://127.0.0.1/api/1/stream/server_zones/server_backend -http://127.0.0.1/api/1/stream/upstreams/ -http://127.0.0.1/api/1/stream/upstreams/backend -http://127.0.0.1/api/1/stream/upstreams/backend/servers/1 +http://127.0.0.1/api/2/ +http://127.0.0.1/api/2/nginx +http://127.0.0.1/api/2/connections +http://127.0.0.1/api/2/http/requests +http://127.0.0.1/api/2/http/server_zones/server_backend +http://127.0.0.1/api/2/http/caches/cache_backend +http://127.0.0.1/api/2/http/upstreams/backend +http://127.0.0.1/api/2/http/upstreams/backend/servers/ +http://127.0.0.1/api/2/http/upstreams/backend/servers/1 +http://127.0.0.1/api/2/http/keyvals/one?key=arg1 +http://127.0.0.1/api/2/stream/ +http://127.0.0.1/api/2/stream/server_zones/server_backend +http://127.0.0.1/api/2/stream/upstreams/ +http://127.0.0.1/api/2/stream/upstreams/backend +http://127.0.0.1/api/2/stream/upstreams/backend/servers/1 @@ -141,24 +142,44 @@ is read-only or read-write. By default, the API is read-only. - + All API requests should contain a supported API version in the URI. If the request URI equals the location prefix, the list of supported API versions is returned. -The current and the only API version is “1”. +The current API version is “2”. The optional “fields” argument in the request line specifies which fields of the requested objects will be output: -http://127.0.0.1/api/1/nginx?fields=version,build +http://127.0.0.1/api/2/nginx?fields=version,build + +
+ + + + + +The drain parameter +was added in version 2. + + + +The /stream/keyvals/ data +were added in version 2. + + + + + +
@@ -826,22 +847,22 @@ server with ID “id” does not exist (UpstreamServerNotFound), returns Error Supported methods: -GET - Return key-value pairs from all keyval zones -Returns key-value pairs for each keyval shared memory zone. +GET - Return key-value pairs from all HTTP keyval zones +Returns key-value pairs for each HTTP keyval shared memory zone. Request parameters: fields (string, optional) -If the “fields” value is empty, then only keyval zone names are output. +If the “fields” value is empty, then only HTTP keyval zone names are output. Possible responses: -200 - Success, returns a collection of "Keyval Shared Memory Zone" objects for all http keyvals +200 - Success, returns a collection of "HTTP Keyval Shared Memory Zone" objects for all http keyvals @@ -855,41 +876,41 @@ Parameters common for all methods: httpKeyvalZoneName (string, required) -The name of a keyval shared memory zone. +The name of an HTTP keyval shared memory zone. Supported methods: -GET - Return key-value pairs from a keyval zone -Returns key-value pairs stored in a particular keyval shared memory zone. +GET - Return key-value pairs from an HTTP keyval zone +Returns key-value pairs stored in a particular HTTP keyval shared memory zone. Request parameters: key (string, optional) -Get a particular key-value pair from the keyval zone. +Get a particular key-value pair from the HTTP keyval zone. Possible responses: -200 - Success, returns Keyval Shared Memory Zone +200 - Success, returns HTTP Keyval Shared Memory Zone 404 - Keyval not found (KeyvalNotFound), keyval key not found (KeyvalKeyNotFound), returns Error -POST - Add a key-value pair to the keyval zone -Adds a new key-value pair to the keyval shared memory zone. Several key-value pairs can be entered if the keyval shared memory zone is empty. +POST - Add a key-value pair to the HTTP keyval zone +Adds a new key-value pair to the HTTP keyval shared memory zone. Several key-value pairs can be entered if the HTTP keyval shared memory zone is empty. Request parameters: Key-value -(Keyval Shared Memory Zone, required) +(HTTP Keyval Shared Memory Zone, required) -A key-value pair is specified in the JSON format. Several key-value pairs can be entered if the keyval shared memory zone is empty. +A key-value pair is specified in the JSON format. Several key-value pairs can be entered if the HTTP keyval shared memory zone is empty. @@ -913,7 +934,7 @@ nested object or list (KeyvalFo Request parameters: httpKeyvalZoneKeyValue -(Keyval Shared Memory Zone, required) +(HTTP Keyval Shared Memory Zone, required) A new value for the key is specified in the JSON format. @@ -933,8 +954,8 @@ keyval key not found (KeyvalKey -DELETE - Empty the keyval zone -Deletes all key-value pairs from the keyval shared memory zone. +DELETE - Empty the HTTP keyval zone +Deletes all key-value pairs from the HTTP keyval shared memory zone. Possible responses: @@ -1281,6 +1302,138 @@ server with ID “id” does not exist (UpstreamServerNotFound), + +/stream/keyvals/ + + +Supported methods: + + +GET - Return key-value pairs from all stream keyval zones +Returns key-value pairs for each stream keyval shared memory zone. + +Request parameters: + +fields +(string, optional) + +If the “fields” value is empty, then only stream keyval zone names are output. + + + +Possible responses: + + +200 - Success, returns a collection of "Stream Keyval Shared Memory Zone" objects for all stream keyvals +404 - stream not configured (StreamNotConfigured), returns Error + + + + + +/stream/keyvals/{streamKeyvalZoneName} + + +Parameters common for all methods: + +streamKeyvalZoneName +(string, required) + +The name of a stream keyval shared memory zone. + +Supported methods: + + +GET - Return key-value pairs from a stream keyval zone +Returns key-value pairs stored in a particular stream keyval shared memory zone. + +Request parameters: + +key +(string, optional) + +Get a particular key-value pair from the stream keyval zone. + + + +Possible responses: + + +200 - Success, returns Stream Keyval Shared Memory Zone +404 - Keyval not found (KeyvalNotFound), +keyval key not found (KeyvalKeyNotFound), +stream not configured (StreamNotConfigured), returns Error + + + +POST - Add a key-value pair to the stream keyval zone +Adds a new key-value pair to the stream keyval shared memory zone. Several key-value pairs can be entered if the stream keyval shared memory zone is empty. + +Request parameters: + +Key-value +(Stream Keyval Shared Memory Zone, required) + +A key-value pair is specified in the JSON format. Several key-value pairs can be entered if the stream keyval shared memory zone is empty. + + + +Possible responses: + + +201 - Created +400 - Key required (KeyvalFormatError), +only one key can be added (KeyvalFormatError), +nested object or list (KeyvalFormatError), returns Error +404 - Keyval not found (KeyvalNotFound), +stream not configured (StreamNotConfigured), returns Error +405 - Method disabled (MethodDisabled), returns Error +409 - Key already exists (KeyvalKeyExists), returns Error +415 - JSON error (JsonError), returns Error + + + +PATCH - Modify a key-value or delete a key +Changes the value of the selected key in the key-value pair or deletes a key by setting the key value to null. + +Request parameters: + +streamKeyvalZoneKeyValue +(Stream Keyval Shared Memory Zone, required) + +A new value for the key is specified in the JSON format. + + + +Possible responses: + + +204 - Success +400 - Key required (KeyvalFormatError), +only one key can be updated (KeyvalFormatError), +nested object or list (KeyvalFormatError), returns Error +404 - Keyval not found (KeyvalNotFound), +keyval key not found (KeyvalKeyNotFound), +stream not configured (StreamNotConfigured), returns Error +405 - Method disabled (MethodDisabled), returns Error +415 - JSON error (JsonError), returns Error + + + +DELETE - Empty the stream keyval zone +Deletes all key-value pairs from the stream keyval shared memory zone. + +Possible responses: + + +204 - Success +404 - Keyval not found (KeyvalNotFound), +stream not configured (StreamNotConfigured), returns Error +405 - Method disabled (MethodDisabled), returns Error + + + +
@@ -2268,6 +2421,12 @@ When true, adds a
  • down parameter of the HTTP upstream server. +drain (boolean) + + +Same as the drain parameter of the HTTP upstream server. + + parent (string) @@ -2279,12 +2438,6 @@ Parent server ID of the resolved server. Hostname of the resolved server. The hostname is assigned automatically and cannot be changed. - -drain (boolean) - - -Puts the HTTP upstream server into the “draining” mode. In this mode, only requests bound to the server will be proxied to it. The parameter cannot be initially set, it can only be changed with the PATCH method. - Example: @@ -2302,8 +2455,8 @@ Puts the HTTP upstream server into the “draining” mode. In this mode, only requests bound to the server will be proxied to it. The parameter cannot be initially set, it can only be changed with the PATCH method. } -Keyval Shared Memory Zone: -Contents of a keyval shared memory zone.Example: +HTTP Keyval Shared Memory Zone: +Contents of an HTTP keyval shared memory zone.Example: { "key1" : "value1", @@ -2715,6 +2868,16 @@ Hostname of the resolved server. The hos "down" : false } + +Stream Keyval Shared Memory Zone: +Contents of a stream keyval shared memory zone.Example: + +{ + "key1" : "value1", + "key2" : "value2", + "key3" : "value3" +} + Error: nginx error object. diff --git a/xml/en/docs/http/ngx_http_api_module_head.xml b/xml/en/docs/http/ngx_http_api_module_head.xml --- a/xml/en/docs/http/ngx_http_api_module_head.xml +++ b/xml/en/docs/http/ngx_http_api_module_head.xml @@ -97,24 +97,25 @@ stream { } } -All API requests include a supported API version in the URI. +All API requests include +a supported API version in the URI. Examples of API requests with this configuration: -http://127.0.0.1/api/1/ -http://127.0.0.1/api/1/nginx -http://127.0.0.1/api/1/connections -http://127.0.0.1/api/1/http/requests -http://127.0.0.1/api/1/http/server_zones/server_backend -http://127.0.0.1/api/1/http/caches/cache_backend -http://127.0.0.1/api/1/http/upstreams/backend -http://127.0.0.1/api/1/http/upstreams/backend/servers/ -http://127.0.0.1/api/1/http/upstreams/backend/servers/1 -http://127.0.0.1/api/1/http/keyvals/one?key=arg1 -http://127.0.0.1/api/1/stream/ -http://127.0.0.1/api/1/stream/server_zones/server_backend -http://127.0.0.1/api/1/stream/upstreams/ -http://127.0.0.1/api/1/stream/upstreams/backend -http://127.0.0.1/api/1/stream/upstreams/backend/servers/1 +http://127.0.0.1/api/2/ +http://127.0.0.1/api/2/nginx +http://127.0.0.1/api/2/connections +http://127.0.0.1/api/2/http/requests +http://127.0.0.1/api/2/http/server_zones/server_backend +http://127.0.0.1/api/2/http/caches/cache_backend +http://127.0.0.1/api/2/http/upstreams/backend +http://127.0.0.1/api/2/http/upstreams/backend/servers/ +http://127.0.0.1/api/2/http/upstreams/backend/servers/1 +http://127.0.0.1/api/2/http/keyvals/one?key=arg1 +http://127.0.0.1/api/2/stream/ +http://127.0.0.1/api/2/stream/server_zones/server_backend +http://127.0.0.1/api/2/stream/upstreams/ +http://127.0.0.1/api/2/stream/upstreams/backend +http://127.0.0.1/api/2/stream/upstreams/backend/servers/1 @@ -141,21 +142,41 @@ is read-only or read-write. By default, the API is read-only. - + All API requests should contain a supported API version in the URI. If the request URI equals the location prefix, the list of supported API versions is returned. -The current and the only API version is “1”. +The current API version is “2”. The optional “fields” argument in the request line specifies which fields of the requested objects will be output: -http://127.0.0.1/api/1/nginx?fields=version,build +http://127.0.0.1/api/2/nginx?fields=version,build + +
    + + + + + +The drain parameter +was added in version 2. + + + +The /stream/keyvals/ data +were added in version 2. + + + + + +
    diff --git a/xml/en/docs/http/ngx_http_auth_jwt_module.xml b/xml/en/docs/http/ngx_http_auth_jwt_module.xml --- a/xml/en/docs/http/ngx_http_auth_jwt_module.xml +++ b/xml/en/docs/http/ngx_http_auth_jwt_module.xml @@ -9,7 +9,7 @@ + rev="4">
    @@ -37,6 +37,30 @@ via the algorithms: + + + + +HS256, HS384, HS512 + + + +RS256, RS384, RS512 + + + +ES256, ES384, ES512 + + + + +Prior to version 1.13.7, +only HS256, RS256, ES256 algorithms were supported. + + + This module is available as part of our commercial subscription. @@ -100,28 +124,48 @@ inherited from the previous configuratio -$variable name +$variable name ... http 1.11.10 -Sets the variable to the given -JOSE header parameter name. +Sets the variable to a JOSE header parameter +identified by key names. +Name matching starts from the top level of the JSON tree. +For arrays, the variable keeps a list of array elements separated by commas. + +Prior to version 1.13.7, only one key name could be specified, +and the result was undefined for arrays. + -$variable name +$variable name ... http 1.11.10 -Sets the variable to the given -JWT claim parameter name. +Sets the variable to a JWT claim parameter +identified by key names. +Name matching starts from the top level of the JSON tree. +For arrays, the variable keeps a list of array elements separated by commas. + +location / { + auth_jwt "closed site"; + auth_jwt_key_file conf/keys.json; + auth_jwt_claim_set $email info e-mail; + auth_jwt_claim_set $job info "job title"; +} + + +Prior to version 1.13.7, only one key name could be specified, +and the result was undefined for arrays. + diff --git a/xml/en/docs/http/ngx_http_upstream_module.xml b/xml/en/docs/http/ngx_http_upstream_module.xml --- a/xml/en/docs/http/ngx_http_upstream_module.xml +++ b/xml/en/docs/http/ngx_http_upstream_module.xml @@ -10,7 +10,7 @@ + rev="66">
    @@ -332,6 +332,20 @@ The parameter cannot be used along with + +drain + + +puts the server into the “draining” mode (1.13.6). +In this mode, only requests bound to the server +will be proxied to it. + +Prior to version 1.13.6, +the parameter could be changed only with the +API module. + + + diff --git a/xml/en/docs/index.xml b/xml/en/docs/index.xml --- a/xml/en/docs/index.xml +++ b/xml/en/docs/index.xml @@ -8,7 +8,7 @@
    @@ -557,6 +557,11 @@ ngx_stream_js_module + +ngx_stream_keyval_module + + + ngx_stream_limit_conn_module diff --git a/xml/en/docs/http/ngx_http_keyval_module.xml b/xml/en/docs/stream/ngx_stream_keyval_module.xml copy from xml/en/docs/http/ngx_http_keyval_module.xml copy to xml/en/docs/stream/ngx_stream_keyval_module.xml --- a/xml/en/docs/http/ngx_http_keyval_module.xml +++ b/xml/en/docs/stream/ngx_stream_keyval_module.xml @@ -6,17 +6,17 @@ - + rev="1">
    -The ngx_http_keyval_module module (1.13.3) creates variables +The ngx_stream_keyval_module module (1.13.7) creates variables with values taken from key-value pairs managed by the -API. +API. @@ -35,20 +35,26 @@ This module is available as part of our http { - keyval_zone zone=one:32k state=one.keyval; - keyval $arg_text $text zone=one; - ... server { ... - location / { - return 200 $text; - } - location /api { api write=on; } } } + +stream { + + keyval_zone zone=one:32k state=one.keyval; + keyval $ssl_server_name $name zone=one; + + server { + listen 12345 ssl; + proxy_pass $name; + ssl_certificate /usr/local/nginx/conf/cert.pem; + ssl_certificate_key /usr/local/nginx/conf/cert.key; + } +} @@ -63,7 +69,7 @@ http { $variable zone=name -http +stream Creates a new $variable whose value @@ -81,13 +87,13 @@ specified by the zone zone=name:size [state=file] -http +stream Sets the name and size of the shared memory zone that keeps the key-value database. Key-value pairs are managed by the -API. +API. diff --git a/xml/ru/docs/http/ngx_http_auth_jwt_module.xml b/xml/ru/docs/http/ngx_http_auth_jwt_module.xml --- a/xml/ru/docs/http/ngx_http_auth_jwt_module.xml +++ b/xml/ru/docs/http/ngx_http_auth_jwt_module.xml @@ -9,7 +9,7 @@ + rev="4">
    @@ -35,6 +35,30 @@ JWT claims должны быть зашифрованы в структуре +Модуль поддерживает следующие криптографические +алгоритмы: + + + + +HS256, HS384, HS512 + + + +RS256, RS384, RS512 + + + +ES256, ES384, ES512 + + + + +До версии 1.13.7 +поддерживались только алгоритмы HS256, RS256 и RS256. + + + Модуль доступен как часть коммерческой подписки. @@ -98,28 +122,48 @@ auth_jwt "closed site" token=$cookie_aut -$переменная имя +$переменная имя ... http 1.11.10 -Устанавливает переменную в заданное -имя параметра заголовка JOSE. +Устанавливает переменную в параметр заголовка JOSE, +определяемый именами ключей. +Сопоставление имён начинается с верхнего уровня дерева JSON. +Для массива переменная хранит список его элементов, разделяемых запятыми. + +До версии 1.13.7 можно было указать лишь одно имя, +результат для массивов был не определён. + -$переменная имя +$переменная имя ... http 1.11.10 -Устанавливает переменную в заданное -имя параметра JWT claim. +Устанавливает переменную в параметр JWT claim, +определяемый именами ключей. +Сопоставление имён начинается с верхнего уровня дерева JSON. +Для массива переменная хранит список его элементов, разделяемых запятыми. + +location / { + auth_jwt "closed site"; + auth_jwt_key_file conf/keys.json; + auth_jwt_claim_set $email info e-mail; + auth_jwt_claim_set $job info "job title"; +} + + +До версии 1.13.7 можно было указать лишь одно имя, +результат для массивов был не определён. + diff --git a/xml/ru/docs/http/ngx_http_upstream_module.xml b/xml/ru/docs/http/ngx_http_upstream_module.xml --- a/xml/ru/docs/http/ngx_http_upstream_module.xml +++ b/xml/ru/docs/http/ngx_http_upstream_module.xml @@ -10,7 +10,7 @@ + rev="66">
    @@ -336,6 +336,20 @@ SRV-записи с наивысшим приоритетом + +drain + + +переводит сервер в режим “draining” (1.13.6). +В этом режиме на сервер будут проксироваться только +привязанные к нему запросы. + +До версии 1.13.6 +параметр мог быть изменён только при помощи +модуля API. + + + diff --git a/xml/ru/docs/index.xml b/xml/ru/docs/index.xml --- a/xml/ru/docs/index.xml +++ b/xml/ru/docs/index.xml @@ -8,7 +8,7 @@
    @@ -562,6 +562,11 @@ ngx_stream_js_module + +ngx_stream_keyval_module [en] + + + ngx_stream_limit_conn_module diff --git a/yaml/nginx_api.yaml b/yaml/nginx_api.yaml --- a/yaml/nginx_api.yaml +++ b/yaml/nginx_api.yaml @@ -1,14 +1,15 @@ swagger: '2.0' info: - version: '1.0' + version: '2.0' title: NGINX Plus REST API description: NGINX Plus REST [API](https://nginx.org/en/docs/http/ngx_http_api_module.html) provides access to NGINX Plus status information, on-the-fly configuration of upstream servers and - [key-value](https://nginx.org/en/docs/http/ngx_http_keyval_module.html) - pairs management. -basePath: /api/1 + key-value pairs management for + [http](https://nginx.org/en/docs/http/ngx_http_keyval_module.html) and + [stream](https://nginx.org/en/docs/stream/ngx_stream_keyval_module.html). +basePath: /api/2 tags: - name: General Info - name: Processes @@ -24,6 +25,7 @@ tags: - name: Stream - name: Stream Server Zones - name: Stream Upstreams + - name: Stream Keyvals - name: Method GET - name: Method POST - name: Method PATCH @@ -729,8 +731,8 @@ paths: tags: - HTTP Keyvals - Method GET - summary: Return key-value pairs from all keyval zones - description: Returns key-value pairs for each keyval shared memory + summary: Return key-value pairs from all HTTP keyval zones + description: Returns key-value pairs for each HTTP keyval shared memory [zone](https://nginx.org/en/docs/http/ngx_http_keyval_module.html#keyval_zone). operationId: getHttpKeyvalZones produces: @@ -740,7 +742,7 @@ paths: in: query type: string description: If the “fields” value is empty, - then only keyval zone names are output. + then only HTTP keyval zone names are output. responses: '200': description: Success @@ -750,15 +752,15 @@ paths: parameters: - name: httpKeyvalZoneName in: path - description: The name of a keyval shared memory zone. + description: The name of an HTTP keyval shared memory zone. required: true type: string get: tags: - HTTP Keyvals - Method GET - summary: Return key-value pairs from a keyval zone - description: Returns key-value pairs stored in a particular keyval shared memory + summary: Return key-value pairs from an HTTP keyval zone + description: Returns key-value pairs stored in a particular HTTP keyval shared memory [zone](https://nginx.org/en/docs/http/ngx_http_keyval_module.html#keyval_zone). operationId: getHttpKeyvalZoneKeysValues produces: @@ -767,7 +769,7 @@ paths: - name: key in: query type: string - description: Get a particular key-value pair from the keyval zone. + description: Get a particular key-value pair from the HTTP keyval zone. responses: '200': description: Success @@ -783,11 +785,11 @@ paths: tags: - HTTP Keyvals - Method POST - summary: Add a key-value pair to the keyval zone - description: Adds a new key-value pair to the keyval shared memory + summary: Add a key-value pair to the HTTP keyval zone + description: Adds a new key-value pair to the HTTP keyval shared memory [zone](https://nginx.org/en/docs/http/ngx_http_keyval_module.html#keyval_zone). Several key-value pairs can be entered - if the keyval shared memory zone is empty. + if the HTTP keyval shared memory zone is empty. operationId: postHttpKeyvalZoneData produces: - application/json @@ -796,7 +798,7 @@ paths: name: Key-value description: A key-value pair is specified in the JSON format. Several key-value pairs can be entered - if the keyval shared memory zone is empty. + if the HTTP keyval shared memory zone is empty. required: true schema: $ref: '#/definitions/NginxHTTPKeyvalZone' @@ -871,8 +873,8 @@ paths: tags: - HTTP Keyvals - Method DELETE - summary: Empty the keyval zone - description: Deletes all key-value pairs from the keyval shared memory + summary: Empty the HTTP keyval zone + description: Deletes all key-value pairs from the HTTP keyval shared memory [zone](https://nginx.org/en/docs/http/ngx_http_keyval_module.html#keyval_zone). operationId: deleteHttpKeyvalZoneData responses: @@ -1301,6 +1303,179 @@ paths: description: Method disabled (*MethodDisabled*) schema: $ref: '#/definitions/NginxError' + /stream/keyvals/: + get: + tags: + - Stream Keyvals + - Method GET + summary: Return key-value pairs from all stream keyval zones + description: Returns key-value pairs for each stream keyval shared memory + [zone](https://nginx.org/en/docs/stream/ngx_stream_keyval_module.html#keyval_zone). + operationId: getStreamKeyvalZones + produces: + - application/json + parameters: + - name: fields + in: query + type: string + description: If the “fields” value is empty, + then only stream keyval zone names are output. + responses: + '200': + description: Success + schema: + $ref: '#/definitions/NginxStreamKeyvalZonesMap' + '404': + description: | + [stream](https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream) not configured (*StreamNotConfigured*) + schema: + $ref: '#/definitions/NginxError' + '/stream/keyvals/{streamKeyvalZoneName}': + parameters: + - name: streamKeyvalZoneName + in: path + description: The name of a stream keyval shared memory zone. + required: true + type: string + get: + tags: + - Stream Keyvals + - Method GET + summary: Return key-value pairs from a stream keyval zone + description: Returns key-value pairs stored in a particular stream keyval shared memory + [zone](https://nginx.org/en/docs/stream/ngx_stream_keyval_module.html#keyval_zone). + operationId: getStreamKeyvalZoneKeysValues + produces: + - application/json + parameters: + - name: key + in: query + type: string + description: Get a particular key-value pair from the stream keyval zone. + responses: + '200': + description: Success + schema: + $ref: '#/definitions/NginxStreamKeyvalZone' + '404': + description: | + Keyval not found (*KeyvalNotFound*), + keyval key not found (*KeyvalKeyNotFound*), + [stream](https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream) not configured (*StreamNotConfigured*) + schema: + $ref: '#/definitions/NginxError' + post: + tags: + - Stream Keyvals + - Method POST + summary: Add a key-value pair to the stream keyval zone + description: Adds a new key-value pair to the stream keyval shared memory + [zone](https://nginx.org/en/docs/stream/ngx_stream_keyval_module.html#keyval_zone). + Several key-value pairs can be entered + if the stream keyval shared memory zone is empty. + operationId: postStreamKeyvalZoneData + produces: + - application/json + parameters: + - in: body + name: Key-value + description: A key-value pair is specified in the JSON format. + Several key-value pairs can be entered + if the stream keyval shared memory zone is empty. + required: true + schema: + $ref: '#/definitions/NginxStreamKeyvalZone' + responses: + '201': + description: Created + '400': + description: | + Key required (*KeyvalFormatError*), + only one key can be added (*KeyvalFormatError*), + nested object or list (*KeyvalFormatError*) + schema: + $ref: '#/definitions/NginxError' + '404': + description: | + Keyval not found (*KeyvalNotFound*), + [stream](https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream) not configured (*StreamNotConfigured*) + schema: + $ref: '#/definitions/NginxError' + '405': + description: Method disabled (*MethodDisabled*) + schema: + $ref: '#/definitions/NginxError' + '409': + description: Key already exists (*KeyvalKeyExists*) + schema: + $ref: '#/definitions/NginxError' + '415': + description: JSON error (*JsonError*) + schema: + $ref: '#/definitions/NginxError' + patch: + tags: + - Stream Keyvals + - Method PATCH + summary: Modify a key-value or delete a key + description: Changes the value of the selected key in the key-value pair + or deletes a key by setting the key value to null. + operationId: patchStreamKeyvalZoneKeyValue + produces: + - application/json + parameters: + - in: body + name: streamKeyvalZoneKeyValue + description: A new value for the key is specified in the JSON format. + required: true + schema: + $ref: '#/definitions/NginxStreamKeyvalZone' + responses: + '204': + description: Success + '400': + description: | + Key required (*KeyvalFormatError*), + only one key can be updated (*KeyvalFormatError*), + nested object or list (*KeyvalFormatError*) + schema: + $ref: '#/definitions/NginxError' + '404': + description: | + Keyval not found (*KeyvalNotFound*), + keyval key not found (*KeyvalKeyNotFound*), + [stream](https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream) not configured (*StreamNotConfigured*) + schema: + $ref: '#/definitions/NginxError' + '405': + description: Method disabled (*MethodDisabled*) + schema: + $ref: '#/definitions/NginxError' + '415': + description: JSON error (*JsonError*) + schema: + $ref: '#/definitions/NginxError' + delete: + tags: + - Stream Keyvals + - Method DELETE + summary: Empty the stream keyval zone + description: Deletes all key-value pairs from the stream keyval shared memory + [zone](https://nginx.org/en/docs/stream/ngx_stream_keyval_module.html#keyval_zone). + operationId: deleteStreamKeyvalZoneData + responses: + '204': + description: Success + '404': + description: | + Keyval not found (*KeyvalNotFound*), + [stream](https://nginx.org/en/docs/stream/ngx_stream_core_module.html#stream) not configured (*StreamNotConfigured*) + schema: + $ref: '#/definitions/NginxError' + '405': + description: Method disabled (*MethodDisabled*) + schema: + $ref: '#/definitions/NginxError' ### ###DEFINITIONS ### @@ -2378,6 +2553,11 @@ definitions: description: Same as the down parameter of the HTTP upstream server. + drain: + type: boolean + description: Same as the + drain + parameter of the HTTP upstream server. parent: type: string description: Parent server ID of the resolved server. @@ -2388,14 +2568,6 @@ definitions: description: Hostname of the resolved server. The hostname is assigned automatically and cannot be changed. readOnly: true - drain: - type: boolean - description: Puts the HTTP upstream server into the “draining” mode. - In this mode, only requests - bound - to the server will be proxied to it. - The parameter cannot be initially set, - it can only be changed with the PATCH method. example: id: 1 server: 10.0.0.1:8089 @@ -2408,9 +2580,9 @@ definitions: backup: true down: true NginxHTTPKeyvalZonesMap: - title: Keyval Shared Memory Zones + title: HTTP Keyval Shared Memory Zones description: | - Contents of all keyval shared memory zones. + Contents of all HTTP keyval shared memory zones. type: object additionalProperties: $ref: '#/definitions/NginxHTTPKeyvalZone' @@ -2424,9 +2596,9 @@ definitions: arg2: value2 arg3: value3 NginxHTTPKeyvalZone: - title: Keyval Shared Memory Zone + title: HTTP Keyval Shared Memory Zone description: | - Contents of a keyval shared memory zone. + Contents of an HTTP keyval shared memory zone. type: object example: key1: value1 @@ -2943,6 +3115,31 @@ definitions: slow_start: 0 backup: false down: false + NginxStreamKeyvalZonesMap: + title: Stream Keyval Shared Memory Zones + description: | + Contents of all stream keyval shared memory zones. + type: object + additionalProperties: + $ref: '#/definitions/NginxStreamKeyvalZone' + example: + keyval_zone: + key1: value1 + key2: value2 + key3: value3 + one: + arg1: value1 + arg2: value2 + arg3: value3 + NginxStreamKeyvalZone: + title: Stream Keyval Shared Memory Zone + description: | + Contents of a stream keyval shared memory zone. + type: object + example: + key1: value1 + key2: value2 + key3: value3 NginxError: title: Error description: |