Help Center/ Elastic Cloud Server/ API Reference/ Out-of-Date APIs/ NIC Management/ Unbinding a Virtual IP Address from an ECS NIC (Discarded)
Updated on 2022-09-23 GMT+08:00

Unbinding a Virtual IP Address from 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 unbind a virtual IP address from an ECS NIC. After the NIC is unbound, it is not deleted. For details about how to delete an ECS NIC, see Deleting NICs from an ECS in a Batch.

URI

PUT /v1/{project_id}/cloudservers/nics/{nic_id}

Table 1 lists the parameters.
Table 1 Parameter description

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

Table 2 describes the request parameter.
Table 2 Request parameter

Parameter

Mandatory

Type

Description

nic

Yes

Object

Specifies the NIC parameters required for unbinding a virtual IP address. For details, see Table 3.

Table 3 nic field description

Parameter

Mandatory

Type

Description

subnet_id

Yes

String

Specifies the information about the NICs to be added to an ECS.

This parameter must be left blank when you unbind the virtual IP address from an ECS NIC.

ip_address

Yes

String

Specifies the virtual IP address to be unbound from a NIC.

This parameter must be left blank when you unbind the virtual IP address from an ECS NIC.

reverse_binding

No

Boolean

Specifies whether to add the NIC IP/MAC address pair to allowed_address_pairs.

Response

Table 4 describes the response parameter.
Table 4 Response parameter

Parameter

Type

Description

port_id

String

Specifies the ECS NIC ID.

Example Request

PUT https://{endpoint}/v1/{project_id}/cloudservers/nics/{nic_id}
{
    "nic": { 
           "subnet_id": "",
           "ip_address": "",
           "reverse_binding": false
    }
}

Example Response

{
   "port_id": "d32019d3-bc6e-4319-9c1d-6722fc136a23"
}

Error Codes

See Error Codes.