Law? Laws in geopolitics don't exist anymore. For Russia having pro-american regime in Ukraine means death as an independent country. Everyone in big politics understands that. And still US+EU forced the issue. Putin had 2 options: let his country die slowly but surely or throw it into a war having little chances to succeed. Everyone expected him to choose former. He choosed latter. Everyone hates him now.