Reconfigure An Environments Load Balancer

Creates a task that will update the load balancer's configuration.

Requires the environments-services-manage permission.

Parameters: token hubIdenvironment IDvalue/contents

Parameter
  • action
    string

    Create a task resulting in the following action: reconfigure.

  • contents
    object

    An object holding information about the reconfiguration of the Discovery service.

    Show child fields

Returns

Returns an task resource, otherwise returns an Error.

POST /v1/environments/5b9c2a77b6393d0001eb45fd/services/lb/tasks

Example Request
$ curl https://api.cycle.io/v1/environments/5b9c2a77b6393d0001eb45fd/services/lb/tasks \
-H
"Authorization: Bearer API_KEY"
\
-H
"X-Hub-Id: HUB_ID"
\
-H 'Content-Type: application/json' \
-d '{"action":"reconfigure","contents":{"config":{"haproxy":{"default":{"frontend":{"mode":"tcp","max_connections":1500,"timeouts":{"client_secs":8,"client_fin_ms":null,"http_keep_alive_ms":null,"http_request_ms":null}},"backend":{"balance":"static-rr","timeouts":{"server_secs":8,"server_fin_ms":null,"connect_ms":250,"queue_ms":250,"tunnel_secs":null}}},"ports":{"1194":{"frontend":{"mode":"tcp","max_connections":100,"timeouts":{"client_secs":8,"client_fin_ms":null,"http_keep_alive_ms":null,"http_request_ms":null}},"backend":{"balance":"source","timeouts":{"server_secs":8,"server_fin_ms":null,"connect_ms":500,"queue_ms":500,"tunnel_secs":null}}}}},"ipv4":true,"ipv6":true},"high_availability":false}}' \
-X POST
Example Response
{
"data": {
"action": "reconfigure",
"job_id": "5b9c2a77b6393d0001eb45fd"
}
}