【问题标题】:Get the Azure App Service Environment outbound IP获取 Azure 应用服务环境出站 IP
【发布时间】:2017-03-16 12:50:35
【问题描述】:

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

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

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

我错过了什么?有没有其他方法(可能直接在ARM模板中使用reference())来获取IP?

【问题讨论】:

    标签: azure azure-resource-manager azure-app-service-envrmnt


    【解决方案1】:

    更简单的方法:

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

    你的方式:

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

    【讨论】:

    • 谢谢,它有效。虽然我们无法直接从 ASE 检索任何 IP 有点奇怪......
    猜你喜欢
    • 2017-11-16
    • 2020-08-06
    • 2020-11-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-09
    • 1970-01-01
    相关资源
    最近更新 更多