将 Azure CLI 用于 Azure 存储Using the Azure CLI with Azure Storage

开源且跨平台的 Azure CLI 提供了一组可在 Azure 平台上运行的命令。The open-source, cross-platform Azure CLI provides a set of commands for working with the Azure platform. 它提供 Azure 门户所提供的很多相同功能,包括各种数据访问功能。It provides much of the same functionality found in the Azure portal, including rich data access.

本指南介绍如何使用 Azure CLI 执行多个使用 Azure 存储帐户中的资源的任务。In this guide, we show you how to use the Azure CLI to perform several tasks working with resources in your Azure Storage account. 在使用本指南之前,我们建议下载并安装或者升级到最新版 CLI。We recommend that you download and install or upgrade to the latest version of the CLI before using this guide.

指南中的示例假设在 Ubuntu 上使用 Bash shell,但其他平台的执行情况应与此类似。The examples in the guide assume the use of the Bash shell on Ubuntu, but other platforms should perform similarly.


本文中所述的功能现在可用于具有分层命名空间的帐户。The features described in this article are now available to accounts that have a hierarchical namespace. 若要查看限制,请参阅 Azure Data Lake Storage Gen2 的已知问题一文。To review limitations, see the Known issues with Azure Data Lake Storage Gen2 article.

Azure CLI 的版本Versions of the Azure CLI

Azure 命令行接口 (CLI) 目前提供两个版本:There are two versions of the Azure Command-Line Interface (CLI) currently available:

  • Azure CLI:当前版本的 Azure CLI,适用于资源管理器部署模型。Azure CLI: The current version of the Azure CLI, for use with the Resource Manager deployment model.
  • Azure 经典 CLI:更早版本的 Azure CLI,仅适用于经典部署模型。Azure classic CLI: An older version of the Azure CLI, intended for use only with the classic deployment model.


本指南假设读者了解 Azure 存储的基本概念。This guide assumes that you understand the basic concepts of Azure Storage. 本指南还假设读者能够满足下面针对 Azure 和存储服务指定的帐户创建要求。It also assumes that you're able to satisfy the account creation requirements that are specified below for Azure and the Storage service.


安装 Azure CLIInstall the Azure CLI

按照安装 Azure CLI 中的概要说明,下载和安装 Azure CLI。Download and install the Azure CLI by following the instructions outlined in Install the Azure CLI.


如果在安装时遇到问题,请查看本文的安装故障排除部分以及 GitHub 上的 Install Troubleshooting(安装故障排除)指南。If you have trouble with the installation, check out the Installation Troubleshooting section of the article, and the Install Troubleshooting guide on GitHub.

使用 CLIWorking with the CLI

安装 CLI 之后,可以在命令行接口(Bash、终端、命令提示符)中使用 az 命令访问 Azure CLI 命令。Once you've installed the CLI, you can use the az command in your command-line interface (Bash, Terminal, Command Prompt) to access the Azure CLI commands. 键入 az 命令以查看基本命令的完整列表(下面的示例输出已被截断):Type the az command to see a full list of the base commands (the following example output has been truncated):

    /  \    _____   _ _ __ ___
   / /\ \  |_  / | | | \'__/ _ \
  / ____ \  / /| |_| | | |  __/
 /_/    \_\/___|\__,_|_|  \___|

Welcome to the cool new Azure CLI!

Here are the base commands:

    account          : Manage subscriptions.
    acr              : Manage Azure container registries.
    acs              : Manage Azure Container Services.
    ad               : Synchronize on-premises directories and manage Azure Active Directory

在命令行接口中,执行命令 az storage --help 列出 storage 命令子组。In your command-line interface, execute the command az storage --help to list the storage command subgroups. 子组的说明概述了 Azure CLI 提供的用于使用存储资源的功能。The descriptions of the subgroups provide an overview of the functionality the Azure CLI provides for working with your storage resources.

    az storage: Durable, highly available, and massively scalable cloud storage.

    account  : Manage storage accounts.
    blob     : Object storage for unstructured data.
    container: Manage blob storage containers.
    cors     : Manage Storage service Cross-Origin Resource Sharing (CORS).
    directory: Manage file storage directories.
    entity   : Manage table storage entities.
    file     : File shares that use the standard SMB 3.0 protocol.
    logging  : Manage Storage service logging information.
    message  : Manage queue storage messages.
    metrics  : Manage Storage service metrics.
    queue    : Use queues to effectively scale applications according to traffic.
    share    : Manage file shares.
    table    : NoSQL key-value storage using semi-structured datasets.

将 CLI 连接到 Azure 订阅Connect the CLI to your Azure subscription

若要使用 Azure 订阅中的资源,必须首先使用 az login登录到 Azure 帐户。To work with the resources in your Azure subscription, you must first log in to your Azure account with az login. 登录方法有多种:There are several ways you can log in:

  • 交互式登录 :az loginInteractive login: az login
  • 使用用户名和密码登录 :az login -u johndoe@contoso.com -p VerySecretLog in with user name and password: az login -u johndoe@contoso.com -p VerySecret
    • 这不能用于 Microsoft 帐户或使用多重身份验证的帐户。This doesn't work with Microsoft accounts or accounts that use multi-factor authentication.
  • 使用服务主体登录 :az login --service-principal -u http://azure-cli-2016-08-05-14-31-15 -p VerySecret --tenant contoso.partner.onmschina.cnLog in with a service principal: az login --service-principal -u http://azure-cli-2016-08-05-14-31-15 -p VerySecret --tenant contoso.partner.onmschina.cn

Azure CLI 示例脚本Azure CLI sample script

接下来,我们将使用一个小型 shell 脚本,该脚本会发出一些基本的 Azure CLI 命令与 Azure 存储资源进行交互。Next, we'll work with a small shell script that issues a few basic Azure CLI commands to interact with Azure Storage resources. 该脚本首先在存储帐户中创建新容器,再将现有文件(作为 Blob)上传到该容器。The script first creates a new container in your storage account, then uploads an existing file (as a blob) to that container. 然后,列出容器中的所有 Blob,最后,将文件下载到指定的本地计算机上的目标。It then lists all blobs in the container, and finally, downloads the file to a destination on your local computer that you specify.

# A simple Azure Storage example script

export AZURE_STORAGE_ACCOUNT=<storage_account_name>
export AZURE_STORAGE_KEY=<storage_account_key>

export container_name=<container_name>
export blob_name=<blob_name>
export file_to_upload=<file_to_upload>
export destination_file=<destination_file>

echo "Creating the container..."
az storage container create --name $container_name

echo "Uploading the file..."
az storage blob upload --container-name $container_name --file $file_to_upload --name $blob_name

echo "Listing the blobs..."
az storage blob list --container-name $container_name --output table

echo "Downloading the file..."
az storage blob download --container-name $container_name --name $blob_name --file $destination_file --output table

echo "Done"

配置并运行脚本Configure and run the script

  1. 打开偏好的文本编辑器,将前面的脚本复制并粘贴到编辑器中。Open your favorite text editor, then copy and paste the preceding script into the editor.

  2. 接下来,更新脚本的变量以反映用户的配置设置。Next, update the script's variables to reflect your configuration settings. 按照明确的说明替换以下值:Replace the following values as specified:

    • <storage_account_name>:存储帐户的名称 。<storage_account_name> The name of your storage account.
    • <storage_account_key>:存储帐户的主访问密钥或辅助访问密钥 。<storage_account_key> The primary or secondary access key for your storage account.
    • <container_name>:要创建的新容器的名称,例如“azure-cli-sample-container” 。<container_name> A name the new container to create, such as "azure-cli-sample-container".
    • <blob_name>:容器中的目标 Blob 的名称 。<blob_name> A name for the destination blob in the container.
    • <file_to_upload>:本地计算机上小文件的路径,例如:“~/images/HelloWorld.png” 。<file_to_upload> The path to small file on your local computer, such as "~/images/HelloWorld.png".
    • <destination_file>:目标文件路径,如“~/downloadedImage.png” 。<destination_file> The destination file path, such as "~/downloadedImage.png".
  3. 更新所需的变量后,保存脚本并退出编辑器。After you've updated the necessary variables, save the script and exit your editor. 后续步骤假定已将脚本命名为 my_storage_sample.sh 。The next steps assume you've named your script my_storage_sample.sh.

  4. 如果需要,请将脚本标记为可执行文件:chmod +x my_storage_sample.shMark the script as executable, if necessary: chmod +x my_storage_sample.sh

  5. 执行该脚本。Execute the script. 例如,在 Bash 中: ./my_storage_sample.shFor example, in Bash: ./my_storage_sample.sh

应看到类似于以下内容的输出,在脚本中指定的 <destination_file> 应出现在本地计算机上 。You should see output similar to the following, and the <destination_file> you specified in the script should appear on your local computer.

Creating the container...
  "created": true
Uploading the file...
Percent complete: %100.0
Listing the blobs...
Name       Blob Type      Length  Content Type              Last Modified
---------  -----------  --------  ------------------------  -------------------------
README.md  BlockBlob        6700  application/octet-stream  2017-05-12T20:54:59+00:00
Downloading the file...


前面的输出采用 格式。The preceding output is in table format. 可以通过在 CLI 命令中指定 --output 参数来指定要使用的输出格式,或使用 az configure 进行全局设置。You can specify which output format to use by specifying the --output argument in your CLI commands, or set it globally using az configure.

管理存储帐户Manage storage accounts

新建存储帐户Create a new storage account

若要使用 Azure 存储,需创建一个存储帐户。To use Azure Storage, you need a storage account. 可以在将计算机配置为连接到订阅之后,创建新的 Azure 存储帐户。You can create a new Azure Storage account after you've configured your computer to connect to your subscription.

az storage account create \
    --location <location> \
    --name <account_name> \
    --resource-group <resource_group> \
    --sku <account_sku>
  • --location [必需]:位置。--location [Required]: Location. 例如“China East”。For example, "China East".
  • --name [必需]:存储帐户名称。--name [Required]: The storage account name. 名称的长度必须为 3 到 24 个字符,只能包含小写字母数字字符。The name must be 3 to 24 characters in length, and use only lowercase alphanumeric characters.
  • --resource-group [必需]:资源组的名称。--resource-group [Required]: Name of resource group.
  • --sku [必需]:存储帐户 SKU。--sku [Required]: The storage account SKU. 允许的值:Allowed values:
    • Premium_LRS
    • Standard_GRS
    • Standard_LRS
    • Standard_RAGRS
    • Standard_ZRS

设置默认的 Azure 存储帐户环境变量Set default Azure storage account environment variables

可以在 Azure 订阅中设置多个存储帐户。You can have multiple storage accounts in your Azure subscription. 若要选择其中一个帐户用于所有后续存储命令,可以设置这些环境变量:To select one of them to use for all subsequent storage commands, you can set these environment variables:

首先,使用 az storage account keys list 命令显示存储帐户密钥:First, display your storage account keys by using the az storage account keys list command:

az storage account keys list \
    --account-name <account_name> \
    --resource-group <resource_group> \
    --output table

现在你有了密钥,可以将其和帐户名定义为环境变量:Now that you have the key, you can define it and the account name as environment variables:

export AZURE_STORAGE_ACCOUNT=<account_name>
export AZURE_STORAGE_KEY=<key>

设置默认存储帐户的另一种方法是使用连接字符串。Another way to set a default storage account is by using a connection string. 首先,使用 show-connection-string 命令获取连接字符串:First, get the connection string with the show-connection-string command:

az storage account show-connection-string \
    --name <account_name> \
    --resource-group <resource_group>

然后复制输出连接字符串,并设置 AZURE_STORAGE_CONNECTION_STRING 环境变量(可能需要将连接字符串括在引号中):Then copy the output connection string and set the AZURE_STORAGE_CONNECTION_STRING environment variable (you might need to enclose the connection string in quotes):

export AZURE_STORAGE_CONNECTION_STRING="<connection_string>"


本文以下部分中的所有示例均假设已设置 AZURE_STORAGE_ACCOUNTAZURE_STORAGE_KEY 环境变量。All examples in the following sections of this article assume that you've set the AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_KEY environment variables.

创建并管理 blobCreate and manage blobs

Azure Blob 存储是用于存储大量非结构化数据(例如文本或二进制数据)的服务,这些数据可通过 HTTP 或 HTTPS 从世界各地进行访问。Azure Blob storage is a service for storing large amounts of unstructured data, such as text or binary data, that can be accessed from anywhere in the world via HTTP or HTTPS. 本部分假设读者熟悉 Azure Blob 存储的概念。This section assumes that you are already familiar with Azure Blob storage concepts. 有关详细信息,请参阅通过 .NET 开始使用 Azure Blob 存储Blob 服务概念For detailed information, see Get started with Azure Blob storage using .NET and Blob Service Concepts.

创建容器Create a container

Azure 存储中的每个 Blob 都必须在容器中。Every blob in Azure storage must be in a container. 可以使用 az storage container create 命令创建容器:You can create a container by using the az storage container create command:

az storage container create --name <container_name>

可以通过指定可选 --public-access 参数,为新容器设置读取访问权限的三个级别之一:You can set one of three levels of read access for a new container by specifying the optional --public-access argument:

  • off(默认值):容器数据是帐户所有者私有的。off (default): Container data is private to the account owner.
  • blob:Blob 的公共读取访问权限。blob: Public read access for blobs.
  • container:对整个容器的公共读取和列表访问权限。container: Public read and list access to the entire container.

有关详细信息,请参阅管理对容器和 Blob 的匿名读取访问For more information, see Manage anonymous read access to containers and blobs.

将 Blob 上传到容器中Upload a blob to a container

Azure Blob 存储支持块 Blob、追加 Blob 和页 Blob。Azure Blob storage supports block, append, and page blobs. 使用 blob upload 命令将 Blob 上传到容器:Upload blobs to a container by using the blob upload command:

az storage blob upload \
    --file <local_file_path> \
    --container-name <container_name> \
    --name <blob_name>

如果想要直接上传到存储帐户中容器内的文件夹,请将 --name <blob_name> 替换为 --name <folder/blob_name>If you would like to upload directly into a folder inside the container in your storage account, replace --name <blob_name> with --name <folder/blob_name>.

默认情况下,blob upload 命令将 *.vhd 文件上传到页 Blob 或块 Blob。By default, the blob upload command uploads *.vhd files to page blobs, or block blobs otherwise. 若要在上传 Blob 时指定另一种类型,可以使用 --type 参数,允许的值为 appendblockpageTo specify another type when you upload a blob, you can use the --type argument--allowed values are append, block, and page.

有关不同 Blob 类型的详细信息,请参阅 了解块 Blob、追加 Blob 和页 BlobFor more information on the different blob types, see Understanding Block Blobs, Append Blobs, and Page Blobs.

从容器下载 BlobDownload a blob from a container

此示例演示如何从容器下载 Blob:This example demonstrates how to download a blob from a container:

az storage blob download \
    --container-name mycontainer \
    --name myblob.png \
    --file ~/mydownloadedblob.png

列出容器中的 BlobList the blobs in a container

使用 az storage blob list 命令列出容器中的 blob。List the blobs in a container with the az storage blob list command.

az storage blob list \
    --container-name mycontainer \
    --output table

复制 blobCopy blobs

可以在存储帐户和区域内或跨存储帐户和区域异步复制 Blob。You can copy blobs within or across storage accounts and regions asynchronously.

以下示例演示如何将一个存储帐户中的 Blob 复制到另一个存储帐户。The following example demonstrates how to copy blobs from one storage account to another. 我们首先在源存储帐户中创建容器,并指定对其 blob 的公共读取访问权限。We first create a container in the source storage account, specifying public read-access for its blobs. 接下来,将文件上传到该容器,最后,将 Blob 从该容器复制到目标存储帐户中的容器。Next, we upload a file to the container, and finally, copy the blob from that container into a container in the destination storage account.

# Create container in source account
az storage container create \
    --account-name sourceaccountname \
    --account-key sourceaccountkey \
    --name sourcecontainer \
    --public-access blob

# Upload blob to container in source account
az storage blob upload \
    --account-name sourceaccountname \
    --account-key sourceaccountkey \
    --container-name sourcecontainer \
    --file ~/Pictures/sourcefile.png \
    --name sourcefile.png

# Copy blob from source account to destination account (destcontainer must exist)
az storage blob copy start \
    --account-name destaccountname \
    --account-key destaccountkey \
    --destination-blob destfile.png \
    --destination-container destcontainer \
    --source-uri https://sourceaccountname.blob.core.chinacloudapi.cn/sourcecontainer/sourcefile.png

在上面的示例中,目标容器必须已存在于目标存储帐户中,复制操作才能成功。In the above example, the destination container must already exist in the destination storage account for the copy operation to succeed. 此外,--source-uri 参数中指定的源 blob 必须包含共享访问签名 (SAS) 令牌,或可公开访问,如此示例所示。Additionally, the source blob specified in the --source-uri argument must either include a shared access signature (SAS) token, or be publicly accessible, as in this example.

删除 BlobDelete a blob

若要删除 Blob,请使用 blob delete 命令:To delete a blob, use the blob delete command:

az storage blob delete --container-name <container_name> --name <blob_name>

设置内容类型Set the content type

内容类型(也称为 MIME 类型)标识 Blob 中数据的格式。The content type, also known as the MIME type, identifies the format of the data in the blob. 浏览器和其他软件使用内容类型来确定如何处理数据。Browsers and other software use the content type to determine how to process the data. 例如,PNG 图像的内容类型为 image/pngFor example, the content type for PNG images is image/png. 若要设置内容类型,请使用 blob update 命令:To set the content type, use the blob update command:

az storage blob update
    --container-name <container_name>
    --name <blob_name>
    --content-type <content_type>

创建和管理文件共享Create and manage file shares

Azure 文件使用服务器消息块 (SMB) 协议为应用程序提供共享存储。Azure Files offers shared storage for applications using the Server Message Block (SMB) protocol. Azure 虚拟机和云服务以及本地应用程序可以通过装载的共享来共享文件数据。Azure virtual machines and cloud services, as well as on-premises applications, can share file data via mounted shares. 可以通过 Azure CLI 管理文件共享和文件数据。You can manage file shares and file data via the Azure CLI. 有关 Azure 文件的详细信息,请参阅 Azure 文件简介For more information on Azure Files, see Introduction to Azure Files.

创建文件共享Create a file share

Azure 文件共享是 Azure 中的 SMB 文件共享。An Azure file share is an SMB file share in Azure. 所有目录和文件都必须在文件共享中创建。All directories and files must be created in a file share. 一个帐户可以包含无限数量的共享,一个共享可以存储无限数量的文件,直到达到存储帐户的容量限制为止。An account can contain an unlimited number of shares, and a share can store an unlimited number of files, up to the capacity limits of the storage account. 下面的示例创建名为 myshare的文件共享。The following example creates a file share named myshare.

az storage share create --name myshare

创建目录Create a directory

目录提供了 Azure 文件共享中的层次结构。A directory provides a hierarchical structure in an Azure file share. 以下示例在文件共享中创建名为 myDir 的目录。The following example creates a directory named myDir in the file share.

az storage directory create --name myDir --share-name myshare

目录路径可以包括多个级别,例如 dir1/dir2 。A directory path can include multiple levels, for example dir1/dir2. 但在创建子目录之前,必须确保所有父目录都存在。However, you must ensure that all parent directories exist before creating a subdirectory. 例如,对于路径 dir1/dir2,必须先创建目录 dir1,然后再创建目录 dir2 。For example, for path dir1/dir2, you must first create directory dir1, then create directory dir2.

将本地文件上传到共享Upload a local file to a share

以下示例将文件从 ~/temp/samplefile.txt 上传到 myshare 文件共享的根目录 。The following example uploads a file from ~/temp/samplefile.txt to root of the myshare file share. --source 参数指定要上传的现有本地文件。The --source argument specifies the existing local file to upload.

az storage file upload --share-name myshare --source ~/temp/samplefile.txt

与创建目录一样,可以指定共享内的目录路径,将文件上传到共享内的现有目录:As with directory creation, you can specify a directory path within the share to upload the file to an existing directory within the share:

az storage file upload --share-name myshare/myDir --source ~/temp/samplefile.txt

共享中的文件最大可为 1 TB。A file in the share can be up to 1 TB in size.

列出共享中的文件List the files in a share

可以使用 az storage file list 命令列出共享中的文件和目录:You can list files and directories in a share by using the az storage file list command:

# List the files in the root of a share
az storage file list --share-name myshare --output table

# List the files in a directory within a share
az storage file list --share-name myshare/myDir --output table

# List the files in a path within a share
az storage file list --share-name myshare --path myDir/mySubDir/MySubDir2 --output table

复制文件Copy files

可将一个文件复制到另一个文件,将一个文件复制到一个 Blob,或将一个 Blob 复制到一个文件。You can copy a file to another file, a file to a blob, or a blob to a file. 例如,要将文件复制到不同共享中的目录,请执行以下操作:For example, to copy a file to a directory in a different share:

az storage file copy start \
--source-share share1 --source-path dir1/file.txt \
--destination-share share2 --destination-path dir2/file.txt     

创建共享快照Create share snapshot

可以使用 az storage share snapshot 命令创建共享快照:You can create a share snapshot by using the az storage share snapshot command:

az storage share snapshot -n <share name>

示例输出Sample Output

  "metadata": {},
  "name": "<share name>",
  "properties": {
    "etag": "\"0x8D50B7F9A8D7F30\"",
    "lastModified": "2017-10-04T23:28:22+00:00",
    "quota": null
  "snapshot": "2017-10-04T23:28:35.0000000Z"

列出共享快照List share snapshots

可使用 az storage share list --include-snapshots 列出特定共享的共享快照You may list share snapshots of a particular share using az storage share list --include-snapshots

az storage share list --include-snapshots

示例输出Sample Output

    "metadata": null,
    "name": "sharesnapshotdefs",
    "properties": {
      "etag": "\"0x8D50B5F4005C975\"",
      "lastModified": "2017-10-04T19:36:46+00:00",
      "quota": 5120
    "snapshot": "2017-10-04T19:44:13.0000000Z"
    "metadata": null,
    "name": "sharesnapshotdefs",
    "properties": {
      "etag": "\"0x8D50B5F4005C975\"",
      "lastModified": "2017-10-04T19:36:46+00:00",
      "quota": 5120
    "snapshot": "2017-10-04T19:45:18.0000000Z"
    "metadata": null,
    "name": "sharesnapshotdefs",
    "properties": {
      "etag": "\"0x8D50B5F4005C975\"",
      "lastModified": "2017-10-04T19:36:46+00:00",
      "quota": 5120
    "snapshot": null

浏览共享快照Browse share snapshots

此外,还可以使用 az storage file list 浏览到特定共享快照以查看其内容。You may also browse into a particular share snapshot to view its content using az storage file list. 用户必须指定共享名 --share-name <snare name> 和时间戳 --snapshot '2017-10-04T19:45:18.0000000Z'One has to specify the share name --share-name <snare name> and the timestamp --snapshot '2017-10-04T19:45:18.0000000Z'

az storage file list --share-name sharesnapshotdefs --snapshot '2017-10-04T19:45:18.0000000Z' -otable

示例输出Sample Output

Name            Content Length    Type    Last Modified
--------------  ----------------  ------  ---------------
HelloWorldDir/                    dir
IMG_0966.JPG    533568            file
IMG_1105.JPG    717711            file
IMG_1341.JPG    608459            file
IMG_1405.JPG    652156            file
IMG_1611.JPG    442671            file
IMG_1634.JPG    1495999           file
IMG_1635.JPG    974058            file

从共享快照还原Restore from share snapshots

可以通过使用 az storage file download 命令从共享快照复制或下载文件来还原文件You can restore a file by copying or downloading a file from a share snapshot using az storage file download command

az storage file download --path IMG_0966.JPG --share-name sharesnapshotdefs --snapshot '2017-10-04T19:45:18.0000000Z'

示例输出Sample Output

  "content": null,
  "metadata": {},
  "name": "IMG_0966.JPG",
  "properties": {
    "contentLength": 533568,
    "contentRange": "bytes 0-533567/533568",
    "contentSettings": {
      "cacheControl": null,
      "contentDisposition": null,
      "contentEncoding": null,
      "contentLanguage": null,
      "contentType": "application/octet-stream"
    "copy": {
      "completionTime": null,
      "id": null,
      "progress": null,
      "source": null,
      "status": null,
      "statusDescription": null
    "etag": "\"0x8D50B5F49F7ACDF\"",
    "lastModified": "2017-10-04T19:37:03+00:00",
    "serverEncrypted": true

删除共享快照Delete share snapshot

可以通过提供 --snapshot 参数和共享快照时间戳使用 az storage share delete 命令来删除共享快照:You can delete a share snapshot by using the az storage share delete command by providing --snapshot parameter with share snapshot timestamp:

az storage share delete -n <share name> --snapshot '2017-10-04T23:28:35.0000000Z'

示例输出Sample Output

  "deleted": true

后续步骤Next steps

下面是一些用于详细了解如何使用 Azure CLI 的附加资源。Here are some additional resources for learning more about working with the Azure CLI.