gpt4 book ai didi

azure - 如何获取用于资源组部署的最新 Azure 库模板?

转载 作者:行者123 更新时间:2023-12-01 13:48:16 26 4
gpt4 key购买 nike

我使用 Get-AzureResourceGroupGalleryTemplate Azure PowerShell cmdlet 获取用于资源组部署的 Azure 资源组库模板,但在我将 PowerShell 升级到最新版本 (1.0 .1)。

有什么替代方法可以做到这一点?

最佳答案

最新的 Azure PowerShell 修订版 (1.0.1) 中已弃用 Get-AzureResourceGroupGalleryTemplate cmdlet。

有几种选择。

  1. 使用Azure 快速入门模板

    您可以前往Azure Quickstart Templates .

    此链接包含用于快速启动部署的最新 Azure 库模板列表,这些模板始终是最新的。

  2. 对 Microsoft Azure Gallery 端点的 GET 请求 REST API 调用

    向 Microsoft Azure Gallery 端点发出 GET 请求:https://gallery.azure.com/Microsoft.Gallery/GalleryItems?api-version=2015-10-01

    预期响应应采用 JSON 格式,包含 Azure 库模板项目列表。

    下面显示了从 JSON 响应返回的图库模板之一。

"identity": "Microsoft.Windows10Enterprisex64.1.0.0",
"publisher": "Microsoft",
"publisherDisplayName": "Microsoft",
"itemName": "Windows10Enterprisex64",
"itemDisplayName": "Windows 10 Enterprise (x64)",...

希望这有帮助!

关于azure - 如何获取用于资源组部署的最新 Azure 库模板?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34066767/

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