IPAddressExpression, leading to the deletion of the expression object itself.No Matching IPAddressexpression available for expression
nsx-audit-write.log shows the successful removal of the last IP address, which results in the deletion of the expression ID.
NSX 77689 - [nsx@6876 audit="true" comp="nsx-manager" level="INFO" reqId="<REDACTED_ID>" subcomp="manager" update="true" username="<REDACTED_USER>"] UserName="<REDACTED_USER>", Src="<REDACTED_IP>", ModuleName="Policy", Operation="AddorRemoveGroupIPAddresses", Operation status="success", Old value=[{"expression":[...,{"ip_addresses":["<REDACTED_IP>"],"resource_type":"IPAddressExpression","id":"<REDACTED_ID>", ...}], ...}], New value=["default" "<REDACTED_ID>" "<REDACTED_ID>" {"action":"remove"} {"ip_addresses":["<REDACTED_IP>"]}]VMware NSX 4.x
When using the API POST /policy/api/v1/infra/domains/{domain-id}/groups/{group-id}/ip-address-expressions/{expression-id}?action=remove, NSX evaluates the state of the IPAddressExpression post-operation.
IPAddressExpression object is automatically deleted because an empty expression is not valid in the Policy hierarchy.Subsequent calls to POST /policy/api/v1/infra/domains/{domain-id}/groups/{group-id}/ip-address-expressions/{expression-id}?action=add fail because the target expression-id no longer exists.
Workflows must verify the existence of the expression before attempting to add addresses to it.
GET /policy/api/v1/infra/domains/default/groups/{group_id}.POST /policy/api/v1/infra/domains/default/groups/{group_id}/ip-address-expressions/{expression_id}?action=addaction=add helper: PATCH /policy/api/v1/infra/domains/default/groups/{group_id}