In any action other than a foreclosure action as defined in subdivision (b) of section 6516 of this article or for partition or dower, the court, upon motion of any person aggrieved and upon such notice as it may require, may direct any county clerk to cancel a notice of pendency, upon such terms as are just, whether or not the judgment demanded would affect specific real property, if the moving party shall give an undertaking in an amount to be fixed by the court, and if:
N.Y. CPLR 6515