# Modify BGP Rules - UpdateBGPServiceFwdRule

## Overview

Used to modify BGP high defense rule information






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `UpdateBGPServiceFwdRule`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.zosoc.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 |
|:---|:---|:---|:---|
| **ResourceId** | string | Resource ID |**Yes**|
| **BgpIP** | string | BGP's IP |**Yes**|
| **RuleIndex** | int | Index of the rule to be modified |**Yes**|
| **RuleID** | string | Rule uuid |**Yes**|
| **SourceAddrArr.N** | string | Back-to-source address, can be filled with IP address or domain name |No|
| **SourcePortArr.N** | string | Origin Port |No|
| **SourceToaIDArr.N** | string | UTOA |No|
| **LoadBalance** | string | Whether the type of forwarding protocol is load balancing: Default is "No", you can also choose "Yes". Up to 2 rules can be added for load balancing mode, and up to 8 rules can be added for non-load balancing mode. |No|
| **FwdType** | string | The types of forwarding protocols include three: the default is "IP", you can also choose "TCP" or "UDP"."""<br /> |No|
| **BgpIPPort** | int | Default is 0, which is the forwarding port for the IP protocol, the rest are custom. |No|
| **SourceDetect** | int | Indicates the detection of the source station: The default is 0 which means it's closed, you can also choose 1 to turn it on. |No|
| **BackupIP** | string | Backup source station's IP |No|
| **BackupPort** | int | Backup source site port |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|
| **RuleIndex** | int | Database Index of Forwarding Rules |No|




## Example

### Request Example
    
```
https://api.zosoc.com/?Action=UpdateBGPServiceFwdRule
&ResourceId="20b56aca-81b1-497d-86e8-aa7d02d67289"
&BgpIP="10.5.12.3"
&RuleID="djnfiw-jf9iwenfkd-37ndj"
&LoadBalance="Yes"
&FwdType="IP"
&BgpIPPort=80
&SourceDetect=1
&BackupIP="10.5.12.6"
&BackupPort=80
&BackupToa=200
&RuleID=wipOcbWY
&RuleIndex=6
&SourceAddrArr.0=1.1.1.1
&SourcePortArr.0=0
&SourceToaIDArr.0=200
```

### Response Example
    
```json
{
  "Action": "UpdateBGPServiceFwdRuleResponse",
  "RetCode": 0,
  "RuleID": "qrJtPewi-7j9dfkjd-fdjj9"
}
```





