Search code examples
azureazure-api-managementusage-statisticsazure-billing-api

Possible to monitor Cost/billing by Products in Azure Api Management?


I was wondering if there is a way to monitor Costs and billing through products for API-Management (APIM)?

The thing is now I have two APIM's - one used for test environments and another for production environment.

I know this is a bit unnecessary, but as I have two subscriptions one for test and one for prod, I thought at the beginning this was the logical way to go.

The thing is now developers have to register to 2 developer portals to be able to use both test and production and this is not optimal for me.

I still want to be able to get the billing statistics or test environments and production environments so that's why I'm wondering if there is a way to do this with products in APIM?


Solution

  • You need to tag your components/resources in Azure. Create a tag, say "Environment", and tag your one APIM as "Dev" and the other as "test". You can then report on your billing by tag.

    A quick Google led me to a blog on some best practices

    Microsoft's documentation on how tagging applies to billing can be found here