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
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
PrivateIpAddress | BODY | string | No | 192.XX.XX.4 | an 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. |
InstanceRegionId | BODY | string | No | cn-hangzhou | ID 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. |
InstanceId | BODY | string | Yes | i-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. |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
AllocationId | BODY | string | Yes | eip-2zeerraiwb7ujsxdc**** | the ID of the EIP that binds the cloud product instance. |
Mode | BODY | string | No | NAT | binding 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. |
RegionId | BODY | string | Yes | cn-qingdao-env17-d01 | the region ID to which the EIP to bind the cloud product instance belongs. |
InstanceType | BODY | string | No | EcsInstance | the 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. |
ClientToken | BODY | string | No | 02fb3da4-130e-11e9-8e44-001sdfg | Ensure 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. |
version | BODY | string | No | 2016-01-01 | version of api |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
RequestID | string | 1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC | Request id |
Example
Successful Response example
{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}