我正在尝试使用以下 powershell 命令禁用带有目标资源 LogAnalytics 工作区的 Azure 警报规则,
Update-AzScheduledQueryRule -ResourceGroupName $ResourceGroupName -Name $AlertRuleName -Enabled $false
但是出现以下错误:
Exception type: Exception, Message: System.Exception: Error in updating Log Alert Rule ---> System.AggregateException: One or more errors occurred. ---> Microsoft.Azure.Management.Monitor.Models.ErrorResponseException: Operation returned an invalid status code 'BadGateway'
at Microsoft.Azure.Management.Monitor.ScheduledQueryRulesOperations.<UpdateWithHttpMessagesAsync>d__7.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)