gpt4 book ai didi

azure - 编写 WebApp VNET 与 Azure Powershell 集成的脚本

转载 作者:行者123 更新时间:2023-12-05 00:35:42 26 4
gpt4 key购买 nike

我可以使用 Azure 门户将 Web 应用添加到虚拟网络,以便在其上托管的各种服务之间进行通信。不过,我已经通过 Powershell 编写了环境中的其他所有内容,并且也希望自动化 WebApp/VNET 集成。

到目前为止我已阅读以下文章:

https://azure.microsoft.com/en-gb/documentation/articles/web-sites-integrate-with-vnet/

但这只是通过门户进行操作的方法。我认为 Set-AzureRMWebApp cmdlet 是正确的使用方式,但我看不到任何可能有帮助的参数。

https://msdn.microsoft.com/en-us/library/mt652487.aspx

最佳答案

我遇到了同样的问题,但找不到使用 PS 模块来执行此操作的方法。不过,现在 Azure CLI 中已添加了功能。因此您可以从脚本中调用它。

az webapp vnet-integration add -g "resource group name" -n "app service name" --vnet "vnet name" --subnet "subnet name"

关于azure - 编写 WebApp VNET 与 Azure Powershell 集成的脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35012727/

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