Update a Load Balancer Service

PUT /load-balancer/{id}/service/{service-id}

Path parameters

application/json

Body Required

  • name string

    Load Balancer Service name

    Maximum length is 255.

  • Load Balancer Service description

    Maximum length is 255.

  • protocol string

    Network traffic protocol

    Values are tcp or udp.

  • strategy string

    Load balancing strategy

    Values are round-robin, maglev-hash, or source-hash.

  • port integer(int64)

    Port exposed on the Load Balancer's public IP

    Minimum value is 1, maximum value is 65535.

  • target-port integer(int64)

    Port on which the network traffic will be forwarded to on the receiving instance

    Minimum value is 1, maximum value is 65535.

  • Healthcheck configuration

    Additional properties are allowed.

    Hide healthcheck attributes Show healthcheck attributes object
    • mode string

      Healthcheck mode

      Values are tcp, http, or https.

    • interval integer(int64)

      Healthcheck interval (default: 10). Must be greater than or equal to Timeout

      Minimum value is 5, maximum value is 300.

    • uri string

      An endpoint to use for the HTTP healthcheck, e.g. '/status'

      Minimum length is 1, maximum length is 255.

    • port integer(int64)

      Healthcheck port

      Minimum value is 1, maximum value is 65535.

    • timeout integer(int64)

      Healthcheck timeout value (default: 2). Must be lower than or equal to Interval

      Minimum value is 2, maximum value is 60.

    • retries integer(int64)

      Number of retries before considering a Service failed

      Minimum value is 1, maximum value is 20.

    • tls-sni string

      SNI domain for HTTPS healthchecks

      Minimum length is 1, maximum length is 255.

Responses

  • 200 application/json

    200

    Hide response attributes Show response attributes object
    • id string(uuid)

      Operation ID

    • reason string

      Operation failure reason

      Values are incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, or conflict.

    • Related resource reference

      Additional properties are allowed.

      Hide reference attributes Show reference attributes object
      • id string(uuid)

        Reference ID

      • command string

        Command name

    • message string

      Operation message

    • state string

      Operation status

      Values are failure, pending, success, or timeout.

PUT /load-balancer/{id}/service/{service-id}
curl \
 -X PUT https://api-ch-gva-2.exoscale.com/v2/load-balancer/{id}/service/{service-id} \
 -H "Content-Type: application/json" \
 -d '{"name":"string","description":"string","protocol":"tcp","strategy":"round-robin","port":42,"target-port":42,"healthcheck":{"mode":"tcp","interval":42,"uri":"string","port":42,"timeout":42,"retries":42,"tls-sni":"string"}}'
Request examples
{
  "name": "string",
  "description": "string",
  "protocol": "tcp",
  "strategy": "round-robin",
  "port": 42,
  "target-port": 42,
  "healthcheck": {
    "mode": "tcp",
    "interval": 42,
    "uri": "string",
    "port": 42,
    "timeout": 42,
    "retries": 42,
    "tls-sni": "string"
  }
}
Response examples (200)
{
  "id": "string",
  "reason": "incorrect",
  "reference": {
    "id": "string",
    "link": "string",
    "command": "string"
  },
  "message": "string",
  "state": "failure"
}