All Products
Search
Document Center

Web Application Firewall:ModifyProtectionRuleStatus

Last Updated:May 29, 2026

Mengaktifkan atau menonaktifkan aturan proteksi dalam modul proteksi tertentu untuk domain yang dilindungi oleh Web Application Firewall (WAF).

Gunakan parameter DefenseType untuk menentukan modul proteksi. Modul yang didukung mencakup Website Tamper-proofing, Allowed Crawlers, Bot Threat Intelligence, Custom Protection Policy, dan Website Whitelist.

Debugging

OpenAPI Explorer secara otomatis menghitung nilai signature. Untuk kemudahan Anda, panggil operasi ini di OpenAPI Explorer. OpenAPI Explorer menghasilkan contoh kode secara dinamis untuk berbagai SDK.

Parameter permintaan

ParameterTypeRequiredExampleDescription
ActionStringYesModifyProtectionRuleStatusOperasi yang akan dilakukan. Tetapkan nilainya ke ModifyProtectionRuleStatus.
DefenseTypeStringYestamperproofModul proteksi. Nilai yang valid:
  • tamperproof: Website Tamper-proofing
  • bot_crawler: Allowed Crawlers
  • bot_intelligence: Bot Threat Intelligence
  • ac_custom: Custom Protection Policy
  • whitelist: Website Whitelist
DomainStringYeswww.example.comNama domain yang ditambahkan ke WAF.
InstanceIdStringYeswaf_elasticity-cn-0xldbqt****ID instans WAF. Untuk mendapatkan ID instans, panggil operasi DescribeInstanceInfo.
LockVersionLongYes2Versi aturan.
RuleIdLongYes42755ID aturan. Untuk mendapatkan ID aturan, panggil operasi DescribeProtectionModuleRules.
RuleStatusIntegerYes1Status aturan. Nilai yang valid:
  • 0: dinonaktifkan
  • 1: diaktifkan
RegionIdStringNoap-southeast-1Wilayah instans WAF. Nilai yang valid:
  • cn-hangzhou: Tiongkok daratan
  • ap-southeast-1: luar Tiongkok daratan
ResourceGroupIdStringNorg-atstuj3rtop****ID kelompok sumber daya instans WAF di Resource Management. Secara default menggunakan kelompok sumber daya default.

Elemen respons

ParameterTypeExampleDescription
RequestIdStringD7861F61-5B61-46CE-A47C-6B19160D5EB0ID permintaan.

Contoh

Contoh permintaan

http(s)://[Endpoint]/?Action=ModifyProtectionRuleStatus
&DefenseType=tamperproof
&Domain=www.example.com
&InstanceId=waf_elasticity-cn-0xldbqt****
&LockVersion=2
&RuleId=42755
&RuleStatus=1
&RegionId=ap-southeast-1
&ResourceGroupId=rg-atstuj3rtop****
&<Common request parameters>

Contoh respons sukses

XML format

<ModifyProtectionRuleStatusResponse>
    <RequestId>D7861F61-5B61-46CE-A47C-6B19160D5EB0</RequestId>
</ModifyProtectionRuleStatusResponse>

JSON format

{
    "RequestId": "D7861F61-5B61-46CE-A47C-6B19160D5EB0"
}

Kode kesalahan

Untuk daftar kode kesalahan, kunjungi API Error Center.