{
    "properties": {
        "displayName": "Managed workspace virtual network on Azure Synapse workspaces should be enabled",
        "description": "Enabling a managed workspace virtual network ensures that your workspace is network isolated from other workspaces. Data integration and Spark resources deployed in this virtual network also provides user level isolation for Spark activities.",
        "policyType": "BuiltIn",
        "mode": "Indexed",
        "metadata": {
            "version": "1.0.0",
            "category": "Synapse"
        },
        "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.Synapse/workspaces"
                    },
                    {
                        "field": "Microsoft.Synapse/workspaces/managedVirtualNetwork",
                        "notEquals": "default"
                    }
                ]
            },
            "then": {
                "effect": "[parameters('effect')]"
            }
        }
    },
    "id": "/providers/Microsoft.Authorization/policyDefinitions/2d9dbfa3-927b-4cf0-9d0f-08747f971650",
    "name": "2d9dbfa3-927b-4cf0-9d0f-08747f971650"
}