Not covered under warranty.
Purchase it at the parts dept at a BMW dealership and get it painted according to your paint code.
To install, get needle nose pliers and gently pull out the pipe. Pull it straight out and not at an angle. Once it's out, hold it with your fingers and snap on the new piece. Just press inward. There should be notches where it all lines up. Let go and you're good to go.
BTW, where abouts in Canada are you?