The az storage account command is part of the azure-cli tool, which is the official Command-Line Interface (CLI) provided by Microsoft for managing Azure resources and services.
The az storage account command allows you to manage storage accounts in Azure. A storage account is a fundamental resource in Azure that provides a unique namespace for storing and accessing various types of data such as files, blobs, tables, and queues. Here’s an overview of its functionality:
- Account Creation: With the az storage account create subcommand, you can create a new storage account in Azure. You can specify the account name, resource group, location, and other configurations such as the performance tier, replication type, and access control settings.
- Account Management: The az storage account update subcommand allows you to modify the properties and settings of an existing storage account. You can update configurations such as the account name, access tier, network rules, data encryption, and more.
- Account Deletion: Using the az storage account delete subcommand, you can delete a storage account that is no longer needed. This permanently removes the account and all the data stored within it. Exercise caution when using this command as it is irreversible.
- Account Listing: The az storage account list subcommand provides a list of all storage accounts in your Azure subscription or a specific resource group. This allows you to view the account names, locations, resource groups, and other details for better management and organization.
- Account Show: With the az storage account show subcommand, you can retrieve detailed information about a specific storage account. This includes details such as the account name, location, resource group, performance tier, replication type, access keys, and other settings.
Azure storage accounts are highly scalable and durable, providing reliable storage for various types of data. They can be accessed using a variety of protocols and APIs, making them versatile for different use cases and application scenarios.
az storage account Command Examples
1. Create an storage account:
# az storage account create --name storage_account_name --resource-group azure_resource_group --location azure_location --sku storage_account_sku
2. Generate a shared access signature for a specific storage account:
# az storage account generate-sas --account-name storage_account_name --name account_name --permissions sas_permissions --expiry expiry_date --services storage_services --resource-types resource_types
3. List storage accounts:
# az storage account list --resource-group azure_resource_group
4. Delete a specific storage account:
# az storage account delete --name storage_account_name --resource-group azure_resource_group