【问题标题】:Setting Azure function IP restrictions using powershell使用 powershell 设置 Azure 函数 IP 限制
【发布时间】:2018-02-23 15:13:47
【问题描述】:

我正在尝试使用 Azure PowerShell 修改我的 Azure 函数应用的 IP 限制。我正在使用这里描述的方法:Modify Azure AppService ipsecurity during release from VSTS

$r = Get-AzureRmResource -ResourceGroupName "Resoucegroup name" -ResourceType Microsoft.Web/sites/config -ResourceName resourcename -ApiVersion 2016-08-01

$p = $r.Properties
$p.ipSecurityRestrictions = @()
$restriction = @{}
$restriction.Add("ipAddress","0.0.0.0")
$restriction.Add("subnetMask","0.0.0.0")
$p.ipSecurityRestrictions+= $restriction

Set-AzureRmResource -ResourceGroupName  "Resoucegroup name" -ResourceType Microsoft.Web/sites/config -ResourceName resourcename -ApiVersion 2016-08-01 -PropertyObject $p -Force

但是 Set-AzureRmResource CmdLet 失败并出现错误:

The requested resource does not support http method 'PUT'.

有什么想法吗?

【问题讨论】:

标签: azure azure-functions


【解决方案1】:

您的resourcename 使用的是什么?应该是yourFunctionAppName/web

您的命令与我的工作方式完全一样

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-19
    • 1970-01-01
    • 1970-01-01
    • 2018-11-15
    • 1970-01-01
    • 2014-09-13
    相关资源
    最近更新 更多