我无法删除天蓝色警报

时间:2019-06-07 11:05:00

标签: azure alert azure-powershell

我在Azure中收到以下警报:

ind = ~eye(size(DM));
[Object2, Object1] = find(ind);
Distance = DM(ind); % DM would need to be transposed first, but it is symmetric
result = table(Object1, Object2, Distance);

我以前删除过它,但仍然可见。

因此无法删除资源组。

PS C:\> Get-AzResource -Name "alert for rg"

Name              : alert for rg ResourceGroupName : plaz-rg2 ResourceType      : Microsoft.AlertsManagement/actionRules Location    : global ResourceId        : /subscriptions/XXXX/resourceGroups/plaz-rg2/providers/Microsoft.Alerts
                    Management/actionRules/alert for rg

当我尝试单独删除警报时,这是不可能的

PS C:\> Remove-AzResourceGroup -name "plaz-rg2"

Confirm
Are you sure you want to remove resource group 'plaz-rg2'
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): Y
Remove-AzResourceGroup : Long running operation failed with status 'Conflict'.
At line:1 char:1
+ Remove-AzResourceGroup -name "plaz-rg2"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : CloseError: (:) [Remove-AzResourceGroup], CloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Resources.RemoveAzureResourceGroupCmdlet

有什么办法摆脱它吗?

1 个答案:

答案 0 :(得分:0)

如果我们没有将ResourceGroupName作为输入参数与Remove-AzResource一起传递,则会看到此行为。

GetAzResource

RemoveAzResource-Error

但是,如果您传入ResourceGroupName,它将成功运行。请尝试一下。

enter image description here

附加documentation reference删除AlertRule。

希望这会有所帮助。