question

TBrack-4170 avatar image
0 Votes"
TBrack-4170 asked prmanhas-MSFT commented

Bug: Inconsistent VM id capitalisation when querying availabilityStatuses API

When querying the availabilityStatuses API over the last few days, some of the VM ids returned include lower case words and some include capitalised words. Specifically this part of the id:

/resourceGroups/groupname/providers/Microsoft.Compute/virtualMachines/

or

/resourcegroups/groupname/providers/microsoft.compute/virtualmachines/

We are recording and using these ids in a database, so having these suddenly change/ be unpredictable is problematic. To avoid having to treat the data on our end, would it be possible for these ids to be returned in a consistent format?

azure-virtual-machines
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@TBrack-4170 Any update on the issue?

Please "Accept as Answer" if below helped so it can help others in community looking for help on similar topics.

Thanks

0 Votes 0 ·
shivapatpi-MSFT avatar image
0 Votes"
shivapatpi-MSFT answered TBrack-4170 commented

Hello @TBrack-4170 ,
Thanks for our query . Are you still seeing the same issue for the returned VMIDs ?
I just tried the same using https://resources.azure.com/raw/ but I can see all the characters in the VMID as small case.


74471-image.png


74481-image.png




Kindly let us know if you are still seeing the issues w.r.t VMIDs.


image.png (134.9 KiB)
image.png (186.9 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks @shivapatpi-MSFT ,

Apologies, it is not the "vmID" but the "id" field that I am having the issue with. Specifically returned by this API: https://management.azure.com/subscriptions/#{subscription_id}/providers/Microsoft.ResourceHealth/availabilityStatuses

0 Votes 0 ·
shivapatpi-MSFT avatar image
0 Votes"
shivapatpi-MSFT answered

Hello @TBrack-4170 ,
Apologies for the delay and thank you for the clarification , I just tried to run that REST API and observed below:

For example resourceGroups (output1) & resourcegroups (output2). I think you were referring to those scenarios .

Output1:

"id": "/subscriptions/subid/resourcegroups/ace-cxp/providers/microsoft.search/searchservices/acecxp-as4abnidkrxv43o/providers/Microsoft.ResourceHealth/availabilityStatuses/current"

Output2:

"id": "/subscriptions/subid/resourceGroups/VisualStudioVM/providers/Microsoft.Compute/
virtualMachines/VisualStudioVM/providers/Microsoft.ResourceHealth/availabilityStatuses/current


As I am following up internally , as an alternate work around can you try converting everything to lower case before inserting into the database.

Regards,
Shiva.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.