Score:-2

How do I get my last 30 days of Azure cost from the CLI?

pt flag

I want to pull the last 30 days of cost per resource group using the AZ CLI.

I'd really like it as a value or JSON blob, not a file dumped to a storage container.

Score:1
sa flag

To retrieve your last 30 days of Azure cost using the Command-Line Interface (CLI), execute the following Azure CLI command:

enter image description here enter image description here Replace 'start_date' and 'end_date' with the desired date range. This command fetches consumption data within the specified range and displays it in a tabular format. It's a quick and efficient way to obtain cost insights for the last 30 days directly from the CLI.

Romeo Ninov avatar
in flag
Add the info as text, not image!!!
TheFiddlerWins avatar
pt flag
This helps but I need to do it per Resource Group. I'll try messing around with the filters and see if I can figure it out. Thank you
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.