You can call this operation to select a default rule group or customize a rule group used by the RegEx protection engine for specified domains. The system provides three default rule groups.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Domains | String | Yes | ["1.example.com","2.example.com"] |
The domains that have been added to WAF. Note You can specify multiple domain names.
|
InstanceId | String | Yes | waf_elasticity-cn-0xldbqtm005 |
The ID of the WAF instance. Note You can call the DescribeInstanceInfo operation to query the ID of a WAF instance.
|
RuleGroupId | Long | Yes | 1012 |
The ID of the protection rule group. The system provides the following default rule groups:
Note You can also enter the ID of a custom rule group. The ID is displayed on the Customize
Rule Groups page in the WAF console.
|
WafVersion | Long | No | 1 |
The system data identifier that is used to control optimistic locking. |
ResourceGroupId | String | No | rg-atstuj3rtoptyui |
The ID of the resource group to which the queried domains belong in Resource Management. By default, no value is specified, indicating that the domains belong to the default resource group. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | D7861F61-5B61-46CE-A47C-6B19160D5EB0 |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=SetDomainRuleGroup
&Domains=www.example.com
&InstanceId=waf_elasticity-cn-0xldbqtm005
&RuleGroupId=1012
&<Common request parameters>
Sample success responses
XML
format
<RequestId>D7861F61-5B61-46CE-A47C-6B19160D5EB0</RequestId>
JSON
format
{
"RequestId":"D7861F61-5B61-46CE-A47C-6B19160D5EB0"
}
Error codes
For a list of error codes, visit the API Error Center.