AssociateEipAddress
1. API Description
This API (AssociateEipAddress) is used to associate elastic IPs to resources in the same region.
Note
You can call DescribeLoadBalancers to query supported load balancers.
You can call DescribeNetworkInterfaces to query supported vNIC.
You can call DescribeNatGateways to query supported NAT gateway.
You must specify exactly one of the following parameters:
loadBalancerId,nicId, ornatId, in order of priority:loadBalancerId>nicId>natId.If the upper limit is exceeded, please contact us to request a quota increase.
The API returns the elastic IP IDs that failed to operate. An empty list indicates all operations succeeded.
2. Input Parameters
The following request parameter list only provides API request parameters.
eipIds
Yes
Array of String
ID list of elastic IPs.
loadBalancerId
No
String
Load balancer ID.
nicId
No
String
vNIC ID.
lanIp
No
String
Private IP.
If nicId is provided, this field is required.
natId
No
String
NAT gateway ID.
bindType
No
Elastic IP mode.
Default value: FullNat .
Effective when the elastic IP is assigned to a vNIC.
Default value: FullNat
3. Output Parameters
requestId
String
The unique request ID, which is returned for each request.
RequestId is required for locating a problem.
failedEipIds
Array of String
Elastic IP IDs that failed to bind.
4. Code Example
Associate elastic IPs to a specified vNIC with the Cut-through Mode.
5. Developer Resources
Zenlayer Cloud API 2.0 integrates 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.
404
INVALID_LB_NOT_FOUND
Load balancer does not exist.
400
INVALID_LB_STATUS
State of load balancer is not supported.
400
INVALID_REGION_MISMATCH
Region mismatch.
400
OPERATION_DENIED_EIP_ASSIGNED_LIMIT_EXCEEDED
Elastic IP binding exceeds the allowed limit.
Last updated