I think rule 11.b is the one that applies here. The rest are pretty clear.
He was shooting from right under the basket. The question is did the ball get enough lateral movement to be "within the cylinder"? It looked to me like Amare did not block the ball from over the cylinder.
Rule 11
http://www.nba.com/analysis/rules_11.html?nav=ArticleList
Section I-A Player Shall Not:
a. Touch the ball or the basket ring when the ball is using the basket ring as its lower base.
EXCEPTION: If a player near his own basket has his hand legally in contact with the ball, it is not a violation if his contact with the ball continues after the ball enters the cylinder, or if, in such action, he touches the basket.
b. Touch the ball when it is above the basket ring and within the imaginary cylinder.
c. For goaltending to occur, the ball, in the judgment of the official, must have a chance to score.
d. During a field goal attempt, touch a ball after it has touched any part of the backboard above ring level, whether the ball is considered on its upward or downward flight.
e. During a field goal attempt, touch a ball after it has touched the backboard below the ring level and while the ball is on its upward flight.
f. Trap the ball against the face of the backboard. (To be a trapped ball, three elements must exist simultaneously. The hand, the ball and the backboard must all occur at the same time. A batted ball against the backboard is not a trapped ball.)
g. Touch any live ball from within the playing area that is on its downward flight with an opportunity to touch the basket ring. This is considered to be a "field goal attempt" or trying for a goal.
h. Touch the ball at any time with a hand which is through the basket ring.
i. Vibrate the rim or backboard so as to cause the ball to make an unnatural bounce.
PENALTY: If the violation is at the opponent's basket, the offended team is awarded two points, if the attempt is from the two point zone and three points if it is from the three point zone. The crediting of the score and subsequent procedure is the same as if the awarded score has resulted from the ball having gone through the basket, except that the official shall hand the ball to a player of the team entitled to the throw-in. If the violation is at a team's own basket, no points can be scored and the ball is awarded to the offended team at the free throw line extended on either sideline. If there is a violation by both teams, play shall be resumed by a jump ball between any two opponents at the center circle.