79605749

Date: 2025-05-04 15:22:37
Score: 2
Natty:
Report link

You'll probably see a Python exception error with KeyError: 'usageStart' If you try to issue this command in 2025. According to comments/MS statement on Azure CLI issues, this is likely to be abandoned in favor of using Cost Details API instead of the Consumption Usage Details API: https://learn.microsoft.com/en-us/rest/api/consumption/usage-details/list?view=rest-consumption-2024-08-01&tabs=HTTP#examples
You can instead use:
az rest --method get --url "/subscriptions/$SUBID/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01" --query "value[].{date:properties.date,cost:properties.cost}"

Reasons:
  • Blacklisted phrase (1): to comment
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: martin