Policy > Security > East West Security > Distributed Firewall > Rules

Patch security policy

Patch the security policy for a domain. If a security policy for the given
security-policy-id is not present, the object will get created and if it is
present it will be updated. This is a full replace.
Performance Note: If you want to edit several rules in a security policy
use this API. It will perform better than several individual rule APIs.
Just pass all the rules which you wish to edit as embedded rules to it.
This API is available when using VMware Cloud (AWS, Dell-EMC, Outpost, Hyperscalers) or VMware NSX-T.

Request:

Method:
PATCH
URI Path(s):
/policy/api/v1/infra/domains/<domain-id>/security-policies/<security-policy-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
SecurityPolicy+

Example Request:

PATCH https://<policy-mgr>/policy/api/v1/infra/domains/vmc/security-policies/application-section-1 { "description": "comm map patched", "display_name": "application-section-1", "category": "Application", "rules": [ { "description": " comm entry", "display_name": "ce-1", "sequence_number": 1, "source_groups": [ "/infra/domains/vmc/groups/dbgroup" ], "destination_groups": [ "/infra/domains/vmc/groups/appgroup" ], "services": [ "/infra/services/HTTP", "/infra/services/CIM-HTTP" ], "action": "ALLOW" } ] }

Successful Response:

Response Code:
200 OK
Response Headers:
n/a
Response Body:
n/a

Required Permissions:

crud

Feature:

policy_dfw

Additional Errors: