1
を「ResourceNotSupported」私はこのスクリプトを使用して米国中部地域のアプリの洞察を作成:アラートの作成は、「コード」で失敗します。
New-AzureRmResource -ResourceName $appInsightsName -ResourceGroupName $defaultRgName -Tag @{ Name = "AppInsightsApp"; Value = $appInsightsName} -ResourceType "Microsoft.Insights/Components" -Location $defaultLocation -PropertyObject @{"Type"="ASP.NET"} -Force
今、私は、このアプリケーションInsightsのインスタンスにアラートを追加しようとしています使用して次のスクリプト:
$appInsights = Get-AzureRmResource -ResourceName $appInsightsName -ResourceGroupName $defaultRgName -ResourceType "Microsoft.Insights/Components" -Verbose
Add-AlertRule -Name "Exception Occured" -Description "Exception occured alert" -ResourceGroup $defaultRgName -ResourceId $appInsights.ResourceId -MetricName "Server Exceptions" -Operator GreaterThanOrEqual -Threshold 1 -WindowSize 00:05:00 -CustomEmails "[email protected]" -Location $defaultLocation -RuleType Metric -Verbose
そして、私はいつも次のエラー取得:
Add-AlertRule : ResourceNotSupported: The target resource id
'/subscriptions/XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX/resourceGroups/RG-Dev-CentralUS/providers/Microsoft.Insights/components/testkktest-appinsights' is not supported.
どうすればFをこの問題は?
エラーメッセージは何か、この中**ターゲット・リソースID fooがサポートされていません」のように言った場合、それはより多くの情報をたくさんの一体だろうロケーション**。"または、 "ターゲット*リソースタイプ*バーはこの場所ではサポートされていません*。"私は、この回答に遭遇する前に、私のリソースIDと参考文献が何が間違っていたのかを把握するのに時間を浪費しました。 – shoover
確かに私はtotallに同意する! :いいぞ – Jaya