Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com> Co-authored-by: wanghuijuan738 <wanghuijuan738@huawei.com> Co-committed-by: wanghuijuan738 <wanghuijuan738@huawei.com>
23 KiB
Listing NICs of an ECS
Function
This API is used to list NICs of an ECS.
URI
GET /v1/{project_id}/cloudservers/{server_id}/os-interface
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
List NICs of an ECS.
GET https://{endpoint}/v1/{project_id}/cloudservers/{server_id}/os-interface
Example Response
{
"attachableQuantity": {
"free_nic": 1,
"free_efi_nic": 0
},
"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",
"delete_on_termination": false,
"driver_mode": null,
"min_rate": null,
"multiqueue_num": null,
"pci_address": null
}
]
}