首页 > 解决方案 > az storage account:“blob-service-properties”不在“az storage account”命令组中

问题描述

我想启用版本控制,使用 CLI 在 Azure 存储帐户中更改源。我从 Microsoft 文档https://docs.microsoft.com/en-us/cli/azure/storage/account/blob-service-properties?view=azure-cli-latest中获得了以下命令。

    az storage account blob-service-properties update -n sdffsjhiwezzaz --enable-change-feed true --enable-versioning true --enable-delete-retention true --delete-retention-days 100

并得到以下错误

    az storage account: 'blob-service-properties' is not in the 'az storage account' command group. See 'az storage account --help'.

请告诉我如何使用 Azure CLI 启用版本控制和 ChangeFeed

标签: azureazure-cli

解决方案


我能够成功运行命令。请确保您安装了最新版本的 CLI。

当我运行az --version命令时,这是我看到的:

azure-cli                          2.2.0

command-modules-nspkg              2.0.3
core                               2.2.0
nspkg                              3.0.4
telemetry                          1.0.4

此外,对于更改提要,您需要注册订阅此功能,因为它目前处于预览状态。您可以在此处找到有关它的说明:https ://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-change-feed?tabs=azure-portal#register-your-subscription-preview 。


推荐阅读