AssociateAddress

Last Updated At: 2026-08-02 00:06:17

1. Interface Description

Interface request domain name: vpc.api3.convergecloud.com.

This API (AssociateAddress) is used to bind EIPs to a specified private IP on an instance or ENI.

  • Binding an EIP to an instance (CVM) essentially indicates binding the EIP to the primary private IP of the primary network interface card on the instance.
  • Binding an EIP to the primary private IP of the primary network interface card will automatically unbind and release a normal public IP that was previously bound.
  • Binding an EIP to a specified network interface card's private IP (not the primary network interface card's primary private IP) requires unbinding the EIP first before binding it anew.
  • To bind an EIP to a NAT gateway, use the API [AssociateNatGatewayAddress](../NAT Gateway APIs/AssociateNatGatewayAddress).
  • An EIP that is overdue or blocked cannot be bound.
  • Only EIPs in the UNBIND state can be bound.

Default interface request rate limit: 10 times per second.

Interface update time: 2022-06-24 00:16:26.

The interface only verifies the signature but does not authenticate.

2. Input Parameters

The following list of request parameters only lists interface request parameters and some public parameters, For a complete list of public parameters see public request parameters.

Parameter name Required Allow NULL Type Description
Action Yes No String Public parameter, The value of this interface: AssociateAddress
Version Yes No String Public parameter, The value of this interface: 2017-03-12
Region No No String Public parameter,Regional information A list of supported geographies is available through the DescribeRegions interface
AddressId Yes No String The unique ID identifying the EIP, such as eip-jrkzpvgt.
Example: eip-ek0cdz1g
InstanceId No No String The ID of the instance to be bound. The instance ID is in the format ins-jrkzpvgt. You can retrieve it by logging in to the Console or through the InstanceId returned by the DescribeInstances API.
Example: ins-1bmpb9tu
NetworkInterfaceId No No String The ID of the ENI to be bound. The ENI ID is in the format eni-jrkzpvgt. The parameters NetworkInterfaceId and InstanceId cannot be specified simultaneously. You can query the ENI ID by logging in to the console or from the networkInterfaceId field in the response of the DescribeNetworkInterfaces API.
Example: eni-jyhoac61
PrivateIpAddress No No String Private IP to be bound. If NetworkInterfaceId is specified, PrivateIpAddress must also be specified, indicating that the EIP will be bound to the specified private IP of the ENI. Also, ensure that the specified PrivateIpAddress is a private IP on the given NetworkInterfaceId. The specified ENI's private IP can be queried by logging into the console, or obtained from the privateIpAddress returned by the DescribeNetworkInterfaces API.
Example: 10.0.0.120

3. Output Parameters

Parameter name Type Description
TaskId String Asynchronous task TaskId. The task status can be queried using the DescribeTaskResult API.
Example: 50121411
RequestId String Unique request id, Each request will return. The RequestId of the request needs to be provided when locating the problem.

4. Error Code

The following lists only the error codes related to the interface business logic, For other error codes, see public ErrorCode.

Error Code Description
InvalidInstanceId.NotFound Invalid instance ID. The specified instance ID does not exist.
InvalidAddressId.Blocked The designated EIP is in a blocked state. Binding operation cannot be performed while the EIP is blocked. Unbinding is required first.
InvalidAddressIdState.InArrears The specified EIP is in arrears state.
InvalidAddressId.Blocked The designated EIP is in a blocked state. Binding operation cannot be performed while the EIP is blocked. Unbinding is required first.
InvalidAddressId.NotFound The specified EIP does not exist.
InvalidAddressIdStatus.NotPermit The current status of the designated EIP does not allow for binding operation. Binding operation can only be performed when the EIP's status is UNBIND.
InvalidInstance.NotSupported The instance is not supported.
InvalidInstanceId.AlreadyBindEip The specified instance has already been bound with an EIP. The current EIP must be unbound before another binding operation can be performed.
InvalidNetworkInterfaceId.NotFound The specified NetworkInterfaceId does not exist or the specified PrivateIpAddress is not on the NetworkInterfaceId.
InvalidParameterConflict The specified two parameters conflict with each other and can not coexist. An EIP can only be bound to an instance or a specified private network IP of a designated network interface.
InvalidPrivateIpAddress.AlreadyBindEip The specified private IP of the specified ENI has already been bound to an EIP. It cannot be bound again.
MissingParameter Missing parameters. The request did not carry the required parameter.
MissingResourceId Missing bound entity. Either InstanceId, NetworkInterfaceId, or PrivateIpAddress must be specified.