last sync: 2021-May-10 15:04:35 UTC

Azure Policy definition

API apps should use an Azure file share for its content directory

Name API apps should use an Azure file share for its content directory
Azure Portal
Id 324c7761-08db-4474-9661-d1039abc92ee
Version 1.0.0
details on versioning
Category App Service
Microsoft docs
Description The content directory of an API app should be located on an Azure file share. The storage account information for the file share must be provided before any publishing activity. To learn more about using Azure Files for hosting app service content refer to https://go.microsoft.com/fwlink/?linkid=2151594.
Mode Indexed
Type BuiltIn
Preview FALSE
Deprecated FALSE
Effect Default: Audit
Allowed: (Audit, Disabled)
Used RBAC Role none
History
Date/Time (UTC ymd) (i) Change type Change detail
2021-03-02 15:11:40 add 324c7761-08db-4474-9661-d1039abc92ee
Used in Initiatives none
JSON
{
  "properties": {
    "displayName": "API apps should use an Azure file share for its content directory",
    "policyType": "BuiltIn",
    "mode": "Indexed",
    "description": "The content directory of an API app should be located on an Azure file share. The storage account information for the file share must be provided before any publishing activity. To learn more about using Azure Files for hosting app service content refer to https://go.microsoft.com/fwlink/?linkid=2151594.",
    "metadata": {
      "version": "1.0.0",
      "category": "App Service"
    },
    "parameters": {
      "effect": {
        "type": "String",
        "metadata": {
          "displayName": "Effect",
          "description": "Enable or disable the execution of the policy"
        },
        "allowedValues": [
          "Audit",
          "Disabled"
        ],
        "defaultValue": "Audit"
      }
    },
    "policyRule": {
      "if": {
        "allOf": [
          {
            "field": "type",
            "equals": "Microsoft.Web/sites"
          },
          {
            "field": "kind",
            "like": "*api"
          },
          {
            "field": "Microsoft.Web/sites/storageAccountRequired",
            "equals": "true"
          }
        ]
      },
      "then": {
      "effect": "[parameters('effect')]"
      }
    }
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/324c7761-08db-4474-9661-d1039abc92ee",
  "type": "Microsoft.Authorization/policyDefinitions",
  "name": "324c7761-08db-4474-9661-d1039abc92ee"
}