NSX-T Data Center REST API
Update gateway policy
Update the gateway policy for a domain. This is a full replace.All the rules are replaced.
Performance Note: If you want to edit several rules in a gateway 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.
Request:
Method:
PUT
URI Path(s):
/policy/api/v1/infra/domains/{domain-id}/gateway-policies/{gateway-policy-id}
/policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/domains/{domain-id}/gateway-policies/{gateway-policy-id}
/policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/domains/{domain-id}/gateway-policies/{gateway-policy-id}
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
GatewayPolicy+
Example Request:
PUT https://<policy-mgr>/policy/api/v1/infra/domains/vmc-domain/gateway-policies/default { "category": "SharedPreRules", "rules": [ { "resource_type": "Rule", "description": "entry1", "id": "entry1", "display_name": "entry1", "path": "/infra/domains/vmc-domain/gateway-policies/default/rules/entry1", "parent_path": "/infra/domains/vmc-domain/gateway-policies/default", "relative_path": "entry1", "sequence_number": 0, "source_groups": [ "/infra/tier-0s/vmc/groups/source" ], "logged": false, "destination_groups": [ "/infra/domains/vmc-domain/groups/destination" ], "scope": [ "/infra/tier-0s/vmc" ], "action": "ALLOW", "services": [ "/infra/services/HTTP" ], "_revision": 3 } ], "_revision": 4 }Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
GatewayPolicy+