Docs
api
Load Balance(ULB)
CreateLoadBalancer

Create Application Load Balancer Instance - CreateLoadBalancer

Overview

Create an Application Load Balancer instance

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is CreateLoadBalancer.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
VPCIdstringThe Resource ID of the VPC to which the Load Balancer instance belongsYes
SubnetIdstringThe resource ID of the subnet to which the load balancer instance belongs.
The internal VIP of the load balancer instance and the source IP of the SNAT scenario are limited to this subnet;
Specifying a subnet does not affect the scope when adding backend service nodes, it is still the resources supported under the entire VPC.
Yes
TypestringThe type of load balancing instance. Limited enumeration values: "Application" / "Network", default value: "Application".No
NamestringName of the load balancing instance. Default value: lb; Special characters supported: "-", "_", "."; Character length limit: [1-255]No
TagstringThe ID of the business group to which the load balancing instance belongs. The default value is 'Default'; if nothing is passed, it will be the Default business group.No
RemarkstringRemarks for the load balancing instance. Character length limit: [0-255]No
IPVersionstringIP protocol of the Load Balancer instance. Limited enumeration values: "IPv4" / "IPv6"/"DualStack", the default value is: "IPv4".No
ChargeTypestringPayment mode. Limited enumeration values: "Year" / "Month"/"Day"/"Dynamic", the default value is: "Month".No
QuantityintThe duration of purchase, default: 1; 0-> Purchase until the end of the month (0 is only valid for monthly payment, other payment modes pass 0, actual charges are calculated according to one cycle).No
CouponIdstringVoucher CodeNo

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
LoadBalancerIdstringID of the Load Balancing InstanceNo

Example

Request Example

https://api.ucloud-global.com/?Action=CreateLoadBalancer
&Region=cn-bj2
&ProjectId=org-XXXXX
&VPCId=vnet-XXXXX
&SubnetId=subnet-XXXXX
&Type=Application
&Name=lb
&Tag=Default
&Remark=iKgxzEnT
&IPVersion=IPv4
&ChargeType=Month
&CouponId=KAxnpXFB
&Quantity=3

Response Example

{
  "Action": "CreateLoadBalancerResponse",
  "LoadBalancerId": "alb-XXXXX",
  "RetCode": 0
}