It is possible in Azure, but for this requirement, it is not possible if you just use Azure policy. Here is a solution that could meet your requirement provided by Microsoft engineer which uses Azure Function and Azure policy. For details see this blog.
CLICK HERE to find out more related problems solutions.