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 |
Specifies ECS NICs. For details, see Table 3. |
Parameter |
Type |
Description |
---|---|---|
port_state |
String |
Specifies the NIC port status. |
fixed_ips |
Array of objects |
Specifies private IP addresses for NICs. For details, see Table 4. |
net_id |
String |
Specifies the network ID to which the NIC port belongs. |
port_id |
String |
Specifies the NIC port ID. |
mac_addr |
String |
Specifies the MAC address of the NIC. |
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot