Yes, this is a great use.  I’d suggest measuring your vehicles before placing your order.  Remember, gazebos are measured from the outside corners.  If you’re going to use it as a carport, you’ll need the clearance on the interior of the pole.  I’d also suggest a good bit of clearance as you don’t want to hit one of the support poles with your car.