{
  "properties": {
    "displayName": "Event Hub namespaces should have double encryption enabled",
    "policyType": "BuiltIn",
    "mode": "Indexed",
    "description": "Enabling double encryption helps protect and safeguard your data to meet your organizational security and compliance commitments. When double encryption has been enabled, data in the storage account is encrypted twice, once at the service level and once at the infrastructure level, using two different encryption algorithms and two different keys.",
    "metadata": {
      "version": "1.0.0",
      "category": "Event Hub"
    },
    "parameters": {
      "effect": {
        "type": "String",
        "metadata": {
          "displayName": "Effect",
          "description": "Enable or disable the execution of the audit policy"
        },
        "allowedValues": [
          "Audit",
          "Deny",
          "Disabled"
        ],
        "defaultValue": "Audit"
      }
    },
    "policyRule": {
      "if": {
        "allOf": [
          {
            "field": "type",
            "equals": "Microsoft.EventHub/namespaces"
          },
          {
            "field": "Microsoft.EventHub/namespaces/clusterArmId",
            "exists": "true"
          },
          {
            "field": "Microsoft.EventHub/namespaces/encryption.requireInfrastructureEncryption",
            "notEquals": "true"
          }
        ]
      },
      "then": {
        "effect": "[parameters('effect')]"
      }
    }
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/836cd60e-87f3-4e6a-a27c-29d687f01a4c",
  "name": "836cd60e-87f3-4e6a-a27c-29d687f01a4c"
}