我正在尝试使用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'.
有任何想法吗?

最佳答案

您的resourcename使用什么?应该是yourFunctionAppName/web
您的命令的工作方式与我用resourceGroup名称替换Resoucegroup name以及用resourcename替换my-function-app-name/web的方式完全一样

10-05 23:47