Modifies the status of a protection rule.
Operation description
Before calling this operation, make sure that you have created a protection rule by calling the CreateDefenseRule operation.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-waf:ModifyDefenseRuleStatus |
update |
*All Resource
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
Instance ID of the WAF instance. Note
You can call the DescribeInstance operation to query instance ID of the current WAF instance. |
waf_cdnsdf3**** |
| TemplateId |
integer |
No |
The ID of the protection rule template. |
7239 |
| RuleId |
integer |
Yes |
The ID of the protection rule that you want to modify. Note
You can call the DescribeDefenseRules operation to query the protection rule ID. You can create a protection rule by calling the CreateDefenseRule operation. |
20002615 |
| RuleStatus |
integer |
Yes |
The status that you want to set for the protection rule. Valid values:
|
1 |
| RegionId |
string |
No |
The region where the WAF instance is deployed. Valid values:
|
cn-hangzhou |
| ResourceManagerResourceGroupId |
string |
No |
The ID of the Alibaba Cloud resource group. |
rg-acfm***q |
| DefenseType |
string |
No |
The type of the protection rule. Valid values:
|
template |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
BB305BF3-3C71-57A9-9704-E22F567689B0 |
Examples
Success response
JSON format
{
"RequestId": "BB305BF3-3C71-57A9-9704-E22F567689B0"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.