Skip to main content

AssociateEipAddress

Description

Call the AssociateEipAddress interface to bind the EIP(Elastic IP Address) to a cloud product instance in the same region.

Request Method

POST

Request Path

/apsara/route/Vpc/AssociateEipAddress

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
PrivateIpAddressBODYstringNo192.XX.XX.4an IP address in the switch network segment. /p> p data-tag = "p" class = "p"> if this parameter is not entered, the system automatically assigns 1 private IP address according to VPC ID and switch ID.
InstanceRegionIdBODYstringNocn-hangzhouID of the region to which the EIP is bound. Note This parameter is required only after EIP is added to a bandwidth sharing global acceleration instance.
InstanceIdBODYstringYesi-2zebb08phyczzawe****the instance ID to bind EIP. supports entering NAT gateway instance ID, load balancing SLB instance ID, cloud server ECS instance ID, secondary elastic network card instance ID, and highly available virtual IP instance ID.
regionIdBODYstringYesNo sample value for this parameter.region id
AllocationIdBODYstringYeseip-2zeerraiwb7ujsxdc****the ID of the EIP that binds the cloud product instance.
ModeBODYstringNoNATbinding mode, value: NAT:NAT mode (normal mode). MULTI_BINDED: multiple EIP network card visible mode. BINDED:EIP network card visible mode. description this parameter does not support incoming BINDED. if you need to set it, please go to the console to set the EIP NIC visible mode. only InstanceType configured as NetworkInterface, to configure this parameter.
RegionIdBODYstringYescn-qingdao-env17-d01the region ID to which the EIP to bind the cloud product instance belongs.
InstanceTypeBODYstringNoEcsInstancethe type of instance to bind EIP, value: Nat:NAT gateway. SlbInstance: load balancing SLB. EcsInstance: cloud server ECS. NetworkInterface: auxiliary flexible network card. HaVip: highly available virtual IP.
ClientTokenBODYstringNo02fb3da4-130e-11e9-8e44-001sdfgEnsure request idempotence. Generate a parameter value from your client to ensure that the parameter value is unique between different requests. ClientToken only supports ASCII characters and cannot exceed 64 characters.
versionBODYstringNo2016-01-01version of api

Return data

NameTypeSample valueDescription
RequestIDstring1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DCRequest id

Example

Successful Response example

{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}