Duplicate resourceId for SQL Virtual Machine and the VM it runs on from Tenant resource usage rest api response

Yan Li 1 Reputation point
2020-11-28T02:27:07.437+00:00

Hi there,

I'm using the rest api mentioned here https://video2.skills-academy.com/en-us/azure-stack/operator/azure-stack-tenant-resource-usage-api?view=azs-2008 to get instances usage information, I have a SQL Server (sqlVM) running on a Virtual Machine sqlVM, I created this via SQL Virtual Machine.
43376-image.png

However, when I used the rest api to get usage for both database and virtual machine, they return the same resourceId information.

Here is the VM
43278-image.png

Here is the SQL VM
43357-image.png

I know the SQL Server runs as a software on the VM but I still believe the resource Id for them would be different because I saw there is a different resourceId for SQL VM specifically (/subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/sqlVM)

Should the rest api return a different resource id for the SQL VM than the VM?

SQL Server on Azure Virtual Machines
Azure Stack Hub
Azure Stack Hub
An extension of Azure for running apps in an on-premises environment and delivering Azure services in a datacenter.
188 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. TravisCragg-MSFT 5,681 Reputation points Microsoft Employee
    2020-12-02T01:40:39.777+00:00

    I will verify that this is intended, but what is important for billing purposes is the 'Meter Category' and 'Meter Subcategory'.

    The different resource IDs are how the portal / Azure handles resource providers, which is not necessarily the way it is handled in billing.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.