NSX-T Data Center REST API
Create a load balancer rule (Deprecated)
Create a load balancer rule.Deprecated:
NSX-T Load Balancer is deprecated.
Please take advantage of NSX Advanced Load Balancer.
Refer to Policy > Networking > Network Services > Advanced Load Balancing section of the API guide.
Request:
Method:
POST
URI Path(s):
/api/v1/loadbalancer/rules
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
LbRule+
Example Request:
{ "resource_type": "LbRule", "display_name": "URIRewriteRule", "description": "Sample URI rewrite rule", "match_conditions" : [{ "type": "LbHttpRequestUriCondition", "match_type": "REGEX", "uri": "/news/(?<year>\\d+)/(?<month>\\d+)/(?<article>.*)", "inverse": false }], "match_strategy" : "ALL", "phase" : "HTTP_REQUEST_REWRITE", "actions" : [{ "type": "LbHttpRequestUriRewriteAction", "uri": "/news/$year-$month-$article" }] }Successful Response:
Response Code:
201 Created
Response Headers:
Content-type: application/json
Response Body:
LbRule+