Create Application Load Balancer Instance - CreateLoadBalancer
Overview
Create an Application Load Balancer instance
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is CreateLoadBalancer . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region. See List of Regions and Availability Zones | 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. | Yes |
VPCId | string | The Resource ID of the VPC to which the Load Balancer instance belongs | Yes |
SubnetId | string | The 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 |
Type | string | The type of load balancing instance. Limited enumeration values: "Application" / "Network", default value: "Application". | No |
Name | string | Name of the load balancing instance. Default value: lb; Special characters supported: "-", "_", "."; Character length limit: [1-255] | No |
Tag | string | The 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 |
Remark | string | Remarks for the load balancing instance. Character length limit: [0-255] | No |
IPVersion | string | IP protocol of the Load Balancer instance. Limited enumeration values: "IPv4" / "IPv6"/"DualStack", the default value is: "IPv4". | No |
ChargeType | string | Payment mode. Limited enumeration values: "Year" / "Month"/"Day"/"Dynamic", the default value is: "Month". | No |
Quantity | int | The 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 |
CouponId | string | Voucher Code | 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 |
LoadBalancerId | string | ID of the Load Balancing Instance | No |
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
}