修改防護規則配置資訊。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
yundun-waf:ModifyDefenseRule |
update |
*All Resource
|
|
無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| InstanceId |
string |
是 |
WAF 執行個體 ID。 說明
您可以透過呼叫 DescribeInstance 介面檢視目前 WAF 執行個體 ID。 |
waf_cdnsdf3**** |
| TemplateId |
integer |
否 |
防護規則範本 ID。 說明
僅當 DefenseType 為 template 時,需要傳入此參數。 |
5325 |
| DefenseScene |
string |
否 |
要修改的防護場景。更多資訊,請參見 CreateDefenseRule 的 DefenseScene 參數。 |
waf_group |
| Rules |
string |
是 |
防護規則詳情,以一系列參數建構的 JSON 格式轉化成字串。設定時,您需要指定規則 ID,並設定要修改的防護規則配置資訊。具體包括:
|
[ { "id": 2344, "policyId": 1012, "action": "block" } ] |
| DefenseType |
string |
否 |
防護規則類型。 枚舉值:
|
template |
| RegionId |
string |
否 |
WAF 執行個體所屬地域。取值:
|
cn-hangzhou |
| ResourceManagerResourceGroupId |
string |
否 |
阿里雲資源群組 ID。 |
rg-acfm***q |
| Resource |
string |
否 |
修改規則對應的防護物件。 說明
僅當 DefenseType 為 resource 時,需要傳入此參數。 |
rencs***-waf |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
請求結果。 |
||
| RequestId |
string |
請求 ID。 |
1EEA9C98-F166-54FE-ADE3-08D8****BDFA |
樣本
正常返回樣本
JSON格式
{
"RequestId": "1EEA9C98-F166-54FE-ADE3-08D8****BDFA"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | Defense.Control.DefenseWhitelistBypassRuleNotExist | The whitelist protection rule does not exist. | 白名單中加白的防護規則不存在。規則 ID:%s。 |
| 400 | Defense.Control.DefenseWhitelistConfigInvalid | The whitelist rule is misconfigured. | 白名單規則的設定錯誤:%s。 |
| 400 | Defense.Control.DefenseBookTypeInvalid | The address book type is illegal. | 地址簿類型不合法。 |
| 400 | Defense.Control.DefenseThreatIntelligenceConfigInvalid | Threat Intelligence Rule configuration error. | 威脅情報規則設定錯誤。%s。 |
| 400 | Defense.Control.DefenseIpCountOversize | The number of IPs exceeds the limit. | IP 數量超過限制。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。