You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure中Microsoft.Insights/scheduledQueryRules无法更新Scope问题咨询

关于Microsoft.Insights/scheduledQueryRules资源无法更新Scope的问题确认及说明

结论:Microsoft.Insights/scheduledQueryRules资源的Scope字段确实不支持更新操作,尝试通过ARM模板修改已存在的该类资源的Scope时,会触发「Scope can't be updated (Bad Request)」错误。

与metricAlerts的差异说明

Microsoft.Insights/metricAlerts资源在API设计上支持Scope字段的更新,但scheduledQueryRules(日志告警规则)的Scope属于创建时的核心配置项,一旦资源创建完成就无法修改,这是两类告警资源在功能设计上的明确差异。

注意事项

目前官方文档未明确标注scheduledQueryRules的Scope不可更新这一限制,容易导致开发者花费不必要的时间排查问题,特此提醒避免踩坑。

临时方案说明

删除并重建资源可以实现Scope的变更,但如果当前受限于权限或业务约束无法执行该操作,暂时没有其他直接的更新途径。

测试用ARM代码(前提:已有设置好Scope的scheduledQueryRules资源)

{
  "type": "Microsoft.Insights/scheduledQueryRules",
  "apiVersion": "2022-08-01-preview",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "kind": "string",
  "identity": {
    "type": "string",
    "userAssignedIdentities": {}
  },
  "properties": {
    "actions": {
      "actionGroups": [ "string" ],
      "customProperties": {}
    },
    "scopes": [ "PUT NEW SCOPE HERE" ],
  }
}

内容的提问来源于stack exchange,提问作者jaumecen

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.29 18:22:05