VM Related Interfaces

Get NIC Attached Network Service Names

GET/zstack/v1/vm-instances/nics/{vmNicUuid}/attached-networkservices

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/vm-instances/nics/8c193a29a4a43fccab83fea5a7281856/attached-networkservices

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
vmNicUuidStringurlVirtual Machine NIC UUID 4.1.0
systemTags (Optional)ListquerySystem Tag 4.1.0
userTags (Optional)ListqueryUser Tag 4.1.0

API Response

Response Example

{
  "networkServices": [
    "Eip"
  ]
}
NameTypeDescriptionStarting Version
successboolean 0.6
networkServicesList 4.1.0
errorErrorCodeError code. If not null, the operation failed. This field is null when the operation is successful. For details, see error4.1.0

error

NameTypeDescriptionStarting Version
codeStringError code number, a globally unique identifier for the error, for example SYS.1000, HOST.10014.1.0
descriptionStringBrief description of the error4.1.0
detailsStringDetailed error information4.1.0
elaborationStringReserved field, defaults to null4.1.0
opaqueLinkedHashMapReserved field, defaults to null4.1.0
causeErrorCodeRoot cause. The source error that caused the current error. If there is no original error, this field is null4.1.0

SDK Examples

Java SDK

GetVmNicAttachedNetworkServiceAction action = new GetVmNicAttachedNetworkServiceAction();
action.vmNicUuid = "8c193a29a4a43fccab83fea5a7281856";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetVmNicAttachedNetworkServiceAction.Result res = action.call();

Python SDK

GetVmNicAttachedNetworkServiceAction action = GetVmNicAttachedNetworkServiceAction()
action.vmNicUuid = "8c193a29a4a43fccab83fea5a7281856"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetVmNicAttachedNetworkServiceAction.Result res = action.call()