CreateLoadBalancer
1. API Description
This API is used to create a load balancer instance.
2. Input Parameters
The following request parameter list only provides API request parameters.
regionId
Yes
String
Region ID.
vpcId
Yes
String
VPC ID to which the load balance backend server belongs.
loadBalancerName
Yes
String
Load balance instance name.
Containing 1 to 64 characters.
Available range: [1.0, +).
bandwidthMbps
Yes
Integer
Maximum outbound bandwidth of the elastic IP.
Unit: Mbps.
The maximum limit is usually 10000 Mbps. If you have additional requirements, please contact Support.
Available range: [1, +).
trafficPackageSize
No
Float
Data transfer package size.
The parameter is only required when internetChargeType is ByTrafficPackage.
Available range: [0.0, 999999.0].
bandwidthClusterId
No
String
ID of bandwidth cluster.
The parameter is only required when internetChargeType is BandwidthCluster.
resourceGroupId
No
String
Resource Group ID
If not specified, the load balance instance will belong to the default resource group.
number
No
Integer
The number of created load balancers.
Default value: 1.
subnetId
No
String
ID of the subnet where the health check private source IP belong.
You can call DescribeSubnets to obtain details.
healthCheckPrivateIps
No
Array of String
Health probe private IP.
When subnetId is specified, this parameter is required with a quantity of 2.
If subnetId is not specified, this parameter is invalid. When this value is left empty, IP addresses will be allocated automatically.
3. Output Parameters
requestId
String
The unique request ID, which is returned for each request. RequestId is required to locate a problem.
orderNumber
String
Order number.
loadBalancerIds
Array of String
A collection of unique IDs of the load balancers.
4. Code Example
Create a public network load balancer. IP billing method is flat rate.
5. Developer Resources
Zenlayer Cloud API 2.0 SDKs to make it easier for you to call APIs. More programming languages will be supported.
6. Error Codes
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
400
INVALID_IP_BROADCAST_ADDRESS
Invalid IP address: broadcast addresses are not allowed.
400
INVALID_IP_FIRST_ADDRESS
Invalid IP address: gateway addresses are not allowed.
400
INVALID_IP_NETWORK_ADDRESS
Invalid IP address: network addresses are not allowed.
400
INVALID_IP_OUT_OF_RANGE
Invalid IP address: not within the CIDR range.
404
INVALID_REGION_NOT_FOUND
Specified region does not exist.
404
INVALID_SECURITY_GROUP_NOT_FOUND
Security group does not exist.
400
INVALID_SUBNET_NOT_BELONG_TO_VPC
Specified subnet is not within the global VPC.
404
INVALID_SUBNET_NOT_FOUND
Subnet does not exist.
409
INVALID_SUBNET_PRIVATE_IPV4_IN_USED
Preset private IP is already be used.
404
INVALID_VPC_NOT_FOUND
Global VPC does not exist.
400
OPERATION_DENIED_EIP_INSUFFICIENT
Insufficient elastic IP addresses. Operation failed.
400
OPERATION_DENIED_EIP_QUOTA_LIMIT_EXCEEDED
The number of elastic IP addresses exceeds limit.
400
OPERATION_DENIED_SUBNET_TYPE_NOT_SUPPORT
Subnet stack type is not supported.
400
OPERATION_DENIED_SUBNET_TYPE_NOT_SUPPORT_IPV4
IPv4 subnet stack type is not supported.
409
OPERATION_DENIED_NO_AVAILABLE_SUBNET
No valid subnet exists under the global VPC. Operation failed.
Last updated