Direction
replaceLoadBalancerPolicy is used for the setup of load balance change.
The parameters' description of CaaS load balancer and CVPC load balancer are shown below.
Attention:CVPC load balancer API only support basic load balancer, premium load balancer will be included recently.
CaaS load balancer Request Parameter
Parameter | Directions | Note |
---|---|---|
loadBalancerId | Server Load Balancer ID Type : String Default Value : No Whether it is plural : No |
|
instanceId | VM Instance ID Type : String Default Value : No Whether it is plural : No |
|
port | List of External Port number Type : Integer Default Value : No Whether it is plural : No |
CVPC Load Balancer Request Parameter
Parameter | Directions | Note |
---|---|---|
loadBalancerId | Business Service Id of Load Balancer Type : String Default Value : No Whether it is plural : No |
|
economyLoadBalancerVIPRouteDirection | IP Routing Direction Type : String Default Value : No Whether it is plural : No |
0: Outside 1: Intranet |
ipProtocolVersion | IP Version Type : String Default Value : 0 Whether it is plural : No |
0: IPv4 1: IPv6 |
ipSubnetBusinessServiceId | Business Service Id of Subnet Type : String Default Value : No Whether it is plural : No |
|
loadBalancerType |
Server Load Balancer Type Type : String Default Value : No Whether it is plural : No |
0: Basic Load Balancer 1: Premium Load Balancer |
portsInfo |
Port Configuration Type : String Default Value : No Whether it is plural : Yes |
Multiple values can be supported Configuration Format of Basic Load Balancer : Protocol;;Port;;SLB Policy;;;;Health Check Policy Protocol : 0: TCP 1: UDP SLB Policy: 0: Least Session 1: Round Robin 2: Ratio Health Check Policy: 0: TCP + port 1: TCP + ICMP |
ripsInfo |
rip address Type : String Default Value : No Whether it is plural : Yes |
Multiple values can be supported IP format |
realServerWeight (not a necessary parameter) |
SLB weight Type : String Default Value : No Whether it is plural : Yes |
Necessary Parameter for SLB policy is "Ratio" in portsInfo format:IP address;;weight IP address: VM IP weight: The larger weight is, the more connections would be directed to server. The minimum value is 0 |
userAssignIp |
VIP address Type : String Default Value : No Whether it is plural : No |
if routing direction is OutSide, choose one public IP (subscribe "Outside Link" first) if routing direction is Intranet, choose one IP between 201-250 in selected subnet (subscribe "Intranet Link" first) |
vpcBsid |
Business Service Id of CVPC Type : String Default Value : No Whether it is plural : No |
Response Parameter
Parameter | Directions | Note |
---|---|---|
requestId
(Not a necessary parameter) |
Request ID Type : JSON value : string Whether it is plural : No |
Automatically produced by the system |
result | Whether it is successful or not Type : JSON value : true/false Whether it is plural : No |
For Example: { "result": true } |
Request Example
Example1 CaaS load balancer: https://hws.hicloud.hinet.net/cloud_hws/api/hws/?action=replaceLoadBalancerPolicy &loadBalancerId=BL550100010003 &instanceId=BV550100010004 &instanceId=BV550100010005 &port=83 &port=84 &chtAuthType=hwspass &version=${version} &expires=${expires} &accessKey=${accessKey} &signature=${signature} Example2 CVPC load balancer: https://hws.hicloud.hinet.net/cloud_hws/api/hws/?action=replaceLoadBalancerPolicy &loadBalancerId=VL55020001IOSR &economyLoadBalancerVIPRouteDirection=0 &ipProtocolVersion=0 &ipSubnetBusinessServiceId=VQ55020001IOSQ &loadBalancerType=0 &portsInfo=0;;35;;0;;;;0 &ripsInfo=10.27.1.1 &userAssignIp=210.61.223.21 &chtAuthType=hwspass &version=${version} &expires=${expires} &accessKey=${accessKey} &signature=${signature}
Response Example
{ "requestId":"xxxEXAMPLE", "result": true }