ยง 8503. Undertaking. Security for costs shall be given by an undertaking in an amount of five hundred dollars in counties within the city of New York, and two hundred fifty dollars in all other counties, or such greater amount as shall be fixed by the court that the plaintiff shall pay all legal costs awarded to the defendant.