Saute the onion and garlic in the oil on the Instapot's saute setting until the onions soften.
Add everything else except the ham.
Cover and set the valve to closed.
Switch the pot off, and then turn back on to manual and set for 45 minutes.
Cool down cooker thirty minutes before releasing the steam valve so bean sediment does not clog it. Do not open if the cooker is still releasing steam through the valve.
Open cooker and add the ham.
Close cooker, shut the valve and set to manual for another twenty minutes.
Allow to cool down again 30 minutes before releasing the steam valve. Again, wait for the steam to subside before opening the cooker.