Batch updates rules in a specified WAF ruleset. You can use this operation to update the configurations of multiple rules at a time.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
esa:BatchUpdateWafRules |
update |
*Site
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| SiteId |
integer |
Yes |
The site ID. You can call the ListSites operation to obtain the site ID. |
1 |
| SiteVersion |
integer |
No |
The version number of the site configuration. For sites with version management enabled, you can use this parameter to specify the site version on which the configuration takes effect. The default value is 0. |
0 |
| Phase |
string |
No |
The WAF rule execution phase. This batch operation supports only the following two phases. For other phases, use the single-rule operation
Note
Note: The Required constraint: Although this parameter is marked as optional (required: false) in the specification, it is required when you call this batch operation. The server cannot determine the target ruleset without the Phase parameter and returns |
http_anti_scan |
| RulesetId |
integer |
No |
The ID of the WAF ruleset. You can call the ListWafRulesets operation to obtain the ruleset ID. |
10000001 |
| Shared | WafBatchRuleShared |
No |
The shared configuration for multiple rules. Specifies the common properties shared across multiple rules. Conditionally required: Although this parameter is marked as optional (required: false) in the specification, it is required when Subfield requirements: When the phase is |
|
| Configs |
array |
No |
The list of rule configurations. Specifies the detailed configuration for each rule. Required subfields for each phase (applicable only to the two phases supported by this batch operation):
Note
Note: Other phases such as Note
Important: If |
10000001 |
| WafRuleConfig |
No |
The rule configuration. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
36af3fcc-43d0-441c-86b1-428951dc8225 |
Examples
Success response
JSON format
{
"RequestId": "36af3fcc-43d0-441c-86b1-428951dc8225"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | The specified parameter is invalid. | The specified parameter is invalid. |
| 400 | InternalException | Failed to call the service. Try again later or contact technical support. | Failed to call the service. Try again later or contact technical support. |
| 400 | SpecifiedVersionReadOnly | The specified version number is read-only and cannot be modified. | The specified version number is read-only and cannot be modified. |
| 403 | %s.NotSupport | The specified resource type %s is not supported. | The specified resource type is not supported. To use this type of resource, please contact us. |
| 403 | %s.OverQuota | The quantity of %s exceeds the quota. | The amount of this resource exceeds the quota. If you need to apply for more quota, please contact us. |
| 403 | %s.WrongValueMatched | The value of specified parameter %s can not pass the matching check. | The value of the specified parameter can not pass the matching check. If you determine that you need to use this parameter value, please contact us. |
| 403 | Rule.Config.Malformed | The format of the rule configuration is invalid.Check the configuration for syntax errors or structural inconsistencies and correct them to meet the requirements. | The format of the rule configuration is invalid.Check the configuration for syntax errors or structural inconsistencies and correct them to meet the requirements. |
| 403 | Rule.Config.Noncompliance | The specified rule configuration does not meet the compliance requirements.Check and adjust your configurations. | The specified rule configuration does not meet the compliance requirements.Check and adjust your configurations. |
| 403 | Ruleset.Name.AlreadyExists | The specified rule set name already exists.Try again with a unique name or modify the existing rule set name. | The specified rule set name already exists.Try again with a unique name or modify the existing rule set name. |
| 403 | Site.NotExist | The specified website does not exist or is not recognized by the system.Check whether the specified website identifier is valid and matches a website that is active, defined, and recognized by the system.If you want to add a new website, make sure that the creation and registration process is complete to integrate the website to the system. | The specified website does not exist or is not recognized by the system.Check whether the specified website identifier is valid and matches a website that is active, defined, and recognized by the system.If you want to add a new website, make sure that the creation and registration process is complete to integrate the website to the system. |
| 403 | Ruleset.NotExist | The specified rule set does not exist or has not been registered in the system.Check whether the specified rule set identifier is valid and matches a rule set that has been correctly defined and maintained by the system's rule set registry.If you want to add a new rule set, make sure that the creation and registration process is complete to bring the rule set into effect. | The specified rule set does not exist or has not been registered in the system.Check whether the specified rule set identifier is valid and matches a rule set that has been correctly defined and maintained by the system's rule set registry.If you want to add a new rule set, make sure that the creation and registration process is complete to bring the rule set into effect. |
| 403 | Expression.Invalid | The specified expression is invalid: %s. | The specified expression is invalid. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.