Docs
api
Web Application Firewall(UEWAF)
AddWafRegionBlockRule

Add WAF Region IP Blocking Rule - AddWafRegionBlockRule

Overview

Add WAF Region IP Blocking Rule

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is AddWafRegionBlockRule.Yes
PublicKeystringThe user’s public key can be obtained from ConsoleYes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
ProjectIdstringProject ID. If not filled in, the default project is used, and the sub-account must be filled in. Please refer to the GetProjectList interface.No
FullDomainstringDomain NameYes
NamestringRule NameYes
BlockRegionstringBlocking region code, format: Country code: Region list
Mainland areas support provincial and city-level subdivisions, others only support countries, e.g.:
CN:110000|440300|320000 represents blocking IPs from Beijing, Shenzhen, and Jiangsu province;
US represents blocking IPs from the United States.
Yes
ActionTypestringMatch Action, Accept or Deny (default), Accept is temporarily not supportedYes
DescriptionstringNote InformationNo

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
IdintBlock rule ID returned after successful additionNo

Example

Request Example

https://api.dezai.com/?Action=AddWafRegionBlockRule
&ProjectId=org-xxx
&FullDomain=www.test.com
&Name=test
&BlockRegion=CN
&ActionType=Deny
&Description=aaa

Response Example

{
  "Action": "AddWafRegionBlockRuleResponse",
  "Id": 4,
  "RetCode": 0
}