Home > Back-end >  What is Azure CLI or RESTful API equivalent of Get-AzStorageUsage?
What is Azure CLI or RESTful API equivalent of Get-AzStorageUsage?

Time:02-03

I checked Microsoft documentations but couldn't find the Azure CLI or RESTful API equivalent of Get-AzStorageUsage.

I need it to query current quota limits of our subscription using Ansible playbooks so I need either Azure CLI or RESTful API equivalent.

CodePudding user response:

Azure CLI

az storage account show-usage --location

https://docs.microsoft.com/en-us/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show-usage

RESTful API

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/usages?api-version=2021-04-01

https://docs.microsoft.com/en-us/rest/api/storagerp/usages/list-by-location

  •  Tags:  
  • Related