Docs
api
Load Balance(ULB)
UpdateVServerAttribute

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

Parameters that are not passed will not be modified.

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is UpdateVServerAttribute.Yes
PublicKeystringThe user's public key can be obtained from Console (opens in a new tab)Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See List of Regions and Availability ZonesYes
ProjectIdstringProject ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface.Yes
ULBIdstringTraditional Load Balancer Instance IDYes
VServerIdstringTraditional Load Balancing VServer Instance IDYes
VServerNamestringVServer instance name, if this field is not present, no modifications will be madeNo
MethodstringVServer 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.
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.
Default is: "Roundrobin".
No
PersistenceTypestringVServer 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
PersistenceInfostringDetermined 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
ClientTimeoutintThe 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
MonitorTypestringHealth check type, enumeration values: Port -> Port check; Path -> Path check; Ping -> Ping probe, Customize -> UDP check

The default value for request proxy type is Port, where TCP protocol only supports Port, other protocols support Port and Path;
The message forwarding type TCP protocol only supports Port, UDP protocol supports Ping, Port and Customize, the default value is Ping.
No
DomainstringSpecifies the domain in the HTTP HEADER when sending a health check request when MonitorType is Path.No
PathstringWhen MonitorType is Path, it specifies the path when sending a health check request, the default is /No
RequestMsgstringConfirm according to MonitorType; When MonitorType is Customize, this field is meaningful, representing the request message sent by UDP check.No
ResponseMsgstringConfirm according to MonitorType; When MonitorType is Customize, this field is meaningful, representing the response message that the UDP check request should receive.No
SecurityPolicyIdstringSecurity Policy Group IDNo
EnableCompressionint0: Off 1: On, used for data compression functionNo
ForwardPortintRedirect port, value range [0-65535]; the default value is 0, representing closure; only the HTTP protocol supports the opening of the redirect function.No
EnableHTTP2int0: Off 1: On, used to enable the http2 feature; the default value is 0No

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

Example

Request Example

https://api.ucloud-global.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

{
  "Action": "UpdateVServerAttributeResponse",
  "RetCode": 0
}