lb.services.updateChange a service’s health check or sticky sessions
Only the fields sent change; the rules across fields are checked against the service as it then is. healthCheckTimeout may not exceed healthCheckInterval, an interval under 3 s is refused on lb11/lb21/lb31, and sticky sessions are refused (400) on a tcp service. The change reaches the load balancer within seconds; an https service still waiting for its certificate gets it when the certificate is served.
Request syntax
PATCH /lb/api/load-balancers/{id}/services/{serviceId}
{
"healthCheckProtocol": "enum",
"healthCheckPath": "string",
"healthCheckInterval": "number",
"healthCheckTimeout": "number",
"healthCheckRetries": "number",
"stickySessions": "boolean",
"stickyCookieName": "string",
"stickyCookieLifetime": "number"
}Path parameters
idRequiredstring
Constraints: uuid
serviceIdRequiredstring
Constraints: uuid
Request body
healthCheckProtocolOptionalenum
http (default): GET the health-check path, 2xx/3xx is healthy. tcp: a connection is enough
One of:
http,tcphealthCheckPathOptionalstring
HTTP path probed for health when healthCheckProtocol is http: starts with /, at most 256 characters (default /)
Constraints: 1-256 chars, /^\//
healthCheckIntervalOptionalnumber
Seconds between health checks (default 15): 3–60 on lb11/lb21/lb31 (400 below 3), 1–60 on application and dedicated load balancers
Constraints: integer, 1-60
healthCheckTimeoutOptionalnumber
Seconds a health check may take, 1–60 and at most the interval (400 above it; default 10)
Constraints: integer, 1-60
healthCheckRetriesOptionalnumber
Failed checks in a row before a target stops taking traffic (0–5, default 3). A dead target keeps traffic for about interval × (retries + 1)
Constraints: integer, 0-5
stickySessionsOptionalboolean
http/https: pin each client to one target with a cookie the load balancer sets (default false; refused with 400 on a tcp service)
stickyCookieNameOptionalstring
Name of the sticky-session cookie (default EWSLB)
Constraints: /^[A-Za-z0-9_-]{1,64}$/
stickyCookieLifetimeOptionalnumber
Seconds the sticky-session cookie lasts (60 s – 7 days, default 300)
Constraints: integer, 60-604800
Response
200 with the service as now set (every field `services add` returns). 400 with no field sent, or when the result breaks a rule across fields; 404 when the service is not on this load balancer. A load balancer another service owns (a Kubernetes Service, a database endpoint) is refused with 409: change it through its owner.
A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.
Errors
- 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
- 401No credentials, or an access key that is unknown, revoked or expired.
- 403The caller's policies do not allow lb:UpdateService on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
- 404The resource does not exist in your organization.
Examples
The required parameters only, with example values. Replace id and the other placeholders with your own.
dcloud lb services update id serviceIdcurl -X PATCH "https://console.platform-development.deutschecloud.app/lb/api/load-balancers/id/services/serviceId" \
-H "Authorization: EWS-ACCESS-KEY $ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{}'Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_lb_services_update.