Please review the Q&A Usage Guidelines before posting, specifically point 3, "Quote the applicable rule from the latest version of the manual in your question".
Rule SG6 reads as follows, with a portion bolded for emphasis:
<SG6> Rings on the Alliance Mobile Goal are “safe”. **Strategies intended to remove Rings which are Scored on or in an opposing Alliance Mobile Goal are prohibited. **Examples of “intentional strategies” could include, but are not limited to:
• Robot mechanisms or actions solely intended to “lift off” Rings from Mobile Goal Branches.
• Robot mechanisms or actions solely intended to “scoop out” Rings from Mobile Goal Bases.
• “Knocking over” or otherwise forcefully manipulating an Alliance Mobile Goal such that Rings become removed.
Minor violations of this rule that do not affect the Match will result in a warning. Match Affecting offenses will result in a Disqualification. Teams that receive multiple warnings may also receive a Disqualification at the Head Referee’s discretion.
This would be considered "knocking over" the Alliance Mobile Goal, as well as a strategy generally intended to remove Scored Rings. Therefore, this would not be legal.