{
    "properties": {
        "displayName": "Name pattern with like condition.",
        "description": "Enforce a naming pattern on resources with the like condition.",
        "mode": "Indexed",
        "parameters": {
            "namePattern": {
                "type": "String",
                "metadata": {
                    "description": "Pattern to use for names. Can include wildcard (*)."
                }
            }
        },
        "policyRule": {
            "if": {
                "not": {
                    "field": "name",
                    "like": "[parameters('namePattern')]"
                }
            },
            "then": {
                "effect": "deny"
            }
        }
    }
}