LinuxCommandLibrary

az-storage-account

Manage Azure Storage accounts

TLDR

Create a storage account

$ az storage account create -n [account-name] -g [resource-group] -l [westus] --sku [Standard_LRS]
copy
List all storage accounts
$ az storage account list -o table
copy
Show storage account details
$ az storage account show -n [account-name] -g [resource-group]
copy
Get the connection string
$ az storage account show-connection-string -n [account-name] -g [resource-group]
copy
List storage account keys
$ az storage account keys list -n [account-name] -g [resource-group]
copy
Generate a SAS token
$ az storage account generate-sas --permissions [rwdlac] --account-name [account-name] --services [bfqt] --resource-types [sco] --expiry [2024-12-31T00:00Z]
copy
Check name availability
$ az storage account check-name --name [proposed-name]
copy
Delete a storage account
$ az storage account delete -n [account-name] -g [resource-group] --yes
copy

SYNOPSIS

az storage account subcommand [options]

DESCRIPTION

az storage account manages Azure storage accounts, which provide a unique namespace for storing and accessing Azure Storage data objects. Storage accounts support blobs, files, queues, tables, and disks.
Different account types and SKUs offer varying performance tiers, redundancy options, and access patterns. StorageV2 (general-purpose v2) accounts support all storage services and features.

PARAMETERS

-n, --name value

Storage account name (globally unique, 3-24 chars, lowercase/numbers only)
-g, --resource-group value
Name of the resource group
-l, --location value
Azure region for the storage account
--sku value
Storage SKU: StandardLRS, StandardGRS, StandardRAGRS, StandardZRS, PremiumLRS, PremiumZRS
--kind value
Account kind: StorageV2, Storage, BlobStorage, FileStorage, BlockBlobStorage
--access-tier value
Access tier for blob data: Hot, Cool, Cold, Premium

SUBCOMMANDS

Account Lifecycle

create, delete, list, show, update, check-name
Access
keys list, keys renew, generate-sas, show-connection-string
Network Security
network-rule add, network-rule list, network-rule remove, private-endpoint-connection
Blob Service
blob-service-properties show, blob-service-properties update, blob-inventory-policy
File Service
file-service-properties show, file-service-properties update
Advanced
management-policy create, encryption-scope create, failover, local-user

CAVEATS

Storage account names must be globally unique across all Azure customers. Changing redundancy options (GRS to LRS) may require data migration. Deleting a storage account is irreversible and removes all contained data. Premium accounts have different pricing and performance characteristics.

HISTORY

Azure Storage was one of the first Azure services, available since the platform's launch in 2010. StorageV2 accounts became the recommended default in 2018, unifying previously separate storage types and enabling new features like access tiers.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community