# Add WAF Region IP Blocking Rule - AddWafRegionBlockRule

## Overview

Add WAF Region IP Blocking Rule






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `AddWafRegionBlockRule`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.dezai.com/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **ProjectId** | string | Project ID. If not filled in, the default project is used, and the sub-account must be filled in. Please refer to the [GetProjectList interface](api/summary/get_project_list). |No|
| **FullDomain** | string | Domain Name |**Yes**|
| **Name** | string | Rule Name |**Yes**|
| **BlockRegion** | string | Blocking region code, format: Country code: Region list<br />Mainland areas support provincial and city-level subdivisions, others only support countries, e.g.:<br />CN:110000\|440300\|320000 represents blocking IPs from Beijing, Shenzhen, and Jiangsu province; <br />US represents blocking IPs from the United States. |**Yes**|
| **ActionType** | string | Match Action, Accept or Deny (default), Accept is temporarily not supported |**Yes**|
| **Description** | string | Note Information |No|

### Response Field

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **RetCode** | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. |**Yes**|
| **Action** | string | Operation command name. |**Yes**|
| **Message** | string | Returns an error message, providing detailed description when `RetCode` is non-zero. |No|
| **Id** | int | Block rule ID returned after successful addition |No|




## 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
    
```json
{
  "Action": "AddWafRegionBlockRuleResponse",
  "Id": 4,
  "RetCode": 0
}
```





