获取 Azure 应用服务环境出站 IP

Get the Azure App Service Environment outbound IP

我正在部署应用服务环境,我需要获取其出站 IP。部署后,我可以在资源管理器中看到 IP,我应该可以使用以下 CmdLet 获取信息:

Get-AzureRmResource -ResourceGroupName asepoc-base -ResourceType Microsoft.Web/hostingEnvironments/capacities -ResourceName asepocxxxx/virtualip -ApiVersion 2015-08-01

但是这个命令没有 return 任何东西,尽管可以在 Http 响应中使用 fiddler 查看完整的 json 对象。

我是不是漏了什么?是否有其他方法(可能直接在 ARM 模板中使用 reference())获取 IP?

更简单的方法:

(Get-AzureRmWebApp -ResourceGroupName xxx -Name yyy).OutboundIpAddresses

你的方式:

(Get-AzureRmResource -ResourceGroupName xxx-ResourceType Microsoft.Web/sites -ApiVersion yyy -ResourceName zzz).Properties.OutboundIpAddresses