Hi, I want to fetch information for each storage account - blobs, queues, files, tables

Buddy 0 Reputation points
2025-01-30T07:58:25.78+00:00

Hi, I want to fetch information for each storage account - blobs, queues, files, tables. In the portal we can see that we have a storage browser for each storage account which gives info about blobs, queues, files tables. How can I fetch it for all of the storage accounts? Can you pls help me out

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,347 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Sathvika Reddy Dopathi 10 Reputation points Microsoft Vendor
    2025-01-30T10:06:19.89+00:00

    Hi @Buddy,  

    Greetings! Welcome to Microsoft Q&A Forum, thanks for posting your query here.

    To fetch the information for each storage account, such as blobs, queues, files, and tables across multiple accounts, you can automate this process using the Azure CLI. These allow you to retrieve information for all storage accounts in your Azure subscription.

    This Azure CLI command is used to list all storage accounts in a specific resource group. Here’s the command:

    List all storage accounts:

    az storage account list --resource-group <your-resource-group> --output table
    

     

    They are used to list different types of resources (Blob containers, Queues, File Shares, and Tables) within a specific storage account in Azure. Let's go over each one in detail:

    Blob containers:

    To list all Blob containers in a storage account, use the following command:

    az storage container list --account-name <storage-account-name> --output table
    

    Queues:

    To list all Queue containers in a storage account, use the following command:

    az storage queue list --account-name <storage-account-name> --output table
    

    File shares:

    To list all File containers in a storage account, use the following command:

    az storage share list --account-name <storage-account-name> --output table
    

    Tables:

    To list all Table containers in a storage account, use the following command:

    az storage table list --account-name <storage-account-name> --output table
    

     

    Please let us know if you have any further queries. I’m happy to assist you further.

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.  


  2. Buddy 0 Reputation points
    2025-01-30T17:10:48.9333333+00:00

    Hi, Thanks for the response. I tried to fetch information for all the storage accounts using python. But couldn't do som The below information is found is storage browser section under each storage account. So can you help me out here pls?

    Storage account metrics

    Blob containers

    Number of containers

    Number of blobs

    Total data stored

    File shares

    Number of file shares

    Number of files

    Total data stored

    Tables

    Number of tables

    Number of entities

    Total data stored

    Queues

    Number of queues

    Number of messages

    Total data stored

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.