NSX-T Data Center REST API
Add a Single Rule in a Section (Deprecated)
Adds a new firewall rule in existing firewall section. Adding firewall ruleto a section modifies parent section entity and simultaneous update (modify)
operations on same section are not allowed to prevent overwriting stale
content 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 -
PUT|PATCH /policy/api/v1/infra/domains/<domain-id>/security-policies/<security-policy-id>
Request:
Method:
POST
URI Path(s):
/api/v1/firewall/sections/{section-id}/rules
Request Headers:
n/a
Query Parameters:
FirewallInsertParameters+
Request Body:
FirewallRule+
Example Request:
{ "display_name": "layer3rule1", "destinations_excluded": false, "sources": [ { "target_display_name": "192.168.100.7", "is_valid": true, "target_type": "IPv4Address", "target_id": "192.168.100.7" } ], "destinations": [ { "target_display_name": "192.168.100.8", "is_valid": true, "target_type": "IPv4Address", "target_id": "192.168.100.8" } ], "ip_protocol": "IPV4_IPV6", "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:
FirewallRule+