Load Balancers /
Patch load balancer
Updates a load balancer
Required permission
Account > LoadBalancers > General > Update
Path parameters
loadBalancerId
string requiredID of the load balancer
Request body
- {object}
name
stringThe name of the load balancer.min length3max length39pattern^[a-zA-Z]((-|\s)?[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*)?$description
stringThe description of the load balancer.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$spec
{object}Load balancer specification
Response body
- {object}Response object.
data
{object} requiredResult data.id
string requiredID of the load balancerpattern^[A-Za-z0-9-]+$name
string requiredThe name of the load balancer.min length3max length39pattern^[a-zA-Z]((-|\s)?[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*)?$description
stringThe description of the load balancer.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$spec
{object} requiredLoad balancer specificationstate
{object}endpoints
[array]Public IP addresses (endpoints) of the load balancer- string
status
string requiredCurrent status of the load balancerone ofpending, provisioning, provisioned, error, deleting, deletedlastTransitionTime
string requiredTime of the last status transitioncreatedAt
string requiredThe time the load balancer was created.updatedAt
string requiredThe time the load balancer was last updated.
API
CLI
JS Client
PATCH /v1/load-balancers/{loadBalancerId}
Example request
Request body
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request PATCH \
--data '{"name":"my-load-balancer","description":"This is a new load balancer.","spec":{"type":"tcp","target":{"type":"region","targetId":"europe-west"},"ports":[{"id":"port-80","backends":[{"id":"my-project/my-service","type":"service","port":3000,"weight":1}]}]}}' \
https://api.northflank.com/v1/load-balancers/{loadBalancerId}Example response
200 OK
Details about the updated load balancer.
JSON
{
"data": {
"id": "my-load-balancer",
"name": "my-load-balancer",
"description": "This is a new load balancer.",
"spec": {
"type": "tcp",
"target": {
"type": "region",
"targetId": "europe-west"
},
"ports": [
{
"id": "port-80",
"backends": [
{
"id": "my-project/my-service",
"type": "service",
"port": 3000,
"weight": 1
}
]
}
]
},
"state": {
"status": "provisioned"
},
"createdAt": "2021-01-20T11:19:53.175Z",
"updatedAt": "2021-01-20T11:19:53.175Z"
}
}