{
   "properties":{
      "displayName":"App Service Environment should be provisioned with latest versions",
      "policyType":"BuiltIn",
      "mode":"Indexed",
      "description":"Only allow App Service Environment version 2 or version 3 to be provisioned. Older versions of App Service Environment require manual management of Azure resources and have greater scaling limitations.",
      "metadata":{
         "version":"1.0.0",
         "category":"App Service"
      },
      "parameters":{
         "effect":{
            "type":"string",
            "defaultValue":"Audit",
            "allowedValues":[
               "Audit",
               "Deny",
               "Disabled"
            ],
            "metadata":{
               "displayName":"Effect",
               "description":"Enable or disable the execution of the policy"
            }
         }
      },
      "policyRule":{
         "if":{
            "allOf":[
               {
                  "field":"type",
                  "equals":"Microsoft.Web/hostingEnvironments"
               },
               {
                  "field":"kind",
                  "equals":"ASEV1"
               }
            ]
         },
         "then":{
            "effect":"[parameters('effect')]"
         }
      }
   },
   "id":"/providers/Microsoft.Authorization/policyDefinitions/eb4d34ab-0929-491c-bbf3-61e13da19f9a",
   "name":"eb4d34ab-0929-491c-bbf3-61e13da19f9a"
}