調用BatchModifyDcdnWafRules批量修改WAF防護規則,目前僅支援修改配置Bot管理防護情境。
介面說明
單使用者調用頻率:20 次/秒。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
dcdn:BatchModifyDcdnWafRules |
update |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| PolicyId |
integer |
是 |
防護策略 ID。 |
10000001 |
| RuleConfigs |
string |
是 |
防護規則配置。 |
[{"id":135,"type":"web_sdk","status":"on","config":{"mode":"automatic","crossDomain":"example.com"},"action":""},{"id":149,"type":"intelligence_fake_crawler","status":"on","config":{},"action":"deny"}] |
RuleConfigs 說明
RuleConfigs 為列表切片,其中每個結構體代表一條規則:
結構體中規則內容,請參見 BatchCreateDcdnWafRules 。
需要傳入當前策略下所有規則。
每個結構體中添加如下防護規則 ID 欄位,指定需要修改的規則。
參數 | 類型 | 必要 | 樣本值 | 描述 |
id | Long | 否 | 134 | 防護規則 ID。 |
Bot 管理情境中:
新增規則:id 不傳或為 0。
修改規則:需攜帶修改的規則 ID 且 status="on"。
刪除規則:構體中參數 status="off"表示刪除該條規則。或者同一策略中未傳入某條規則 ID,表示刪除該條規則。
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| RequestId |
string |
請求 ID。 |
CB1A380B-09F0-41BB-XXXX-72F8FD6DA2FE |
樣本
正常返回樣本
JSON格式
{
"RequestId": "CB1A380B-09F0-41BB-XXXX-72F8FD6DA2FE"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | InvalidParameter | The specified parameter is invalid. | 參數錯誤 |
| 400 | Policy.NotExist | The specified policy does not exist. | 指定的防護策略不存在。 |
| 400 | Rule.NotExist | The specified rule does not exist. | 指定的規則在當前上下文或系統配置中不存在。請確認規則標識符的存在,並確保它已被正確定義或實現。 |
| 400 | RuleConfigs.Malformed | The specified RuleConfigs format is invalid. | 指定的參數RuleConfigs格式錯誤。 |
| 400 | RuleName.AlreadyExists | Rule name already exists in specified policy. | 規則名稱在指定的策略中已存在。 |
| 400 | Rule.QuantityOverflow | Rules are overflowed quantity in specified policy. | 規則在指定的策略中超出配額。 |
| 500 | InternalError | An internal error occurred; please try again later. | 內部錯誤,請重試,如果多次重試報錯請提交工單。 |
| 403 | %s.NotSupport | The specified resource type %s is not supported. | 不支援指定的資源類型。如需使用該類型資源,請與我們聯絡。 |
| 403 | %s.OverQuota | The quantity of %s exceeds the quota. | 該資源的數量超出了配額所規定的範圍,如需申請更多的額度,請與我們聯絡。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。