# Update Traditional Load Balancer VServer Properties - UpdateVServerAttribute

## Overview

Update Traditional Load Balancer VServer Instance Properties



 > ℹ️ VServerId corresponds to the VServerId returned by CreateVServer, or the VServerId in ULBVServerSet returned by DescribeVServer / DescribeULB<br /><br />Parameters that are not passed will not be modified.


## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `UpdateVServerAttribute`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.scloudsg.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 |
|:---|:---|:---|:---|
| **Region** | string | Region. See [List of Regions and Availability Zones](/docs/api/summary/regionlist) |**Yes**|
| **ProjectId** | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the [GetProjectList interface](/docs/api/summary/get_project_list). |**Yes**|
| **ULBId** | string | Traditional Load Balancer Instance ID |**Yes**|
| **VServerId** | string | Traditional Load Balancing VServer Instance ID |**Yes**|
| **VServerName** | string | VServer instance name, if this field is not present, no modifications will be made |No|
| **Method** | string | VServer load balancing mode, enumeration values: Roundrobin -> Round Robin; Source -> Source Address; ConsistentHash -> Consistent Hashing; SourcePort -> Source Address (Compute Port); ConsistentHashPort -> Consistent Hashing (Compute Port); WeightRoundrobin -> Weighted Round Robin; Leastconn -> Least Connections; Backup -> Master-Slave Mode.<br />ConsistentHash, SourcePort, ConsistentHashPort are only used in packet forwarding; Leastconn is only used in request proxy; Roundrobin, Source and WeightRoundrobin, Backup are used in both request proxy and packet forwarding.<br />Default is: "Roundrobin". |No|
| **PersistenceType** | string | VServer session persistence mode, if this field is not present, no modification is made. Enumerated values: None: off; ServerInsert: auto-generated KEY; UserDefined: user-defined KEY. |No|
| **PersistenceInfo** | string | Determined by PersistenceType: None or ServerInsert, this field is meaningless; UserDefined, then this field passes in the user-defined session maintenance String. If this field is not present, no modification is made. |No|
| **ClientTimeout** | int | The request proxy's VServer represents the recovery time of idle connections, unit: seconds, value range: hour (0,86400], default value is 60; The message forwarding's VServer represents the time to keep the session, unit: seconds, value range: [60,900], 0 means disabling connection maintenance. |No|
| **MonitorType** | string | Health check type, enumeration values: Port -> Port check; Path -> Path check; Ping -> Ping probe, Customize -> UDP check<br /><br />The default value for request proxy type is Port, where TCP protocol only supports Port, other protocols support Port and Path;<br />The message forwarding type TCP protocol only supports Port, UDP protocol supports Ping, Port and Customize, the default value is Ping. |No|
| **Domain** | string | Specifies the domain in the HTTP HEADER when sending a health check request when MonitorType is Path. |No|
| **Path** | string | When MonitorType is Path, it specifies the path when sending a health check request, the default is / |No|
| **RequestMsg** | string | Confirm according to MonitorType; When MonitorType is Customize, this field is meaningful, representing the request message sent by UDP check. |No|
| **ResponseMsg** | string | Confirm according to MonitorType; When MonitorType is Customize, this field is meaningful, representing the response message that the UDP check request should receive. |No|
| **SecurityPolicyId** | string | Security Policy Group ID |No|
| **EnableCompression** | int | 0: Off 1: On, used for data compression function |No|
| **ForwardPort** | int | Redirect port, value range [0-65535]; the default value is 0, representing closure; only the HTTP protocol supports the opening of the redirect function. |No|
| **EnableHTTP2** | int | 0: Off 1: On, used to enable the http2 feature; the default value is 0 |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|




## Example

### Request Example
    
```
https://api.scloudsg.com/?Action=UpdateVServerAttribute
&Region=cn-bj2
&ProjectId=project-XXXXX
&ULBId=ulb-XXXX
&VServerId=vserver-XXXX
&VServerName=Testapi
&Protocol=HTTP 
&Method=Roundrobin
&PersistenceType=None
&PersistenceInfo=None
&ClientTimeout=60
&MonitorType=Port
&RequestMsg=QHpxxRrA
&ResponseMsg=rVBUBWIh
&SecurityPolicyId=cbupUwHT
&EnableCompression=1
&ForwardPort=4
&EnableHTTP2=1
```

### Response Example
    
```json
{
  "Action": "UpdateVServerAttributeResponse",
  "RetCode": 0
}
```





