AddLoadBalancersPrivateIps
1. API Description
This API is used to add private IPs to a load balancer.
2. Input Parameters
The following request parameter list only provides API request parameters.
privateIps
Yes
Array of String
The private IPs to be added.
You can add up to 20 private IPs at a time.
loadBalancerId
Yes
String
Load balancer ID.
3. Output Parameters
requestId
String
The unique request ID, which is returned for each request. RequestId is required to locate a problem.
4. Code Example
Add private IPs to a load balancer.
POST /api/v2/zec HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: AddLoadBalancersPrivateIps
<Common Request Params>
Request:
{
"privateIps": [
"10.0.0.0"
],
"loadBalancerId": "<your lb id>",
"subnetId": "<your subnet id>"
}
Response:
{
"requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
"response": {
"requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3"
}
}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_LB_NOT_FOUND
Load balancer 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.
400
OPERATION_DENIED_INSTANCE_STATUS_NOT_SUPPORT
Operation is not supported for current instance state.
400
OPERATION_DENIED_INSTANCE_SUBNET_REGION_NOT_SAME
Regions of the subnet and the load balancer are not the same.
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.
Last updated