Binding a Virtual IP Address to an ECS NIC (Discarded)
Function
A virtual IP address provides the second IP address for one or multiple ECS NICs, improving high availability between the ECSs.
This API is used to bind a virtual IP address to an ECS NIC.
- If the specified IP address is a virtual IP address that has not been assigned, the system automatically assigns the virtual IP address and binds it to a specified NIC.
- If the specified IP address is a virtual IP address that has been assigned, the system binds the virtual IP address to a specified NIC. If the device_owner of this IP address is left blank, only intra-VPC layer 2 and layer 3 communication is supported. If the device_owner of this IP address is neutron:VIP_PORT, intra-VPC layer 2 and layer 3 communication, inter-VPC peer access, as well as Internet access through EIP, VPN, and Cloud Connect are supported.
URI
PUT /v1/{project_id}/cloudservers/nics/{nic_id}
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. |
nic_id |
Yes |
Specifies the ECS NIC ID. |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
nic |
Yes |
Object |
Specifies the NIC parameters required for binding a virtual IP address. For details, see Table 3. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
subnet_id |
Yes |
String |
Specifies the information about the NICs to be added to an ECS. Set the parameter value to the ID (in UUID format) of the network created in the VPC to which the target ECS belongs. |
ip_address |
Yes |
String |
Specifies the virtual IP address to be bound to a NIC. |
reverse_binding |
No |
Boolean |
Specifies whether to add the NIC IP/MAC address pair to allowed_address_pairs.
NOTE:
The virtual IP address can be displayed on the NIC details page only after the IP/MAC address pair is added. |
Response
Example Request
PUT https://{endpoint}/v1/{project_id}/cloudservers/nics/{nic_id}
{ "nic": { "subnet_id": "d32019d3-bc6e-4319-9c1d-6722fc136a23", "ip_address": "192.168.0.7", "reverse_binding": true } }
Example Response
{ "port_id": "d32019d3-bc6e-4319-9c1d-6722fc136a23" }
Returned Values
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot