dcloud lb services update

Change a service’s health check or sticky sessions

IAM lb:UpdateServiceChanges stateAsks before it deletes (-y skips)

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.

Synopsis

dcloud lb services update id serviceId [flags]

Arguments

  • <id>Required

    string

    Also accepted as --id. Constraints: uuid

  • <serviceId>Required

    string

    Also accepted as --service-id. Constraints: uuid

Flags

  • --health-check-protocolOptional

    enum

    http (default): GET the health-check path, 2xx/3xx is healthy. tcp: a connection is enough

    One of: http, tcp

  • --health-check-pathOptional

    string

    HTTP path probed for health when healthCheckProtocol is http: starts with /, at most 256 characters (default /)

    Constraints: 1-256 chars, /^\//

  • --health-check-intervalOptional

    number

    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

  • --health-check-timeoutOptional

    number

    Seconds a health check may take, 1–60 and at most the interval (400 above it; default 10)

    Constraints: integer, 1-60

  • --health-check-retriesOptional

    number

    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

  • --sticky-sessionsOptional

    boolean (--sticky-sessions / --no-sticky-sessions)

    http/https: pin each client to one target with a cookie the load balancer sets (default false; refused with 400 on a tcp service)

  • --sticky-cookie-nameOptional

    string

    Name of the sticky-session cookie (default EWSLB)

    Constraints: /^[A-Za-z0-9_-]{1,64}$/

  • --sticky-cookie-lifetimeOptional

    number

    Seconds the sticky-session cookie lasts (60 s – 7 days, default 300)

    Constraints: integer, 60-604800

Example

dcloud lb services update id serviceId

Generated from the API description, the same one the API checks requests against and the CLI is built from.