← 返回命令列表

Linux command

az-storage-account 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Create a storage account

az storage account create -n [account-name] -g [resource-group] -l [westus] --sku [Standard_LRS]

List all storage accounts

az storage account list -o table

Show storage account details

az storage account show -n [account-name] -g [resource-group]

Get the connection string

az storage account show-connection-string -n [account-name] -g [resource-group]

List storage account keys

az storage account keys list -n [account-name] -g [resource-group]

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]

Check name availability

az storage account check-name --name [proposed-name]

Delete a storage account

az storage account delete -n [account-name] -g [resource-group] --yes

说明

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.

参数

-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: Standard_LRS, Standard_GRS, Standard_RAGRS, Standard_ZRS, Premium_LRS, Premium_ZRS
--kind _value_
Account kind: StorageV2, Storage, BlobStorage, FileStorage, BlockBlobStorage
--access-tier _value_
Access tier for blob data: Hot, Cool, Cold, Premium

FAQ

What is the az-storage-account command used for?

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.

How do I run a basic az-storage-account example?

Run `az storage account create -n [account-name] -g [resource-group] -l [westus] --sku [Standard_LRS]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -n, --name _value_ do in az-storage-account?

Storage account name (globally unique, 3-24 chars, lowercase/numbers only)