You should be candid with your doctor and ask. Different doctors and insurance companies have different preop requirements. If you need to have a certain amount of time concentrating on weight loss to qualify I'm guessing the time before your pregnancy may not count. Also, if you have to have a c section (you never know, it could happen even last minute) the bariatric surgeon may have a required amount of time for healing before he'd consider operating. Mine was very happy i was a year out from my emergency c section before starting the process. I dont know what the minimum time would be.
Also, I'm 17 days post op and this is not easy. I have 2 kids (4 and 20 months) and the post op changes, diet, emotions, lack of energy, appointments are not things I would want to go through with a post partum body and a newborn. Also, if you plan to breastfeed I don't know if that would be ok. The tiny amount of nutrition I can tolerate would not be enough to nourish both me and a baby at this point. Not to be a Debbie Downer, but these are all things I would ask about and consider.