NSX-T Data Center REST API

Create or update N-S Firewall Rule

Update the N-S Firewall Rule. If a Rule with the rule-id
is not already present, this API fails with a 404. Creation of Rules
is not allowed using this API.
PUT /orgs/org1/projects/project1/vpcs/vpc-1/gateway-policies/default/rules/rule-1

Request:

Method:
PUT
URI Path(s):
/policy/api/v1/orgs/{org-id}/projects/{project-id}/vpcs/{vpc-id}/gateway-policies/{gateway-policy-id}/rules/{rule-id}
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
Rule+

Example Request:

PUT https://<policy-mgr>/policy/api/v1/orgs/default/projects/project-1/vpcs/vpc-1/gateway-policies/test/rules/test-rule { "action": "DROP", "source_groups": [ "ANY" ], "destination_groups": [ "ANY" ], "services": [ "ANY" ], "profiles": [ "ANY" ] }

Successful Response:

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

Example Response:

{ "action": "DROP", "resource_type": "Rule", "id": "test-rule", "display_name": "test-rule", "path": "/orgs/default/projects/project-1/vpcs/vpc-1/gateway-policies/test/rules/test-rule", "relative_path": "test-rule", "parent_path": "/orgs/default/projects/project-1/vpcs/vpc-1/gateway-policies/test", "remote_path": "", "unique_id": "00000000-0000-0000-0000-000000001024", "realization_id": "00000000-0000-0000-0000-000000001024", "owner_id": "e1f5ef8a-21b7-48d1-9117-22797c2ea2dc", "origin_site_id": "e1f5ef8a-21b7-48d1-9117-22797c2ea2dc", "marked_for_delete": false, "overridden": false, "rule_id": 1024, "sequence_number": 0, "sources_excluded": false, "destinations_excluded": false, "source_groups": [ "ANY" ], "destination_groups": [ "ANY" ], "services": [ "ANY" ], "profiles": [ "ANY" ], "logged": false, "scope": [ "ANY" ], "disabled": false, "direction": "IN_OUT", "ip_protocol": "IPV4_IPV6", "is_default": false, "_create_time": 1669178598597, "_create_user": "admin", "_last_modified_time": 1669178598597, "_last_modified_user": "admin", "_system_owned": false, "_revision": 0 }

Required Permissions:

crud

Feature:

policy_edge_fw

Additional Errors: