NSX-T Data Center REST API
Update an Existing Section with Rules (Removed in 4.0)
Modifies an existing serviceinsertion section along with its relative positionamong other serviceinsertion sections with rules. When invoked on a large number
of rules, this API is supported only at low rates of invocation (not more
than 2 times per minute). The typical latency of this API with about 1024
rules is about 15 seconds in a cluster setup. This API should not be
invoked with large payloads at automation speeds.
Instead, to move a section above or below another section, use:
POST /api/v1/serviceinsertion/sections/<section-id>?action=revise
To modify rules, use:
PUT /api/v1/serviceinsertion/sections/<section-id>/rules/<rule-id>
Deprecated: Note- POST service insertion section API is deprecated. Please use policy redirection-policy API.
Request:
Method:
POST
URI Path(s):
/api/v1/serviceinsertion/sections/{section-id}?action=revise_with_rules
Request Headers:
n/a
Query Parameters:
ServiceInsertionInsertParameters+
Request Body:
ServiceInsertionSectionRuleList+
Example Request:
{ "section_type":"L3REDIRECT", "id": "2111d18f-27ba-4f19-a51d-2173c3972410", "display_name":"another L3 Redirect Section with Rules", "stateful":false, "applied_tos": [ { "target_display_name": "Tier0-LR-1", "is_valid": true, "target_type": "LogicalRouter", "target_id": "b489b427-9f14-401e-81db-d1105a1917fe" } ], "rules":[ { "display_name": "L3 redirect rule1", "action":"ALLOW", "direction":"IN_OUT", "redirect_tos": [ { "target_display_name": "service-1", "is_valid": true, "target_type": "ServiceInstance", "target_id": "1d9fb5cb-0344-4d7f-899a-afd93276899f" } ], "applied_tos": [ { "target_display_name": "plr1_uplink1", "is_valid": true, "target_type": "LogicalRouterPort", "target_id": "bd91fc7f-cd76-438b-8d4f-21dbdc707af7" } ], "sources": [ { "target_display_name": "192.168.100.5", "is_valid": true, "target_type": "IPv4Address", "target_id": "192.168.100.5" } ], "destinations": [ { "target_display_name": "192.168.100.6", "is_valid": true, "target_type": "IPv4Address", "target_id": "192.168.100.6" } ] } ] } example_response: | { "resource_type": "ServiceInsertionSectionRuleList", "id": "2111d18f-27ba-4f19-a51d-2173c3972410", "display_name": "Another L3 Redirect Section with Rules", "section_type": "L3REDIRECT", "is_default": false, "stateful": false, "applied_tos": [ { "target_display_name": "Tier0-LR-1", "is_valid": true, "target_type": "LogicalRouter", "target_id": "b489b427-9f14-401e-81db-d1105a1917fe" } ], "rule_count": 1, "rules": [ { "id": "7168", "display_name": "L3 redirect rule1", "section_id": "2111d18f-27ba-4f19-a51d-2173c3972410", "destinations_excluded": false, "redirect_tos": [ { "target_display_name": "service-1", "is_valid": true, "target_type": "ServiceInstance", "target_id": "1d9fb5cb-0344-4d7f-899a-afd93276899f" } ], "applied_tos": [ { "target_display_name": "plr1_uplink1", "is_valid": true, "target_type": "LogicalRouterPort", "target_id": "bd91fc7f-cd76-438b-8d4f-21dbdc707af7" } ], "sources": [ { "target_display_name": "192.168.100.5", "is_valid": true, "target_type": "IPv4Address", "target_id": "192.168.100.5" } ], "destinations": [ { "target_display_name": "192.168.100.5", "is_valid": true, "target_type": "IPv4Address", "target_id": "192.168.100.5" } ], "ip_protocol": "IPV4_IPV6", "logged": false, "action": "REDIRECT", "sources_excluded": false, "disabled": false, "direction": "IN_OUT", "_revision": 1 } ], "_last_modified_user": "admin", "_last_modified_time": 1446245476635, "_revision": 1 }Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
ServiceInsertionSectionRuleList+