Domain name for API request: waf.tencentcloudapi.com.
This API is used to edit a custom rule.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Action | Yes | String | Common Params. The value used for this API: ModifyCustomRule. |
Version | Yes | String | Common Params. The value used for this API: 2018-01-25. |
Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-guangzhou, ap-seoul. |
Domain | Yes | String | Edited domain |
RuleId | Yes | Integer | Edited rule ID |
RuleName | Yes | String | Edited rule name |
RuleAction | Yes | String | Executed actions: 0-allow, 1-block, 2-CAPTCHA, 3-observe, 4-redirect |
Strategies.N | Yes | Array of Strategy | Matching condition array |
Edition | No | String | Version of WAF. clb-waf indicates CLB WAF; sparta-waf indicates SaaS WAF. sparta-waf by default. |
Redirect | No | String | Redirected URL when action is set to redirect, / by default |
Bypass | No | String | Whether to continue executing other check logic upon allowing. geoip: continue region blocking protection; cc: continue CC policy protection; owasp: continue web application protection; ai: continue AI engine protection; antileakage: continue information leakage prevention. If multiple values are entered, separate them with commas (,). The default value is "geoip,cc,owasp,ai,antileakage". |
SortId | No | Integer | Priority, an integer from 1 to 100. The smaller the number, the higher the execution priority of this rule. The default value is 100. |
ExpireTime | No | Integer | Rule expiration deadline: 0 - permanently effective; other values correspond to the timestamp of the specified time. The default value is 0. |
JobType | No | String | Scheduled task type |
JobDateTime | No | JobDateTime | Scheduled task configuration |
Source | No | String | Rule source. This parameter checks whether the rule source is mini program. |
Status | No | Integer | Enabling status. Pass the value for rules of mini program risk control. |
PageId | No | String | ID of the blocked page |
Parameter Name | Type | Description |
---|---|---|
Success | ResponseCode | Operation status code: if all resource operations succeed, the success status code is returned; if any resource operation fails, the content of Message needs to be parsed to see which resource failed. |
RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
https://waf.tencentcloudapi.com/?Action=ModifyCustomRule
&Edition=clb-waf
&Domain=hfut.qcloud.com
&RuleId=17958569
&RuleName=test
&RuleAction=1
&Redirect=/
&Bypass=geoip,cc,owasp,ai,antileakage
&SortId=100
&ExpireTime=0
&Strategies.0.Field=IP
&Strategies.0.CompareFunc=ipmatch
&Strategies.0.Content=1.1.1.2
&Strategies.0.Arg=""
&<Common request parameters>
{
"Response": {
"RequestId": "a713f4cf-51ef-437f-8467-d4fdec061b78",
"Success": {
"Code": "Success",
"Message": "Success"
}
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
FailedOperation | Operation failed. |
InternalError | Internal error. |
InternalError.DBErr | DBErr |
InvalidParameter | Parameter error. |
InvalidParameterValue | Invalid parameter value. |
LimitExceeded | The quota limit is exceeded. |
MissingParameter | Parameters are missing |
ResourceInUse | Resources are occupied. |
ResourceInsufficient | Insufficient resources. |
ResourceNotFound | Resources do not exist. |
ResourceUnavailable | Resources are unavailable. |
ResourcesSoldOut | Resources are sold out. |
UnauthorizedOperation | Unauthorized operation. |
UnknownParameter | Unknown parameter. |
UnsupportedOperation | The operation is not supported. |
本页内容是否解决了您的问题?