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

Patch a rule

Patch the rule. If Rule corresponding to the the given rule-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,
prefer below mentioned API for optimal performance.
Pass all the rules which you wish to edit as embedded rules to it.
Use this API - PATCH (or PUT)
/infra/domains/<domain-id>/security-policies/<security-policy-id>
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>/rules/<rule-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
Rule+

Example Request:

PATCH https://<policy-mgr>/policy/api/v1/infra/domains/vmc/security-policies/application-section-1/rules/ce-1 { "description": " comm entry", "display_name": "ce-1", "sequence_number": 1, "source_groups": [ "/infra/domains/vmc_domain/groups/webgroup" ], "logged": false, "destination_groups": [ "/infra/domains/vmc_domain/groups/dbgroup" ], "scope": [ "ANY" ], "action": "DROP", "services": [ "ANY" ] }

Successful Response:

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

Required Permissions:

crud

Feature:

policy_dfw

Additional Errors: