az-storage
Manage Azure Storage resources
TLDR
Create a storage account specifying a location
List all storage accounts in a resource group
List the access keys for a storage account
Delete a storage account
Update the minimum tls version setting for a storage account
SYNOPSIS
az storage [account-name] [account-key] [connection-string] [endpoint] [--subscription] [command] ...
PARAMETERS
account-name
Storage account name. Required unless `--connection-string` or `--sas-token` is specified. The environment variable AZURE_STORAGE_ACCOUNT
can also be used.
account-key
Storage account key. Required unless `--connection-string` or `--sas-token` is specified. The environment variable AZURE_STORAGE_KEY
can also be used.
connection-string
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING
endpoint
Storage endpoint suffix. Used to create the storage endpoint. Environment variable: AZURE_STORAGE_ENDPOINT
--subscription
Name or ID of subscription.
command
Subcommand to execute.
DESCRIPTION
The az storage
command group within the Azure CLI provides a comprehensive interface for interacting with Azure Storage services. It allows users to manage storage accounts, containers, blobs, queues, tables, and file shares directly from the Linux terminal.
You can perform a wide range of operations, including creating, deleting, listing, and configuring storage resources. This includes uploading and downloading data to and from Azure Blob Storage, managing access policies, and configuring storage account settings.
It supports different authentication methods to securely connect to your Azure Storage resources. The command also allows users to perform various storage account management tasks such as account creation, deletion, listing, key rotation, and network rule configuration.
Using az storage
, users can automate storage management tasks, integrate them into scripts, and streamline their workflow for interacting with Azure Storage.
CAVEATS
- Authentication methods require appropriate Azure CLI configuration and permissions.
- Improper use of account keys can compromise security.
- Large-scale operations can impact performance and cost.
- Pay attention to version dependencies between az cli version and storage api version.
<B>SUBCOMMANDS</B>
The az storage
command group provides a number of subcommands for managing different aspects of Azure Storage. These include subcommands for:
az storage account
: Managing storage accounts.az storage blob
: Managing blobs and containers.az storage queue
: Managing queues.az storage table
: Managing tables.az storage share
: Managing file shares.
<B>EXAMPLES</B>
- List all containers in a storage account:
az storage container list --account-name mystorageaccount
- Upload a local file to a blob:
az storage blob upload --container-name mycontainer --file mylocalfile.txt --name myblob.txt --account-name mystorageaccount
- Create storage account:
az storage account create --name newstorageaccount --resource-group myresourcegroup --location eastus --sku Standard_LRS
SEE ALSO
az account(1), az group(1)