Skip to main content
PATCH
Scale or resize a load balancer
Requires the IAM action loadbalancer:UpdateLoadBalancer. See LOADBALANCER permissions for the full list, what each one covers, and an example policy.

Authorizations

Authorization
string
header
required

An OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. This is the recommended way to authenticate.

Get one by exchanging a service account's access key pair at POST /v1/oauth/token with grant_type=client_credentials. It is the standard client-credentials grant, so any OAuth-aware library will obtain and refresh it for you.

Tokens last an hour by default. The same access key pair is separately your AWS SigV4 credential for the S3-compatible object endpoint, which speaks nothing else.

Path Parameters

id
string
required
Example:

"4e1f8c2a-9b3d-4f6e-8a1c-2d5e7f9a0b3c"

Body

application/json

Names are fixed at creation because they form the CRN used by IAM policies. Sending name in an update, including an unchanged, empty or null value, returns a validation error.

replica_count
integer

Resize the set of load balancer instances. Scale-out provisions the new replicas in sequence; scale-in removes the highest-indexed replicas best-effort. 1..10.

Required range: 1 <= x <= 10
Example:

3

flavor
string

Resize each replica to a different compute flavor. Must be a loadbalancer-family flavor.

A running instance cannot change size in place, so the request records the new size and returns; the replicas already up are then replaced one at a time in the background. The load balancer temporarily runs one replica over replica_count while it does: the extra replica comes up on the new flavor and starts serving before any replica on the old one is retired, so the number serving never drops below replica_count — a resize does not cost you capacity, at any replica count.

Expect it to take several minutes, and poll GET /v1/load-balancers/{id}/replicas to watch: a replica has been replaced when its instance_id changes, and the resize is done when every flavor there matches this one.

The one exception is a load balancer already at the maximum of 10 replicas, which has nowhere to grow. There the replicas are replaced in place and 9 serve while each replacement boots.

Rejected up front if the account does not have the compute quota for the replacement replica, so a resize cannot half-apply and leave the load balancer short.

Example:

"e5f6a7b8-c9d0-4123-e4f5-a6b7c8d9e0f1"

tags
object
Example:

Response

OK

load_balancer
object