NSX-T Data Center REST API
Update an Existing Section with Rules (Deprecated)
Modifies an existing firewall section along with its relative positionamong other firewall 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/firewall/sections/<section-id>?action=revise
To modify rules, use:
PUT /api/v1/firewall/sections/<section-id>/rules/<rule-id>
Simultaneous update (modify) operations on same section are not allowed to
prevent overwriting stale contents to firewall section. If a concurrent
update is performed, HTTP response code 409 will be returned to the client
operating on stale data. That client should retrieve the firewall section
again and re-apply its update.
Deprecated:
Use the following Policy API -
POST /policy/api/v1/infra/domains/<domain-id>/security-policies/<security-policy-id>?action=revise
Request:
Method:
POST
URI Path(s):
/api/v1/firewall/sections/{section-id}?action=revise_with_rules
Request Headers:
n/a
Query Parameters:
FirewallInsertParameters+
Request Body:
FirewallSectionRuleList+
Example Request:
{ "section_type":"LAYER3", "id": "2111d18f-27ba-4f19-a51d-2173c3972410", "display_name":"another Layer3 Section with Rules", "stateful":true, "rules":[ { "display_name":"layer3rule1", "action":"ALLOW", "direction":"IN_OUT", "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": "FirewallSectionRuleList", "id": "2111d18f-27ba-4f19-a51d-2173c3972410", "display_name": "another Layer3 Section with Rules", "section_type": "LAYER3", "is_default": false, "stateful": true, "rule_count": 1, "rules": [ { "id": "7168", "display_name": "layer3rule1", "destinations_excluded": false, "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": "ALLOW", "sources_excluded": false, "disabled": false, "direction": "IN_OUT", "_revision": 1 } ], "locked": true, "comments": "Locked the section", "lock_modified_by": "admin", "lock_modified_time": "1446245476600", "_last_modified_user": "admin", "_last_modified_time": 1446245476635, "_revision": 1 }Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
FirewallSectionRuleList+