Load Balancer Labels
Labels are key-value pairs that help you organize and categorize load balancer services. Use labels to filter services, apply policies, or track resources across your infrastructure.
GET/1.3/load-balancer/{lb_uuid}/labels
List labels
Returns a list of all labels for a load balancer.
Request
GET
/1.3/load-balancer/{lb_uuid}/labelscurl -X GET https://api.upcloud.com/1.3/load-balancer/0a1b2c3d-4e5f-6789-abcd-ef0123456789/labels \
-u your_username:your_password
GET/1.3/load-balancer/{lb_uuid}/labels/{key}
Get label details
Returns details of a specific label.
Request
GET
/1.3/load-balancer/{lb_uuid}/labels/{key}curl -X GET https://api.upcloud.com/1.3/load-balancer/0a1b2c3d-4e5f-6789-abcd-ef0123456789/labels/environment \
-u your_username:your_password
POST/1.3/load-balancer/{lb_uuid}/labels
Create label
Creates a new label for a load balancer.
Attributes
- Name
key- Type
- string
- Description
Label key (1-255 chars, alphanumeric with - and _).
- Name
value- Type
- string
- Description
Label value (1-255 chars).
Request
POST
/1.3/load-balancer/{lb_uuid}/labelscurl -X POST https://api.upcloud.com/1.3/load-balancer/0a1b2c3d-4e5f-6789-abcd-ef0123456789/labels \
-u your_username:your_password \
-H "Content-Type: application/json" \
-d '{
"key": "cost-center",
"value": "engineering"
}'
PATCH/1.3/load-balancer/{lb_uuid}/labels/{key}
Modify label
Modifies an existing label's value.
Attributes
- Name
value- Type
- string
- Description
Updated label value.
Request
PATCH
/1.3/load-balancer/{lb_uuid}/labels/{key}curl -X PATCH https://api.upcloud.com/1.3/load-balancer/0a1b2c3d-4e5f-6789-abcd-ef0123456789/labels/environment \
-u your_username:your_password \
-H "Content-Type: application/json" \
-d '{
"value": "staging"
}'
DELETE/1.3/load-balancer/{lb_uuid}/labels/{key}
Delete label
Deletes a label from a load balancer.
Request
DELETE
/1.3/load-balancer/{lb_uuid}/labels/{key}curl -X DELETE https://api.upcloud.com/1.3/load-balancer/0a1b2c3d-4e5f-6789-abcd-ef0123456789/labels/cost-center \
-u your_username:your_password