I do not know specifically your car but I know HID theory; I presume you have Zenon HID. If this is the case, the light fixture is composed of a variable voltage ballast and the light element (bulb) itself. The setup is similar to an arc-lamp or florescent lamp, where the initial power is used to vaporize and then ionize the gas in your bulb. Then power can be cut back as the RXN stabilizes. That is why they take a few seconds to come on to full power (when cold). Also, the high beam uses the same element as the low beam, just at a different voltage and current.
From the symprom, it sounds like the bulb may be broken (possibly cracked) allowing the precious gasses you want to energise to escape; that may be why it only works for a second or two (as the gasses energise they expand and escape) and then die. Otherwise, it is very unlikely the ballast would break; but I cannot gurantee this. Also if it was the ballast, I would presume the light would do nothing at all.
Isn't your car still under warranty?