The court doesn't often order spousal maintenance these days, and where it is ordered, it's usually just until property settlement is completed. You can file an initiating application after attending a family dispute resolution conference with the other party.
The court considers a variety of elements, such as age and health, capacity to support yourself, capacity of the other party to pay spousal maintenance, any existing assets, what constitutes a reasonable living standard and whether the marriage impacted your capacity to work.
Generally speaking, the court won't order spousal maintenance unless the other party is wealthy and you are unable to work.