Management Plane API > Security > Services > Service Insertion

Update an Existing Section, Including Its Rules

Modifies existing serviceinsertion section along with its association 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 update rule content, use:
PUT /api/v1/serviceinsertion/sections/<section-id>/rules/<rule-id>

Request:

Method:
POST
URI Path(s):
/api/v1/serviceinsertion/sections/<section-id>?action=update_with_rules
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
ServiceInsertionSectionRuleList+

Example Request:

POST https://<nsx-mgr>/api/v1/serviceinsertion/sections/79b29ea5-051a-4ab2-af85-fb6520a9f881?action=update_with_rules { "resource_type": "ServiceInsertionSection", "description": "Section containing Service Insertion Rules", "id": "79b29ea5-051a-4ab2-af85-fb6520a9f881", "display_name": "my section", "tags": [], "section_type": "L3REDIRECT", "is_default": false, "stateful": false, "rules": [ { "id": "1639424", "display_name": "my best rule", "notes": "This is my note", "destinations_excluded": false, "redirect_tos": [ { "target_display_name": "serviceinstance-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.200.2", "is_valid": true, "target_type": "IPv4Address", "target_id": "192.168.200.2" } ], "destinations": [ { "target_display_name": "192.168.200.3", "is_valid": true, "target_type": "IPv4Address", "target_id": "192.168.200.3" } ], "ip_protocol": "IPV4_IPV6", "rule_tag": "", "logged": false, "action": "ALLOW", "sources_excluded": false, "disabled": false, "direction": "IN_OUT" } ] }

Successful Response:

Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
ServiceInsertionSectionRuleList+

Example Response:

{ "resource_type": "ServiceInsertionSectionRuleList", "description": "Service Insertion Rules List", "id": "79b29ea5-051a-4ab2-af85-fb6520a9f881", "display_name": "my section", "tags": [], "section_type": "L3REDIRECT", "is_default": false, "stateful": false, "rule_count": 1, "rules": [ { "id": "1639424", "display_name": "my best rule", "section_id": "79b29ea5-051a-4ab2-af85-fb6520a9f881", "notes": "This is my note", "destinations_excluded": false, "redirect_tos": [ { "target_display_name": "serviceinstance-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.200.2", "is_valid": true, "target_type": "IPv4Address", "target_id": "192.168.200.2" } ], "destinations": [ { "target_display_name": "192.168.200.3", "is_valid": true, "target_type": "IPv4Address", "target_id": "192.168.200.3" } ], "ip_protocol": "IPV4_IPV6", "rule_tag": "", "logged": false, "action": "ALLOW", "sources_excluded": false, "disabled": false, "direction": "IN_OUT", "_revision": 2 } ], "_last_modified_user": "admin", "_last_modified_time": 1446249271991, "_revision": 2 }

Required Permissions:

crud

Feature:

service_insertion

Additional Errors: