It depends entirely on two factors: how severe the spam was, and whether it was a first offence.
You should have received an email from the Game Master who actioned the ban, and that message will state the duration. In practice suspensions range from as little as three hours up to permanent, with the length scaling to the offence.
Blizzard's GMs tend to be lenient with genuine first-timers, but repeat infractions escalate quickly — the same behaviour that earns a slap on the wrist once can lead to a lengthy suspension the second time around.