Home > Enterprise >  Not sure whether the container is listed as [] in azure storage
Not sure whether the container is listed as [] in azure storage

Time:09-28

I am following (previous and) this tutorial: enter image description here

  • Lastly you can use the same option as above but with key
az storage container list --account-name <name> --auth-mode key <key>

you can get your key from the portal under access keys

enter image description here

The output of the command should look like this here I have two containers name photos and test.

enter image description here

CodePudding user response:

I tried to reproduce in my environment and I got same error:

enter image description here

There are no credentials provided in your command and environment, we will query for account key for your storage account. It is recommended to provide --connection-string, --account-key or --sas-token in your command as credentials.

You also can add --auth-mode login in your command to use Azure Active Directory (Azure AD) for authorization if your login account is assigned required RBAC roles. For more information about RBAC roles in storage, visit https://docs.microsoft.com/azure/storage/common/storage-auth-aad-rbac-cli.

In addition, setting the corresponding environment variables can avoid inputting credentials in your command. Please use --help to get more information about environment variable usage. []

The above error show that in your storage account you didn't create any containers and files.

I have created one container and add files.

enter image description here

enter image description here

I tried the same command now i got an output successfully.

enter image description here

If you need to remove warnings you can use this command--only-show-errors

enter image description here

Reference: az storage container | Microsoft Learn

  • Related