Adding a Listener
API Format
|
Method |
URI |
Description |
|---|---|---|
|
POST |
/v2.0/lbaas/listeners |
Adds a listener. |
Constraints
Each listener added a load balancer can listen on only one port.
Procedure
- Set the request header. Set the header in Postman and place the obtained token in the header.

- Under Body, set the request body.

- Enter the URL.
https://elb.cn-east-2.myhuaweicloud.com/v2.0/lbaas/listeners
- Send the request. Set the POST request method and click Send to wait for response from the server.
{ "listener": { "protocol_port": 80, "protocol": "HTTP", "description": "", "default_tls_container_ref": null, "admin_state_up": true, "loadbalancers": [ { "id": "abe3ee34-1882-408f-a2ba-1ce7e428d6e3" } ], "tenant_id": "0d0bf0e8fb564cc9abbe526dbdca9248", "sni_container_refs": [], "connection_limit": -1, "default_pool_id": null, "id": "779d77c8-f3f9-486d-a598-18e2aa2aa319", "name": "listener4guide" } }
Sample Code
Request body in 2
{
"listener": {
"protocol_port": "80",
"protocol": "HTTP",
"loadbalancer_id": "abe3ee34-1882-408f-a2ba-1ce7e428d6e3",
"name": "listener4guide",
"admin_state_up": true
}
}
Last Article: Creating a Public Network Load Balancer
Next Article: Creating a Backend Server Group
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.