建立儲存體帳戶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 Resource Manager 範本來建立儲存體帳戶。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 Az PowerShell 模組。This article has been updated to use the Azure Az PowerShell module. Az PowerShell 模組是用來與 Azure 互動的建議 PowerShell 模組。The Az PowerShell module is the recommended PowerShell module for interacting with Azure. 若要開始使用 Az PowerShell 模組,請參閱安裝 Azure PowerShellTo get started with the Az PowerShell module, see Install Azure PowerShell. 若要瞭解如何遷移至 Az PowerShell 模組,請參閱將 Azure PowerShell 從 AzureRM 遷移至 Az。To learn how to migrate to the Az PowerShell module, see Migrate Azure PowerShell from AzureRM to Az.

必要條件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

每個儲存體帳戶都必須屬於 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 儲存體帳戶概觀For more information about types of storage accounts and other storage account settings, see Azure storage account overview.

若要在 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. 在 [基本] 索引標籤上,選取要在其中建立儲存體帳戶的訂用帳戶。On the Basics tab, select the subscription in which to create the storage account.
  4. 在 [資源群組] 欄位下,選取您想要的資源群組,或建立新的資源群組。Under the Resource group field, select your desired resource group, or create a new resource group. 如需 Azure 資源群組的詳細資訊,請參閱 Azure Resource Manager 概觀For more information on Azure resource groups, see Azure Resource Manager overview.
  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 may include only numbers and lowercase letters.
  6. 選取儲存體帳戶的位置,或使用預設位置。Select a location for your storage account, or use the default location.
  7. 選取一個效能層級。Select a performance tier. 預設階層為 [標準]。The default tier is Standard.
  8. 將 [帳戶類型] 欄位設定為 [Storage V2 (一般用途 v2)]。Set the Account kind field to Storage V2 (general-purpose v2).
  9. 指定儲存體帳戶的複寫方式。Specify how the storage account will be replicated. 預設複寫選項為「讀取權限異地備援儲存體 (RA-GRS)」。The default replication option is Read-access geo-redundant storage (RA-GRS). 如需可用複寫選項的詳細資訊,請參閱 Azure 儲存體備援For more information about available replication options, see Azure Storage redundancy.
  10. 您可以在 [網路]、[資料保護]、[進階] 和 [標籤] 索引標籤上取得其他選項。Additional options are available on the Networking, Data protection, Advanced, and Tags tabs. 若要使用 Azure Data Lake Storage,請選擇 [進階] 索引標籤,然後將 [階層命名空間] 設定為 [啟用]。To use Azure Data Lake Storage, choose the Advanced tab, and then set Hierarchical namespace to Enabled. 如需詳細資訊,請參閱 Azure Data Lake Storage Gen2 簡介For more information, see Azure Data Lake Storage Gen2 Introduction
  11. 選取 [檢閱 + 建立] ,以檢閱您的儲存體帳戶設定並建立帳戶。Select Review + Create to review your storage account settings and create the account.
  12. 選取 [建立]。Select Create.

下圖顯示新儲存體帳戶 [基本] 索引標籤上的設定:The following image shows the settings on the Basics tab for a new storage account:

螢幕擷取畫面,顯示如何在 Azure 入口網站中建立儲存體帳戶

刪除儲存體帳戶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