{
    "properties": {
        "displayName": "Azure Stream Analytics jobs should use customer-managed keys to encrypt data",
        "policyType": "BuiltIn",
        "mode": "Indexed",
        "description": "Use customer-managed keys when you want to securely store any metadata and private data assets of your Stream Analytics jobs in your storage account. This gives you total control over how your Stream Analytics data is encrypted.",
        "metadata": {
            "version": "1.0.0",
            "category": "Stream Analytics"
        },
        "parameters": {
            "effect": {
                "type": "String",
                "defaultValue": "audit",
                "allowedValues": [
                    "audit",
                    "deny",
                    "disabled"
                ],
                "metadata": {
                    "displayName": "Effect",
                    "description": "The desired effect of the policy."
                }
            }
        },
        "policyRule": {
            "if": {
                "allOf": [
                    {
                        "field": "Microsoft.StreamAnalytics/streamingJobs/contentStoragePolicy",
                        "equals": "SystemAccount"
                    },
                    {
                        "field": "type",
                        "equals": "Microsoft.StreamAnalytics/streamingJobs"
                    }
                ]
            },
            "then": {
                "effect": "[parameters('effect')]"
            }
        }
    },
    "id": "/providers/Microsoft.Authorization/policyDefinitions/87ba29ef-1ab3-4d82-b763-87fcd4f531f7",
    "name": "87ba29ef-1ab3-4d82-b763-87fcd4f531f7"
}