Upstreams

Update an Upstream

Update an Upstream

patch/upstreams/{UpstreamIdOrName}

Request body

algorithm'consistent-hashing' | 'least-connections' | 'round-robin' | 'latency'

Which load balancing algorithm to use.

created_atinteger

Unix epoch when the resource was created.

hash_fallback'none' | 'consumer' | 'ip' | 'header' | 'cookie' | 'path' | 'query_arg' | 'uri_capture'

What to use as hashing input if the primary hash_on does not return a hash (eg. header is missing, or no Consumer identified). Not available if hash_on is set to cookie.

hash_fallback_headerstring

The header name to take the value from as hash input. Only required when hash_fallback is set to header.

hash_fallback_query_argstring

The name of the query string argument to take the value from as hash input. Only required when hash_fallback is set to query_arg.

hash_fallback_uri_capturestring

The name of the route URI capture to take the value from as hash input. Only required when hash_fallback is set to uri_capture.

hash_on'none' | 'consumer' | 'ip' | 'header' | 'cookie' | 'path' | 'query_arg' | 'uri_capture'

What to use as hashing input. Using none results in a weighted-round-robin scheme with no hashing.

hash_on_cookiestring

The cookie name to take the value from as hash input. Only required when hash_on or hash_fallback is set to cookie. If the specified cookie is not in the request, Kong will generate a value and set the cookie in the response.

hash_on_cookie_pathstring

The cookie path to set in the response headers. Only required when hash_on or hash_fallback is set to cookie.

hash_on_headerstring

The header name to take the value from as hash input. Only required when hash_on is set to header.

hash_on_query_argstring

The name of the query string argument to take the value from as hash input. Only required when hash_on is set to query_arg.

hash_on_uri_capturestring

The name of the route URI capture to take the value from as hash input. Only required when hash_on is set to uri_capture.

host_headerstring

The hostname to be used as Host header when proxying requests through Kong.

idstring
namestring

This is a hostname, which must be equal to the host of a Service.

slotsinteger

The number of slots in the load balancer algorithm. If algorithm is set to round-robin, this setting determines the maximum number of slots. If algorithm is set to consistent-hashing, this setting determines the actual number of slots in the algorithm. Accepts an integer in the range 10-65536.

tagsstring[]

An optional set of strings associated with the Upstream for grouping and filtering.

updated_atinteger

Unix epoch when the resource was last updated.

use_srv_nameboolean

If set, the balancer will use SRV hostname(if DNS Answer has SRV record) as the proxy upstream Host.

Response

Successfully updated Upstream

algorithm'consistent-hashing' | 'least-connections' | 'round-robin' | 'latency'

Which load balancing algorithm to use.

created_atinteger

Unix epoch when the resource was created.

hash_fallback'none' | 'consumer' | 'ip' | 'header' | 'cookie' | 'path' | 'query_arg' | 'uri_capture'

What to use as hashing input if the primary hash_on does not return a hash (eg. header is missing, or no Consumer identified). Not available if hash_on is set to cookie.

hash_fallback_headerstring

The header name to take the value from as hash input. Only required when hash_fallback is set to header.

hash_fallback_query_argstring

The name of the query string argument to take the value from as hash input. Only required when hash_fallback is set to query_arg.

hash_fallback_uri_capturestring

The name of the route URI capture to take the value from as hash input. Only required when hash_fallback is set to uri_capture.

hash_on'none' | 'consumer' | 'ip' | 'header' | 'cookie' | 'path' | 'query_arg' | 'uri_capture'

What to use as hashing input. Using none results in a weighted-round-robin scheme with no hashing.

hash_on_cookiestring

The cookie name to take the value from as hash input. Only required when hash_on or hash_fallback is set to cookie. If the specified cookie is not in the request, Kong will generate a value and set the cookie in the response.

hash_on_cookie_pathstring

The cookie path to set in the response headers. Only required when hash_on or hash_fallback is set to cookie.

hash_on_headerstring

The header name to take the value from as hash input. Only required when hash_on is set to header.

hash_on_query_argstring

The name of the query string argument to take the value from as hash input. Only required when hash_on is set to query_arg.

hash_on_uri_capturestring

The name of the route URI capture to take the value from as hash input. Only required when hash_on is set to uri_capture.

host_headerstring

The hostname to be used as Host header when proxying requests through Kong.

idstring
namestring

This is a hostname, which must be equal to the host of a Service.

slotsinteger

The number of slots in the load balancer algorithm. If algorithm is set to round-robin, this setting determines the maximum number of slots. If algorithm is set to consistent-hashing, this setting determines the actual number of slots in the algorithm. Accepts an integer in the range 10-65536.

tagsstring[]

An optional set of strings associated with the Upstream for grouping and filtering.

updated_atinteger

Unix epoch when the resource was last updated.

use_srv_nameboolean

If set, the balancer will use SRV hostname(if DNS Answer has SRV record) as the proxy upstream Host.

Changes