Help Center/
Elastic Load Balance/
API Reference/
Historical APIs/
Getting Started/
Adding a Forwarding Rule
Updated on 2023-12-18 GMT+08:00
Adding a Forwarding Rule
API Format
Method |
URI |
Description |
---|---|---|
POST |
/v2.0/lbaas/l7policies/{l7policy_id}/rules |
Adds a forwarding rule. |
Constraints
The type of forwarding rules for the same forwarding policy cannot be the same.
Procedure
- Set the request header. Set the header in Postman and place the obtained token in the header.
- Create a forwarding rule for the request whose name starts with /music.
POST https://elb.cn-east-2.myhuaweicloud.com/v2.0/lbaas/l7policies/5b94fb42-b018-4ad6-9ba6-0e8a509c6821/rules { "rule": { "compare_type": "STARTS_WITH", "type": "PATH", "value": "/music" } }
- Create a forwarding rule for the request whose name starts with /pic.
POST https://elb.cn-east-2.myhuaweicloud.com/v2.0/lbaas/l7policies/f6c5862d-460c-4ab6-8dc7-2294df442f67/rules { "rule": { "compare_type": "STARTS_WITH", "type": "PATH", "value": "/pic" } }
- Check the created forwarding rules on the web console.
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