{
   "if": {
      "allOf": [
         {
            "field": "type",
            "in": [
               "Microsoft.Compute/virtualMachines",
               "Microsoft.Compute/VirtualMachineScaleSets"
            ]
         },
         {
            "not": {
               "field": "Microsoft.Compute/imagePublisher",
               "in": "[parameters('listOfAllowedimagePublishers')]"
            }
         }
      ]
   },
   "then": {
      "effect": "deny"
   }
}