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

如何在Bicep中定义Azure WAF自定义规则的Operation值为‘is’

Azure WAF自定义规则Bicep配置:设置Operation为“is”的方法

你遇到的问题核心是**negationCondition参数**的配置,这个参数直接对应你看到的“is”/“is not”操作:

  • 当negationCondition设为false(或省略该参数,默认值为false),Operation即为“is”
  • 当negationCondition设为true,Operation即为“is not”

另外注意你代码里的参数拼写错误:negationConditon少了一个字母i,正确的参数名是negationCondition,拼写错误可能导致配置不符合预期。

修正后的matchConditions块代码如下:

matchConditions: [
  { 
    matchVariables: [
      {
        variableName: 'RequestUri'
      }
    ]
  
    operator: 'Contains'   
    negationCondition: false // 设为false,对应Operation为"is"
    matchValues: [
     '/api/ds/query?ds_type=grafana-azure-monitor-datasource'
    ]           
  }
]

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.24 08:23:17