az storage account
Manage Azure Storage accounts.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az storage account create |
Create a storage account. |
Core | Preview |
| az storage account delete |
Delete a storage account. |
Core | Preview |
| az storage account list |
List storage accounts. |
Core | Preview |
| az storage account show |
Show the properties of a storage account. |
Core | Preview |
az storage account create
Create a storage account.
Create an Azure Storage account in the specified resource group. The account name and resource group are required; location defaults to the resource group location, SKU defaults to Standard_RAGRS, and kind defaults to StorageV2. The account name must be 3-24 characters using lower-case letters and numbers only and must be globally unique. Optional settings cover access tiers, TLS and public access, hierarchical namespace, SFTP and NFS, network rules, customer-managed encryption keys, managed identities, Azure Files identity-based authentication, SAS and key policies, and account-level immutability. Options that are not supplied are omitted from the request so the service default applies. The command waits for the long-running create operation to finish and returns the created account.
az storage account create --name
--resource-group
[--access-tier {Hot, Cool, Premium, Cold, Smart}]
[--account-type {User, Computer}]
[--action {Allow}]
[--allow-blob-public-access {true, false}]
[--allow-cross-tenant-replication {true, false}]
[--allow-protected-append-writes {true, false}]
[--allow-shared-key-access {true, false}]
[--allowed-copy-scope {PrivateLink, AAD, All}]
[--azure-storage-sid]
[--bypass]
[--custom-domain]
[--default-action {Allow, Deny}]
[--default-share-permission {None, StorageFileDataSmbShareReader, StorageFileDataSmbShareContributor, StorageFileDataSmbShareElevatedContributor}]
[--default-to-oauth-authentication {true, false}]
[--dns-endpoint-type {Standard, AzureDnsZone}]
[--domain-guid]
[--domain-name]
[--domain-sid]
[--edge-zone]
[--enable-alw {true, false}]
[--enable-blob-geo-priority-replication {true, false}]
[--enable-extended-groups {true, false}]
[--enable-files-aadds {true, false}]
[--enable-files-aadkerb {true, false}]
[--enable-files-adds {true, false}]
[--enable-hierarchical-namespace {true, false}]
[--enable-large-file-share]
[--enable-local-user {true, false}]
[--enable-nfs-v3 {true, false}]
[--enable-sftp {true, false}]
[--enable-smb-oauth {true, false}]
[--encryption-key-name]
[--encryption-key-source {Microsoft.Storage, Microsoft.Keyvault}]
[--encryption-key-type-for-queue {Account, Service}]
[--encryption-key-type-for-table {Account, Service}]
[--encryption-key-vault]
[--encryption-key-version]
[--forest-name]
[--https-only {true, false}]
[--identity-type {None, SystemAssigned, UserAssigned, SystemAssigned,UserAssigned}]
[--immutability-period-since-creation-in-days]
[--immutability-policy-state {Unlocked, Locked, Disabled}]
[--ip-address]
[--ipv6-address]
[--key-expiration-period-in-days]
[--key-vault-federated-client-id]
[--key-vault-user-identity-id]
[--kind {Storage, StorageV2, BlobStorage, FileStorage, BlockBlobStorage}]
[--large-file-shares-state {Disabled, Enabled}]
[--location]
[--min-tls-version {TLS1_0, TLS1_1, TLS1_2, TLS1_3}]
[--net-bios-domain-name]
[--profile]
[--public-network-access {Enabled, Disabled, SecuredByPerimeter}]
[--publish-internet-endpoints {true, false}]
[--publish-ipv6-endpoint {true, false}]
[--publish-microsoft-endpoints {true, false}]
[--require-infrastructure-encryption {true, false}]
[--routing-choice {MicrosoftRouting, InternetRouting}]
[--sam-account-name]
[--sas-expiration-action {Log, Block}]
[--sas-expiration-period]
[--sku {Standard_LRS, Standard_GRS, Standard_RAGRS, Standard_ZRS, Premium_LRS, Premium_ZRS, Standard_GZRS, Standard_RAGZRS, StandardV2_LRS, StandardV2_GRS, StandardV2_ZRS, StandardV2_GZRS, PremiumV2_LRS, PremiumV2_ZRS}]
[--subnet]
[--subscription-id]
[--tags]
[--user-identity-id]
[--vnet-name]
[--zone-placement-policy {Any, None}]
[--zones]
Examples
Create a general-purpose v2 account
az storage account create --resource-group myResourceGroup --name mystorageaccount --location eastus --sku Standard_LRS --kind StorageV2
Create a hardened account
az storage account create --resource-group myResourceGroup --name mystorageaccount --location eastus --sku Standard_LRS --kind StorageV2 --min-tls-version TLS1_2 --allow-blob-public-access false --allow-shared-key-access false --https-only true
Create an account restricted to specific networks
az storage account create --resource-group myResourceGroup --name mystorageaccount --location eastus --sku Standard_LRS --kind StorageV2 --default-action Deny --bypass AzureServices --ip-address 13.64.0.0/16 --subnet mySubnet --vnet-name myVnet
Create a Data Lake Storage Gen2 account with SFTP
az storage account create --resource-group myResourceGroup --name mystorageaccount --location eastus --sku Standard_LRS --kind StorageV2 --enable-hierarchical-namespace true --enable-sftp true
Create an account with a customer-managed key
az storage account create --resource-group myResourceGroup --name mystorageaccount --location eastus --sku Standard_LRS --kind StorageV2 --identity-type SystemAssigned --encryption-key-vault https://myvault.vault.azure.net/ --encryption-key-name mykey
Create an account with tags
az storage account create --resource-group myResourceGroup --name mystorageaccount --location eastus --sku Standard_LRS --kind StorageV2 --tags env=dev owner=platform
Required Parameters
The name of the storage account. Must be between 3 and 24 characters in length and use numbers and lower-case letters only.
The resource group name.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The access tier used for billing. Required when kind is BlobStorage.
| Property | Value |
|---|---|
| Accepted values: | Hot, Cool, Premium, Cold, Smart |
The Active Directory account type for Azure Storage.
| Property | Value |
|---|---|
| Accepted values: | User, Computer |
The action applied to the subnet and IP rules. Defaults to Allow.
| Property | Value |
|---|---|
| Accepted values: | Allow |
Allow or disallow public access to all blobs or containers. The service default is false.
| Property | Value |
|---|---|
| Accepted values: | true, false |
Allow or disallow cross AAD tenant object replication. The service default is false.
| Property | Value |
|---|---|
| Accepted values: | true, false |
Allow new blocks to be written to an append blob while maintaining immutability protection. Requires --enable-alw true.
| Property | Value |
|---|---|
| Accepted values: | true, false |
Whether the account permits requests authorized with the account access key. The service default is true.
| Property | Value |
|---|---|
| Accepted values: | true, false |
Restrict copy to and from storage accounts within an AAD tenant or with private links to the same VNet.
| Property | Value |
|---|---|
| Accepted values: | PrivateLink, AAD, All |
The security identifier (SID) for Azure Storage.
Traffic to bypass the network rules (space-separated): None, Logging, Metrics, AzureServices. Requires --default-action.
The custom domain name assigned to the account. Name is the CNAME source.
The action to apply when no network rule matches. Required when any other network rule flag is used.
| Property | Value |
|---|---|
| Accepted values: | Allow, Deny |
The default share permission for users using Kerberos authentication when no RBAC role is assigned.
| Property | Value |
|---|---|
| Accepted values: | None, StorageFileDataSmbShareReader, StorageFileDataSmbShareContributor, StorageFileDataSmbShareElevatedContributor |
Whether the default authentication is OAuth. The service default is false.
| Property | Value |
|---|---|
| Accepted values: | true, false |
The type of endpoint. AzureDnsZone allows creating a large number of accounts in a single subscription.
| Property | Value |
|---|---|
| Accepted values: | Standard, AzureDnsZone |
The domain GUID.
The primary domain the AD DNS server is authoritative for.
The security identifier (SID) of the AD domain.
The name of the edge zone to create the account in.
Enable account-level immutability. Can only be set at creation time.
| Property | Value |
|---|---|
| Accepted values: | true, false |
Whether Blob Geo Priority Replication is enabled for the account.
| Property | Value |
|---|---|
| Accepted values: | true, false |
Enable extended group support with the local users feature.
| Property | Value |
|---|---|
| Accepted values: | true, false |
Enable Microsoft Entra Domain Services authentication for Azure Files.
| Property | Value |
|---|---|
| Accepted values: | true, false |
Enable Microsoft Entra Kerberos authentication for Azure Files.
| Property | Value |
|---|---|
| Accepted values: | true, false |
Enable Active Directory Domain Services authentication for Azure Files. Requires all Active Directory properties.
| Property | Value |
|---|---|
| Accepted values: | true, false |
Enable a hierarchical namespace (Azure Data Lake Storage Gen2).
| Property | Value |
|---|---|
| Accepted values: | true, false |
Enable large file shares. Cannot be disabled once enabled.
Enable the local users feature.
| Property | Value |
|---|---|
| Accepted values: | true, false |
Enable NFS 3.0 protocol support.
| Property | Value |
|---|---|
| Accepted values: | true, false |
Enable Secure File Transfer Protocol.
| Property | Value |
|---|---|
| Accepted values: | true, false |
Whether managed identities can access SMB shares using OAuth.
| Property | Value |
|---|---|
| Accepted values: | true, false |
The name of the key vault key. Must be given together with --encryption-key-vault.
The encryption key source. Inferred as Microsoft.Keyvault when key vault options are supplied.
| Property | Value |
|---|---|
| Accepted values: | Microsoft.Storage, Microsoft.Keyvault |
The encryption key type for the Queue service.
| Property | Value |
|---|---|
| Accepted values: | Account, Service |
The encryption key type for the Table service.
| Property | Value |
|---|---|
| Accepted values: | Account, Service |
The URI of the key vault. Must be given together with --encryption-key-name.
The version of the key vault key. Opts out of implicit key rotation.
The Active Directory forest to get.
Allow https traffic only to the storage service. The service default is true.
| Property | Value |
|---|---|
| Accepted values: | true, false |
The managed identity type for the account.
| Property | Value |
|---|---|
| Accepted values: | None, SystemAssigned, UserAssigned, SystemAssigned,UserAssigned |
The immutability period for blobs since policy creation, in days (1-146000). Requires --enable-alw true.
The mode of the account-level immutability policy. Requires --enable-alw true.
| Property | Value |
|---|---|
| Accepted values: | Unlocked, Locked, Disabled |
IPv4 addresses or CIDR ranges to allow (space-separated). Requires --default-action.
IPv6 addresses or CIDR ranges to allow (space-separated). Requires --default-action.
Expiration period in days of the key policy assigned to the account.
Client id of the multi-tenant application used for cross-tenant customer-managed-key encryption.
Resource id of the user-assigned identity used for server-side encryption.
The type of storage account. Defaults to StorageV2.
| Property | Value |
|---|---|
| Accepted values: | Storage, StorageV2, BlobStorage, FileStorage, BlockBlobStorage |
Allow large file shares. Cannot be disabled once enabled.
| Property | Value |
|---|---|
| Accepted values: | Disabled, Enabled |
The Azure region in which to create the storage account. Defaults to the resource group location.
The minimum TLS version permitted on requests to storage. The service default is TLS1_0.
| Property | Value |
|---|---|
| Accepted values: | TLS1_0, TLS1_1, TLS1_2, TLS1_3 |
The NetBIOS domain name.
Use the named profile for this command (overrides the active profile).
Allow, disallow, or let Network Security Perimeter configuration evaluate public network access.
| Property | Value |
|---|---|
| Accepted values: | Enabled, Disabled, SecuredByPerimeter |
Whether internet routing storage endpoints are published.
| Property | Value |
|---|---|
| Accepted values: | true, false |
Whether IPv6 storage endpoints are published.
| Property | Value |
|---|---|
| Accepted values: | true, false |
Whether Microsoft routing storage endpoints are published.
| Property | Value |
|---|---|
| Accepted values: | true, false |
Whether the service applies a secondary layer of encryption with platform managed keys.
| Property | Value |
|---|---|
| Accepted values: | true, false |
The kind of network routing used to deliver user data.
| Property | Value |
|---|---|
| Accepted values: | MicrosoftRouting, InternetRouting |
The Active Directory SAMAccountName for Azure Storage.
The action performed when the SAS expiration period is violated. Requires --sas-expiration-period. Defaults to Log.
| Property | Value |
|---|---|
| Accepted values: | Log, Block |
Expiration period of the SAS policy assigned to the account, in DD.HH:MM:SS form.
The SKU name of the storage account. Defaults to Standard_RAGRS.
| Property | Value |
|---|---|
| Accepted values: | Standard_LRS, Standard_GRS, Standard_RAGRS, Standard_ZRS, Premium_LRS, Premium_ZRS, Standard_GZRS, Standard_RAGZRS, StandardV2_LRS, StandardV2_GRS, StandardV2_ZRS, StandardV2_GZRS, PremiumV2_LRS, PremiumV2_ZRS |
Name or resource id of a subnet. If a name is given, --vnet-name is required.
Azure Subscription Id. Defaults to the subscription of the active profile.
Resource tags in KEY=VALUE form (space-separated).
The ARM resource identifier of the user-assigned identity. Only one is permitted.
Name of the virtual network containing --subnet.
The availability zone pinning policy for the account.
| Property | Value |
|---|---|
| Accepted values: | Any, None |
The availability zones to pin the account to (space-separated).
Global Parameters
Increase logging verbosity to show all debug logs.
Show help for the command or group and exit.
Bypass the extension discovery cache and reload extensions from disk.
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, table, tsv, yaml, yamlc |
JMESPath query string to filter/project the command result before rendering.
az storage account delete
Delete a storage account.
Delete an Azure Storage account and all of the data it contains. This cannot be undone. The command deletes immediately without prompting for confirmation, so there is no --yes option. The command returns no output on success.
az storage account delete --name
--resource-group
[--profile]
[--subscription-id]
Examples
Delete a storage account
az storage account delete --resource-group myResourceGroup --name mystorageaccount
Required Parameters
The name of the storage account.
The resource group name.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Use the named profile for this command (overrides the active profile).
Azure Subscription Id. Defaults to the subscription of the active profile.
Global Parameters
Increase logging verbosity to show all debug logs.
Show help for the command or group and exit.
Bypass the extension discovery cache and reload extensions from disk.
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, table, tsv, yaml, yamlc |
JMESPath query string to filter/project the command result before rendering.
az storage account list
List storage accounts.
List Azure Storage accounts. Supply --resource-group to list the accounts in one resource group, or omit it to list every storage account in the subscription. Results are returned as a flat array; paged responses from the service are followed automatically.
az storage account list [--profile]
[--resource-group]
[--subscription-id]
Examples
List every storage account in the subscription
az storage account list
List the storage accounts in a resource group
az storage account list --resource-group myResourceGroup
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Use the named profile for this command (overrides the active profile).
The resource group name. Omit to list every storage account in the subscription.
Azure Subscription Id. Defaults to the subscription of the active profile.
Global Parameters
Increase logging verbosity to show all debug logs.
Show help for the command or group and exit.
Bypass the extension discovery cache and reload extensions from disk.
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, table, tsv, yaml, yamlc |
JMESPath query string to filter/project the command result before rendering.
az storage account show
Show the properties of a storage account.
Get the properties of an Azure Storage account, including its SKU, kind, location, endpoints, network rules, encryption settings, and provisioning state. Use --expand geoReplicationStats to include geo-replication status, which reports the replication state and whether the account can fail over.
az storage account show --name
--resource-group
[--expand {geoReplicationStats}]
[--profile]
[--subscription-id]
Examples
Show a storage account
az storage account show --resource-group myResourceGroup --name mystorageaccount
Show a storage account with geo-replication statistics
az storage account show --resource-group myResourceGroup --name mystorageaccount --expand geoReplicationStats
Required Parameters
The name of the storage account.
The resource group name.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Additional properties to include in the response.
| Property | Value |
|---|---|
| Accepted values: | geoReplicationStats |
Use the named profile for this command (overrides the active profile).
Azure Subscription Id. Defaults to the subscription of the active profile.
Global Parameters
Increase logging verbosity to show all debug logs.
Show help for the command or group and exit.
Bypass the extension discovery cache and reload extensions from disk.
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, table, tsv, yaml, yamlc |
JMESPath query string to filter/project the command result before rendering.