NSX-T Data Center Global Manager REST API
Create or update a rule
Update the rule. Create new rule if a rule with the rule-id is not alreadypresent.
Performance Note: If you wish 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.
Request:
Method:
PUT
URI Path(s):
/global-manager/api/v1/orgs/<org-id>/projects/<project-id>/global-infra/domains/<domain-id>/security-policies/<security-policy-id>/rules/<rule-id>
(Experimental)
/global-manager/api/v1/global-infra/domains/<domain-id>/security-policies/<security-policy-id>/rules/<rule-id>
/global-manager/api/v1/global-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:
PUT https://<policy-mgr>/global-manager/api/v1/global-infra/domains/vmc/security-policies/application-section-1/rules/ce-1 { "description": "comm entry", "display_name": "ce-1", "sequence_number": 1, "source_groups": [ "/global-infra/domains/vmc_domain/groups/webgroup" ], "logged": false, "destination_groups": [ "/global-infra/domains/vmc_domain/groups/dbgroup" ], "scope": [ "ANY" ], "action": "DROP", "services": [ "ANY" ] }Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
Rule+