You can’t set Quality Gate conditions on specific rules. What you can do is set conditions on categories of rules. For instance, I see that by default S4462 is a Blocker. So you could set a condition on the number of Blocker issues.
Thanks for your answer. To make it clear, the condition is not blocking the quality gate because Sonarqube does not see this rule on that snipped of code, there is no issue thrown in any of our applications. 0 issues on rule csharpsquid:S4462 in arround 3/4 million lines of code, thats a llitlebit strange.
Rule S4462 is not enabled by default (see defaultQualityProfiles). You need to extend your quality profile to activate the rule. You can find more information about how to do it in the documentation.