LinuxCommandLibrary

az-storage

Manage Azure Storage resources

TLDR

Create a storage account specifying a location

$ az storage account create [[-g|--resource-group]] [group_name] [[-n|--name]] [account_name] [[-l|--location]] [location] --sku [account_sku]
copy

List all storage accounts in a resource group
$ az storage account list [[-g|--resource-group]] [group_name]
copy

List the access keys for a storage account
$ az storage account keys list [[-g|--resource-group]] [group_name] [[-n|--name]] [account_name]
copy

Delete a storage account
$ az storage account delete [[-g|--resource-group]] [group_name] [[-n|--name]] [account_name]
copy

Update the minimum tls version setting for a storage account
$ az storage account update --min-tls-version [TLS1_0|TLS1_1|TLS1_2] [[-g|--resource-group]] [group_name] [[-n|--name]] [account_name]
copy

SYNOPSIS

az storage [<subcommand> | --help] [--account-key] [--account-name] [--connection-string] [--debug] [--help] [--output] [--query] [--sas-token] [--subscription] [--verbose]

PARAMETERS

--account-key
    Storage account access key.

--account-name
    Name of the storage account.

--connection-string
    Account connection string (overrides other auth).

--sas-token
    Shared Access Signature (SAS) token.

--storage-account-id
    Full resource ID of storage account.

--debug
    Increase logging verbosity (store debug logs).

--help, -h
    Show help for command.

--output, -o
    Output format (json, jsonc, table, tsv).

--query
    JMESPath query string for output.

--subscription
    Name or ID of Azure subscription.

--verbose
    Increase logging verbosity.

DESCRIPTION

The az storage command group in Azure CLI enables Linux users to manage Azure Storage services, including blobs, files, queues, tables, and accounts, directly from the terminal.

Key capabilities include creating/deleting storage accounts, listing/managing keys, uploading/downloading blobs/files, listing/searching containers/shares, generating SAS tokens, and configuring CORS/logging/metrics.

Authentication options: Azure AD login (az login), account key, connection string, or SAS token. Supports JSON/table output formats for scripting.

Install Azure CLI via curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash, then az login. Example: az storage account create --name mystorage --resource-group myRG --location eastus.

Ideal for automation, DevOps pipelines (CI/CD), and bulk operations. Integrates with az ad for RBAC. Note: Operations may incur costs based on data transfer/storage.

CAVEATS

Requires Azure CLI 2.0+ and internet access. Auth needed (az login or keys). Billed for data ops/storage. Some features preview/region-limited. Use --dryrun where available.

SUBCOMMANDS

account, blob, container, cors, dir, entity, file, fs (Data Lake), logging, metrics, queue, service, share, table.

AUTHENTICATION PRIORITY

Connection string > account key/SAS > CLI login.

HISTORY

Introduced in Azure CLI 2.0 (2017). Evolved with Azure Storage features like hierarchical namespace (2019), data lake Gen2. Latest: supports Premium Block Blobs, customer-managed keys.

SEE ALSO

az(1), curl(1)

Copied to clipboard