Querying NICs of an ECS
Function
This API is used to query NICs of an ECS.
URI
GET /v1/{project_id}/cloudservers/{server_id}/os-interface
|
Parameter |
Mandatory |
Description |
|---|---|---|
|
project_id |
Yes |
Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. |
|
server_id |
Yes |
Specifies the ECS ID. |
Request
None
Response
|
Parameter |
Type |
Description |
|---|---|---|
|
interfaceAttachments |
Array of objects |
Definition Specifies ECS NICs. For details, see Table 3. Range N/A |
|
attachableQuantity |
Object |
Definition Specifies the number of NICs that can be attached to an ECS. For details, see Table 4. Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
port_state |
String |
Definition Specifies the NIC port status. Range N/A |
|
fixed_ips |
Array of objects |
Definition Specifies private IP addresses for NICs. For details, see Table 5. Range N/A |
|
net_id |
String |
Definition Specifies the network ID (network_id) that the NIC port belongs to. Range N/A |
|
port_id |
String |
Definition Specifies the NIC port ID. Range N/A |
|
mac_addr |
String |
Definition Specifies the MAC address of the NIC. Range N/A |
|
delete_on_termination |
Boolean |
Definition Specifies whether to delete a NIC when detaching it. Range
|
|
driver_mode |
String |
Definition Specifies the NIC driver type, which is virtio by default. This parameter is a reserved field. Range N/A |
|
min_rate |
Integer |
Definition Specifies the minimum NIC bandwidth. Range N/A |
|
multiqueue_num |
Integer |
Definition Specifies the number of queues. Range 1-64 |
|
pci_address |
String |
Definition Specifies the BDF number of the NIC in Linux GuestOS.
NOTE:
If the NIC is not supported, no information will be returned. Range N/A |
Example Request
Query NICs of an ECS.
GET https://{endpoint}/v1/{project_id}/cloudservers/{server_id}/os-interface
Example Response
{
"interfaceAttachments": [
{
"port_state": "ACTIVE",
"fixed_ips": [
{
"subnet_id": "ba31e1f5-fa76-4530-862c-5176fad033cf",
"ip_address": "192.168.0.33"
}
],
"net_id": "610a4af2-1d90-4d2b-8057-dc238b26febf",
"port_id": "04819c0a-6a07-44b6-945e-fb932071888e",
"mac_addr": "fa:16:3e:45:65:c4" }
]
}
Returned Values
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.