{
    "properties": {
      "displayName": "Public network access should be disabled for Batch accounts",
      "policyType": "BuiltIn",
      "mode": "Indexed",
      "description": "Disabling public network access on a Batch account improves security by ensuring your Batch account can only be accessed from a private endpoint. Learn more about disabling public network access at https://docs.microsoft.com/azure/batch/private-connectivity.",
      "metadata": {
        "version": "1.0.0",
        "category": "Batch"
      },
      "parameters": {
        "effect": {
          "type": "string",
          "defaultValue": "Audit",
          "allowedValues": [
            "Audit",
            "Deny",
            "Disabled"
          ],
          "metadata": {
            "displayName": "Effect",
            "description": "The desired effect of the policy"
          }
        }
      },
      "policyRule": {
        "if": {
          "allOf": [
            {
              "field": "type",
              "equals": "Microsoft.Batch/batchAccounts"
            },
            {
              "field": "Microsoft.Batch/batchAccounts/publicNetworkAccess",
              "notEquals": "Disabled"
            }
          ]
        },
        "then": {
          "effect": "[parameters('effect')]"
        }
      }
    },
    "id": "/providers/Microsoft.Authorization/policyDefinitions/74c5a0ae-5e48-4738-b093-65e23a060488",
    "name": "74c5a0ae-5e48-4738-b093-65e23a060488"
  }