LinuxCommandLibrary
GitHub F-Droid Google Play Store

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 an account-level SAS token
$ az storage account generate-sas --account-name [account-name] --services [bfqt] --resource-types [sco] --permissions [racwdl] --expiry [2026年12月31日T00: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. Default Standard_RAGRS. Values include StandardLRS, StandardGRS, StandardRAGRS, StandardZRS, StandardGZRS, StandardRAGZRS, PremiumLRS, PremiumZRS.
--kind value
Account kind. Default StorageV2. Values: StorageV2, Storage, BlobStorage, FileStorage, BlockBlobStorage.
--access-tier value
Access tier for blob data: Hot, Cool, Cold, Premium.
--https-only value
Require HTTPS for requests. Default true.
--min-tls-version value
Minimum TLS version allowed: TLS10, TLS11, TLS12, TLS13.
--allow-blob-public-access value
Allow anonymous public access to blobs. Default false for new accounts.
--hns, --enable-hierarchical-namespace value
Enable hierarchical namespace (Azure Data Lake Storage Gen2).

SUBCOMMANDS

Account Lifecycle

create, delete, list, show, update, check-name
Access
keys list, keys renew, generate-sas, show-connection-string, revoke-delegation-keys
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

az(1), azure-cli(1), az-storage(1), az-storage-blob(1), az-storage-container(1), azcopy(1)

RESOURCES

Documentation · Homepage · Source code

Copied to clipboard
Kai

AltStyle によって変換されたページ (->オリジナル) /