Help Center/
Elastic Load Balance/
API Reference/
Historical APIs/
Getting Started/
Adding a Listener
Updated on 2023-12-18 GMT+08:00
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 } }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot