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

创建存储帐户Create a 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 your 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 门户中,选择“所有服务”。 In the Azure portal, 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 标准Standard
    帐户类型Account kind StorageV2(常规用途 v2)StorageV2 (general-purpose v2)
    复制Replication 读取访问异地冗余存储 (RA-GRS)Read-access geo-redundant storage (RA-GRS)
    访问层Access tier Hot
  8. 选择“查看+创建” 可查看存储帐户设置并创建帐户。Select Review + Create to review your storage account settings and create the account.

  9. 选择“创建” 。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.

清理资源Clean up resources

若要清理本操作指南文章创建的资源,可以删除资源组。If you wish to clean up the resources created by this how-to article, you can delete the resource group. 删除资源组也会删除相关联的存储帐户,以及与资源组相关联的任何其他资源。Deleting the resource group also deletes the associated storage account, and any other resources associated with the resource group.

若要使用 Azure 门户删除资源组,请执行以下操作:To remove a resource group using the Azure portal:

  1. 在 Azure 门户中展开左侧的菜单,打开服务菜单,然后选择“资源组”以显示资源组的列表。In the Azure portal, expand the menu on the left side to open the menu of services, and choose Resource Groups to display the list of your resource groups.
  2. 找到要删除的资源组,右键单击列表右侧的“更多”按钮 ( ... )。Locate the resource group to delete, and right-click the More button (...) on the right side of the listing.
  3. 选择“删除资源组”并进行确认。Select Delete resource group, and confirm.

后续步骤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.