{
    "properties": {
        "displayName": "Application definition for Managed Application should use customer provided storage account",
        "policyType": "BuiltIn",
        "mode": "Indexed",
        "description": "Use your own storage account to control the application definition data when this is a regulatory or compliance requirement. You can choose to store your managed application definition within a storage account provided by you during creation, so that its location and access can be fully managed by you to fulfill regulatory compliance requirements.",
        "metadata": {
            "version": "1.0.0",
            "category": "Managed Application"
        },
        "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.Solutions/applicationDefinitions"
                },
                {
                  "field": "Microsoft.Solutions/applicationDefinitions/storageAccountId",
                  "exists": "false"
                }
            ]
          },
          "then": {
            "effect": "[parameters('effect')]"
          }
        }
    },
    "id": "/providers/Microsoft.Authorization/policyDefinitions/9db7917b-1607-4e7d-a689-bca978dd0633",
    "name": "9db7917b-1607-4e7d-a689-bca978dd0633"
}