{
  "properties": {
    "displayName": "Authorization rules on the Event Hub instance should be defined",
    "policyType": "BuiltIn",
    "mode": "All",
    "description": "Audit existence of authorization rules on Event Hub entities to grant least-privileged access",
    "metadata": {
      "version": "1.0.0",
      "category": "Event Hub"
    },
    "parameters": {
      "effect": {
        "type": "string",
        "defaultValue": "AuditIfNotExists",
        "allowedValues": [
          "AuditIfNotExists",
          "Disabled"
        ],
        "metadata": {
          "displayName": "Effect",
          "description": "Enable or disable the execution of the policy"
        }
      }
    },
    "policyRule": {
      "if": {
        "field": "type",
        "equals": "Microsoft.EventHub/namespaces/eventhubs"
      },
      "then": {
        "effect": "[parameters('effect')]",
        "details": {
          "type": "Microsoft.EventHub/namespaces/eventHubs/authorizationRules"
        }
      }
    }
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/f4826e5f-6a27-407c-ae3e-9582eb39891d",
  "name": "f4826e5f-6a27-407c-ae3e-9582eb39891d"
}