Load balancer API reference¶
See https://docs.openstack.org/octavia/2023.2/cli/index.html.
In these methods, {loadbalancer_id}
, {listener_id}
, and {pool_id}
are placeholders that should be replaced with the actual IDs of the load balancer, listener, and pool, respectively. These methods allow you to manage load balancers, listeners, and pools in the OpenStack Load Balancer service, including creating, listing, showing details of, updating, and deleting these resources.
List load balancers¶
GET /v2.0/lbaas/loadbalancers
Show load balancer details¶
GET /v2.0/lbaas/loadbalancers/{loadbalancer_id}
Create a boad balancer¶
POST /v2.0/lbaas/loadbalancers
Request body ```json { "loadbalancer": { "name": "loadbalancer_name", "vip_subnet_id": "subnet_id" } }
### Update a load balancer
`PUT /v2.0/lbaas/loadbalancers/{loadbalancer_id}`
Request body
```json
{
"loadbalancer": {
"name": "new_loadbalancer_name"
}
}
Delete a load balancer¶
DELETE /v2.0/lbaas/loadbalancers/{loadbalancer_id}
List listeners¶
GET /v2.0/lbaas/listeners
Show listener details¶
GET /v2.0/lbaas/listeners/{listener_id}
Create a listener¶
POST /v2.0/lbaas/listeners
Request body
{
"listener": {
"name": "listener_name",
"protocol": "HTTP",
"protocol_port": 80,
"loadbalancer_id": "loadbalancer_id"
}
}
Update a listener¶
PUT /v2.0/lbaas/listeners/{listener_id}
Request body
Delete a listener¶
DELETE /v2.0/lbaas/listeners/{listener_id}
List pools¶
GET /v2.0/lbaas/pools
Show Ppool details¶
GET /v2.0/lbaas/pools/{pool_id}
Create a pool¶
POST /v2.0/lbaas/pools
Request body
{
"pool": {
"name": "pool_name",
"protocol": "HTTP",
"lb_algorithm": "ROUND_ROBIN",
"listener_id": "listener_id"
}
}
Update a pool¶
PUT /v2.0/lbaas/pools/{pool_id}
Request body:
Delete a pool¶
DELETE /v2.0/lbaas/pools/{pool_id}