您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

创建 Azure 存储帐户Create an Azure Storage account

Azure 存储帐户包含所有 Azure 存储数据对象:Blob、文件、队列、表和磁盘。An Azure storage account contains all of your Azure Storage data objects: blobs, files, queues, tables, and disks. 存储帐户为你的 Azure 存储数据提供了一个唯一的命名空间,可以从世界上的任何位置通过 HTTP 或 HTTPS 访问该命名空间。The storage account provides a unique namespace for your Azure Storage data that is accessible from anywhere in the world over HTTP or HTTPS. Azure 存储帐户中的数据是持久的,高度可用、安全且可大规模缩放。Data in your Azure storage account is durable and highly available, secure, and massively scalable.

本操作指南文章介绍如何使用 Azure 门户Azure PowerShellAzure CLIAzure 资源管理器模板创建存储帐户。In this how-to article, you learn to create a storage account using the Azure portal, Azure PowerShell, Azure CLI, or an Azure Resource Manager template.

备注

本文进行了更新,以便使用新的 Azure PowerShell Az 模块。This article has been updated to use the new Azure PowerShell Az module. 你仍然可以使用 AzureRM 模块,至少在 2020 年 12 月之前,它将继续接收 bug 修补程序。You can still use the AzureRM module, which will continue to receive bug fixes until at least December 2020. 若要详细了解新的 Az 模块和 AzureRM 兼容性,请参阅新 Azure Powershell Az 模块简介To learn more about the new Az module and AzureRM compatibility, see Introducing the new Azure PowerShell Az module. 有关 Az 模块安装说明,请参阅安装 Azure PowerShellFor Az module installation instructions, see Install Azure PowerShell.

必备条件Prerequisites

如果没有 Azure 订阅,请在开始之前创建一个免费帐户If you don't have an Azure subscription, create a free account before you begin.

无。None.

登录 AzureSign in to Azure

登录到 Azure 门户Sign in to the Azure portal.

创建存储帐户Create a storage account

现在可以创建存储帐户。Now you are ready to create a storage account.

每个存储帐户都必须属于 Azure 资源组。Every storage account must belong to an Azure resource group. 资源组是对 Azure 资源进行分组的逻辑容器。A resource group is a logical container for grouping your Azure services. 在创建存储帐户时,可以选择创建新的资源组,也可以使用现有资源组。When you create a storage account, you have the option to either create a new resource group, or use an existing resource group. 本文介绍如何创建新资源组。This article shows how to create a new resource group.

可以使用常规用途 v2 存储帐户访问所有 Azure 存储服务:Blob、文件、队列、表和磁盘****。A general-purpose v2 storage account provides access to all of the Azure Storage services: blobs, files, queues, tables, and disks. 本文所述的步骤将创建常规用途 v2 存储帐户,但创建任何类型的存储帐户的步骤都相似。The steps outlined here create a general-purpose v2 storage account, but the steps to create any type of storage account are similar.

若要在 Azure 门户中创建常规用途 v2 存储帐户,请执行以下步骤:To create a general-purpose v2 storage account in the Azure portal, follow these steps:

  1. 在 Azure 门户菜单中,选择“所有服务” 。On the Azure portal menu, select All services. 在资源列表中,键入“存储帐户” 。In the list of resources, type Storage Accounts. 开始键入时,会根据输入筛选该列表。As you begin typing, the list filters based on your input. 选择“存储帐户” 。Select Storage Accounts.

  2. 在显示的“存储帐户”窗口中,选择“添加”。 On the Storage Accounts window that appears, choose Add.

  3. 选择要在其中创建存储帐户的订阅。Select the subscription in which to create the storage account.

  4. 在“资源组” 字段下,选择“新建” 。Under the Resource group field, select Create new. 输入新资源组的名称,如下图中所示。Enter a name for your new resource group, as shown in the following image.

    显示如何在门户中创建资源组的屏幕截图

  5. 然后,输入存储帐户的名称。Next, enter a name for your storage account. 所选名称在 Azure 中必须唯一。The name you choose must be unique across Azure. 该名称还必须为 3 到 24 个字符,并且只能包含数字和小写字母。The name also must be between 3 and 24 characters in length, and can include numbers and lowercase letters only.

  6. 选择存储帐户的位置或使用默认位置。Select a location for your storage account, or use the default location.

  7. 将这些字段设置为其默认值:Leave these fields set to their default values:

    字段Field Value
    部署模型Deployment model 资源管理器Resource Manager
    性能Performance StandardStandard
    帐户类型Account kind StorageV2(常规用途 v2)StorageV2 (general-purpose v2)
    复制Replication 读取访问异地冗余存储 (RA-GRS)Read-access geo-redundant storage (RA-GRS)
    访问层Access tier Hot
  8. 如果计划使用 Azure Data Lake Storage,请选择“高级” 选项卡,然后将“分层命名空间” 设置为“启用” 。If you plan to use Azure Data Lake Storage, choose the Advanced tab, and then set Hierarchical namespace to Enabled.

  9. 选择“查看+创建” 可查看存储帐户设置并创建帐户。Select Review + Create to review your storage account settings and create the account.

  10. 选择“创建” 。Select Create.

有关存储帐户类型和其他存储帐户设置的详细信息,请参阅 Azure 存储帐户概述For more information about types of storage accounts and other storage account settings, see Azure storage account overview. 有关资源组的详细信息,请参阅 Azure 资源管理器概述For more information on resource groups, see Azure Resource Manager overview.

有关可用的复制选项的详细信息,请参阅存储复制选项For more information about available replication options, see Storage replication options.

删除存储帐户Delete a storage account

删除存储帐户将删除整个帐户,包括该帐户中的所有数据,并且该操作无法撤销。Deleting a storage account deletes the entire account, including all data in the account, and cannot be undone.

  1. 导航到Azure 门户中的存储帐户。Navigate to the storage account in the Azure portal.
  2. 单击“删除” 。Click Delete.

或者,你可以删除资源组,该操作将删除该资源组中的存储帐户和其他任何资源。Alternately, you can delete the resource group, which deletes the storage account and any other resources in that resource group. 有关删除资源组的详细信息,请参阅删除资源组和资源For more information about deleting a resource group, see Delete resource group and resources.

警告

无法恢复已删除的存储帐户,也无法检索删除之前该存储帐户包含的任何内容。It's not possible to restore a deleted storage account or retrieve any of the content that it contained before deletion. 请在删除帐户之前务必备份要保存的任何内容。Be sure to back up anything you want to save before you delete the account. 对于帐户中的任务资源也是如此 — 一旦你删除了一个 Blob、表、队列或文件,则它会被永久删除。This also holds true for any resources in the account—once you delete a blob, table, queue, or file, it is permanently deleted.

如果尝试删除与 Azure 虚拟机关联的存储帐户,则会显示一条错误消息,指出存储帐户仍在使用。If you try to delete a storage account associated with an Azure virtual machine, you may get an error about the storage account still being in use. 有关排除此错误的帮助信息,请参阅删除存储帐户时排除错误For help troubleshooting this error, see Troubleshoot errors when you delete storage accounts.

后续步骤Next steps

在本操作指南文章中,你已创建一个常规用途 v2 标准存储帐户。In this how-to article, you've created a general-purpose v2 standard storage account. 若要了解如何通过存储帐户上传和下载 Blob,请继续阅读 Blob 存储快速入门之一。To learn how to upload and download blobs to and from your storage account, continue to one of the Blob storage quickstarts.