Turn Instant Pot on to Saute, high heat. Add butter, onion, bell pepper, and mushrooms if using. When softened, toss in the garlic, Cajun seasoning, rice, and broth. (The rice should be well rinsed and only drained for a minute or two until water stops running out the bottom. A few drips are fine.) Stir gently around the pot once and once only just to distribute the rice. Top with ham and green onions.
Place lid on Instant Pot. Hit the Cancel button and use the Rice option, making sure the “Keep Warm” function is off. The Instant Pot will seal almost immediately because the pan is hot. When finished, around 10 minutes, allow to rest 10 minutes, off, undisturbed, then release any remaining pressure. Fluff with a fork, garnish with green onion, and serve.
Notes:
Find it online: https://frugalhausfrau.com/2017/11/27/instant-pot-opelousas/