here are cost management automation APIs and common scenarios: https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/automation-overview
here is how to get price and metadata information for resources used in an Azure subscription: https://learn.microsoft.com/en-us/previous-versions/azure/reference/mt219004(v=azure.100)
here are azure billing api code samples: https://github.com/Azure/BillingCodeSamples
afaik this are the method you can use
regards