{
    "properties": {
      "displayName": "Automation accounts should disable public network access",
      "policyType": "BuiltIn",
      "mode": "Indexed",
      "description": "Disabling public network access improves security by ensuring that the resource isn't exposed on the public internet. You can limit exposure of your Automation account resources by creating private endpoints instead. Learn more at: https://docs.microsoft.com/azure/automation/how-to/private-link-security.",
      "metadata": {
        "version": "1.0.0",
        "category": "Automation"
      },
      "parameters": {
        "effect": {
          "type": "String",
          "metadata": {
            "displayName": "Effect",
            "description": "Enable or disable the execution of the policy"
          },
          "allowedValues": [
            "Audit",
            "Deny",
            "Disabled"
          ],
          "defaultValue": "Audit"
        }
      },
      "policyRule": {
        "if": {
          "allOf": [
            {
              "field": "type",
              "equals": "Microsoft.Automation/automationAccounts"
            },
            {
              "field": "Microsoft.Automation/automationAccounts/publicNetworkAccess",
              "notEquals": "false"
            }
          ]
        },
        "then": {
          "effect": "[parameters('effect')]"
        }
      }
    },
    "id": "/providers/Microsoft.Authorization/policyDefinitions/955a914f-bf86-4f0e-acd5-e0766b0efcb6",
    "name": "955a914f-bf86-4f0e-acd5-e0766b0efcb6"
  }