Anda dapat memanggil operasi BatchModifyDcdnWafRules untuk mengubah aturan mitigasi WAF secara batch. Operasi ini hanya mendukung pengubahan konfigurasi dalam skenario bot management.
Deskripsi operasi
Frekuensi pemanggilan untuk setiap pengguna dibatasi hingga 20 kali per detik.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dcdn:BatchModifyDcdnWafRules |
update |
*All Resource
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| PolicyId |
integer |
Yes |
ID kebijakan mitigasi. |
10000001 |
| RuleConfigs |
string |
Yes |
Konfigurasi aturan mitigasi. |
[{"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"}] |
Description of RuleConfigs
RuleConfigs adalah daftar struct. Setiap struct merepresentasikan satu aturan.
Untuk informasi lebih lanjut mengenai konten aturan dalam struct, lihat BatchCreateDcdnWafRules.
Anda harus mengirimkan semua aturan yang termasuk dalam kebijakan saat ini.
Dalam setiap struct, tambahkan ID aturan mitigasi untuk menentukan aturan yang ingin Anda ubah.
Parameter | Type | Required | Example | Description |
id | Long | No | 134 | ID aturan mitigasi. |
Dalam skenario bot management:
Untuk menambahkan aturan: Abaikan parameter id atau atur nilainya ke 0.
Untuk mengubah aturan: Kirimkan ID aturan tersebut dan atur parameter status ke "on".
Untuk menghapus aturan: Atur parameter status ke "off" dalam struct aturan tersebut. Aturan juga akan dihapus jika ID-nya tidak disertakan dalam kebijakan.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
CB1A380B-09F0-41BB-XXXX-72F8FD6DA2FE |
Contoh
Respons sukses
JSONformat
{
"RequestId": "CB1A380B-09F0-41BB-XXXX-72F8FD6DA2FE"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | The specified parameter is invalid. | A parameter is set to an invalid value. |
| 400 | Policy.NotExist | The specified policy does not exist. | The specified protection policy does not exist. |
| 400 | Rule.NotExist | The specified rule does not exist. | The specified rule does not exist in the current context or system configuration. Please verify the existence of the rule identifier and ensure it has been correctly defined or implemented. |
| 400 | RuleConfigs.Malformed | The specified RuleConfigs format is invalid. | The RuleConfigs parameter is in an invalid format. |
| 400 | RuleName.AlreadyExists | Rule name already exists in specified policy. | The specified rule name is already used by another rule. |
| 400 | Rule.QuantityOverflow | Rules are overflowed quantity in specified policy. | The number of rules in the specified policy has already reached the upper limit. |
| 500 | InternalError | An internal error occurred; please try again later. | An internal error occurred. Try again later. If the error persists, submit a ticket. |
| 403 | %s.NotSupport | The specified resource type %s is not supported. | The specified resource type is not supported. To use this type of resource, contact us. |
| 403 | %s.OverQuota | The quantity of %s exceeds the quota. | The number of resources exceeds the quota. If you want to apply for more resources, contact us. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.