azure-xplat-cli icon indicating copy to clipboard operation
azure-xplat-cli copied to clipboard

ARM: Add 'azure subcription list' and 'azure subscription get <subId> <subName>' commands

Open vivsriaus opened this issue 7 years ago • 3 comments

CLI Version: 0.9.X OS Type: NA Installation via: npm / brew / win-or-mac installer / docker / github repo

Mode: ARM

Environment: AzureCloud/Azure China Cloud/US Government/Blackforest/Azure Stack NA

Description: There are no commands that invokes ARM's subscription APIs. I noticed we call the list subscriptions ARM api in azure login, but don't make an individual call to get a subscription. These could be handy to get details of the subscription when debugging issues with user's subscriptions

vivsriaus avatar Mar 16 '17 21:03 vivsriaus

@vivsriaus - we have a azure account list which i believe does what you want in 'azure subscription list'. Can you check ?

balajikris avatar Mar 16 '17 22:03 balajikris

@balajikris azure account list -vv doesn't trace calls to ARM. I think this is because we store the profile info (including subscriptions) locally when logging in, and the azure account list command just reads it off of the profile.json file. It would be nice if we had a separate command to display details about the current subscription as well.

vivsriaus avatar Mar 22 '17 20:03 vivsriaus

@vivsriaus if you'd like just to get current subscription details please use azure account show without arguments. You can also specify any subscription from list using -s argument to get its details. Does this work for you?

EvgenyAgafonchikov avatar Mar 23 '17 06:03 EvgenyAgafonchikov