Direction
createLoadBalancerPolicy is used to create more than one set of load balancer setup.
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 |
|---|---|---|
| instanceId | Source VM Instance ID Type : String Default Value : No Whether it is plural : No |
Multiple values can be supported. |
| port | List of External Port number Type : Integer Default Value : No Whether it is plural : No |
|
|
loadBalancerPolicyName (Not a necessary parameter) |
Server Load Balancer Name Type : String Default Value : No Whether it is plural : No |
|
regionId |
Region Id Type : String Default Value : No Whether it is plural : No |
"region-tw-1": First Region |
CVPC Load Balancer Request Parameter
| Parameter | Directions | Note |
|---|---|---|
| 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) |
vpcBusinessServiceId |
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. |
| orderUuidList | List of Order Number Type :JSON value : array Whether it is plural : No |
string List |
Request Example
Example1 (CaaS load balancer):
https://hws.hicloud.hinet.net/cloud_hws/api/hws/?action=createLoadBalancerPolicy
&instanceId=BV550100010003
&instanceId=BV550100010004
&port=80
&port=81
&loadBalancerPolicyName=slbName
®ionId=${regionId}
&chtAuthType=hwspass
&version=${version}
&expires=${expires}
&accessKey=${accessKey}
&signature=${signature}
Example2 (CVPC basic load balancer):
https://hws.hicloud.hinet.net/cloud_hws/api/hws/?action=createLoadBalancerPolicy
&economyLoadBalancerVIPRouteDirection=0
&ipProtocolVersion=0
&ipSubnetBusinessServiceId=VQ55020001IOSQ
&loadBalancerType=0
&portsInfo=0;;53;;0;;;;0
&ripsInfo=10.27.1.1
&userAssignIp=210.61.223.21
&vpcBusinessServiceId=VV55020001IOSE
&chtAuthType=hwspass
&version=${version}
&accessKey=${accessKey}
&expires=${expires}
&signature=${signature}
Response Example
{
"requestId":"xxxEXAMPLE",
"orderUuidList": ["609b609d-9ed3-464a-ace8-f2573e6d1263"]
}