NSX-T Data Center REST API
Add Multiple Rules in a Section (Removed in 4.0)
Create multiple serviceinsertion rules in existing serviceinsertion section bounded bylimit of 1000 serviceinsertion rules per section.
Deprecated: Note- POST service insertion rules API is deprecated. Please use policy redirection-policy API.
Request:
Method:
POST
URI Path(s):
/api/v1/serviceinsertion/sections/{section-id}/rules?action=create_multiple
Request Headers:
n/a
Query Parameters:
ServiceInsertionInsertParameters+
Request Body:
ServiceInsertionRuleList+
Example Request:
{ "rules" : [ { "display_name": "L3 redirect rule1", "action":"REDIRECT", "direction":"IN_OUT", "redirect_tos": [ { "target_display_name": "service-1", "is_valid": true, "target_type": "ServiceInstance", "target_id": "1d9fb5cb-0344-4d7f-899a-afd93276899f" } ], "sources": [ { "target_display_name": "192.168.100.7", "is_valid": true, "target_type": "IPv4Address", "target_id": "192.168.100.7" } ], "applied_tos": [ { "target_display_name": "plr1_uplink1", "is_valid": true, "target_type": "LogicalRouterPort", "target_id": "bd91fc7f-cd76-438b-8d4f-21dbdc707af7" } ], "destinations": [ { "target_display_name": "192.168.100.8", "is_valid": true, "target_type": "IPv4Address", "target_id": "192.168.100.8" } ] }, { "display_name": "L3 redirect rule2", "action":"REDIRECT", "direction":"IN_OUT", "redirect_tos": [ { "target_display_name": "service-1", "is_valid": true, "target_type": "ServiceInstance", "target_id": "1d9fb5cb-0344-4d7f-899a-afd93276899f" } ], "sources": [ { "target_display_name": "192.168.100.9", "is_valid": true, "target_type": "IPv4Address", "target_id": "192.168.100.9" } ], "applied_tos": [ { "target_display_name": "plr1_uplink1", "is_valid": true, "target_type": "LogicalRouterPort", "target_id": "bd91fc7f-cd76-438b-8d4f-21dbdc707af7" } ], "destinations": [ { "target_display_name": "192.168.100.9", "is_valid": true, "target_type": "IPv4Address", "target_id": "192.168.100.9" } ] } ] }Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
ServiceInsertionRuleList+