How to get GPU ids available to you?

Is there a way i can get the cuda device IDs available to me?