gpt4 book ai didi

azure - 是否有任何选项可以为 Azure 仪表板的导出编写脚本?

转载 作者:行者123 更新时间:2023-12-03 05:41:25 26 4
gpt4 key购买 nike

在 Azure 中,您可以创建仪表板并使用门户上的按钮将其导出。但是,似乎没有通过 API/SDK/CLI 导出 ARM 的选项。我错了,还是这确实是仪表板体验中的一个差距?

最佳答案

您还可以通过 Azure CLI 导出资源组的模板, PowerShell ,以及 REST API .

更新:

可以看到描述here如下所示:

Shared dashboards in Azure are resources just like virtual machines and storage accounts. Therefore, they can be managed programmatically via the Azure Resource Manager REST APIs, the Azure CLI, Azure PowerShell commands, and many Azure portal features build on top of these APIs to make resource management easier.

实际上,您在 Azure Dashboard 中通过按钮下载的并不是资源,因此您无法通过命令或 API 导出它。您需要的是将仪表板模板作为资源,然后您可以使用命令(Azure CLI或PowerShell)和API将其导出。

以下是门户中作为资源的示例:

enter image description here

然后使用 Azure CLI 命令导出模板,如下所示:

az group deployment export -g grouName -n templateName > dashboard.json

关于azure - 是否有任何选项可以为 Azure 仪表板的导出编写脚本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58426856/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com