---
title: "Update a Load Balancer Service"
method: PUT
path: "/load-balancer/{id}/service/{service-id}"
tags: ["network-load-balancer"]
---

# Update a Load Balancer Service

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

## Request

- Base URL: `https://api-ch-gva-2.exoscale.com/v2`
- URL: `https://api-ch-gva-2.exoscale.com/v2/load-balancer/{id}/service/{service-id}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/exoscale/apis/exoscale-api/docs/load-balancer/:id/service/:service-id/put.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `id` string, uuid, required
- `service-id` string, uuid, required

## Request body

- object
  - `name` string: Load Balancer Service name
  - `description` string: Load Balancer Service description
  - `protocol` 'tcp' | 'udp': Network traffic protocol
  - `strategy` 'round-robin' | 'maglev-hash' | 'source-hash': Load balancing strategy
  - `port` integer: Port exposed on the Load Balancer's public IP
  - `target-port` integer: Port on which the network traffic will be forwarded to on the receiving instance
  - `healthcheck` LoadBalancerServiceHealthcheck: Load Balancer Service healthcheck
    - `mode` 'tcp' | 'http' | 'https': Healthcheck mode
    - `interval` integer: Healthcheck interval (default: 10). Must be greater than or equal to Timeout
    - `uri` string: An endpoint to use for the HTTP healthcheck, e.g. '/status'
    - `port` integer: Healthcheck port
    - `timeout` integer: Healthcheck timeout value (default: 2). Must be lower than or equal to Interval
    - `retries` integer: Number of retries before considering a Service failed
    - `tls-sni` string: SNI domain for HTTPS healthchecks

## Response `200`

200

- Operation: Operation
  - `id` string, uuid: Operation ID
  - `reason` 'incorrect' | 'unknown' | 'unavailable' | 'forbidden' | 'busy' | 'fault' | 'partial' | 'not-found' | 'interrupted' | 'unsupported' | 'conflict': Operation failure reason
  - `reference` object: Related resource reference
    - `id` string, uuid: Reference ID
    - `link` string: Link to the referenced resource
    - `command` string: Command name
  - `message` string: Operation message
  - `state` 'failure' | 'pending' | 'success' | 'timeout': Operation status

## Changes

- **2024-09-18** `eae1143f1c63`: 1 info
  - added the new `maglev-hash` enum value to the request property `strategy`
- **2023-06-06** `cf7b08181585`: 3 breaking, 4 warning, 2 info
  - the request property `description` became not nullable
  - the `port` request property's min was increased to `1.00`
  - the `target-port` request property's min was increased to `1.00`
  - the `port` request property's exclusiveMaximum was set to `false`
  - …5 more
- **2023-02-03** `6e9809fd1444`: 2 breaking, 2 warning, 1 info
  - the `healthcheck/tls-sni` request property's minLength was increased from `0` to `1`
  - the `healthcheck/uri` request property's minLength was increased from `0` to `1`
  - the `healthcheck/tls-sni` request property's maxLength was set to `255`
  - the `healthcheck/uri` request property's maxLength was set to `255`
  - …1 more

[Operation history](https://skmtc.dev/exoscale/apis/exoscale-api/changes/load-balancer/:id/service/:service-id/put.md)

---

[API](https://skmtc.dev/exoscale/apis/exoscale-api.md) - [All operations](https://skmtc.dev/exoscale/apis/exoscale-api/llms.txt) - [OpenAPI document](https://skmtc.dev/exoscale/apis/exoscale-api/revisions/63da6f74c845?raw)
