Document navigation

GetVmDns

API Request

URLs
GET zstack/v1/vm-instances/{vmInstanceUuid}/dns
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/ff01ec80fd11327cba7519b66119d900/dns?vmNicUuid=ff06b3f6ce3939d78731832c5ac97000&ipVersion=4
Parameter List
Name Type Location Description Allowed Values Starting Version
vmInstanceUuid String url Virtual Machine UUID 4.10.10
vmNicUuid (Optional) String query Virtual Machine NIC UUID 4.10.10
ipVersion (Optional) Integer query IP Protocol Number
  • 4
  • 6
4.10.10
systemTags (Optional) List query System Tag 4.10.10
userTags (Optional) List query User Tag 4.10.10

API Response

Response Example
{
  "dnsList": [
    "8.8.8.8"
  ]
}
Name Type Description Starting Version
dnsList List DNS List 4.10.10
success boolean Whether the operation succeeded. 4.10.10
vmDnsList List For details, see vmDnsList 4.10.10
error ErrorCode Error code. If not null, the operation failed. When the operation is successful, this field is null. For details, see error 4.10.10
#vmDnsList
Name Type Description Starting Version
vmInstanceUuid String Virtual Machine UUID 4.10.10
vmNicUuid String Virtual Machine NIC UUID 4.10.10
dns String DNS Address 4.10.10
ipVersion Integer IP Protocol Number 4.10.10
createDate Timestamp Create time 4.10.10
lastOpDate Timestamp Last modification time 4.10.10
#error
Name Type Description Starting Version
code String Error code number, globally unique identifier of the error, for example SYS.1000, HOST.1001 0.6
description String Brief description of the error 0.6
details String Detailed error information 0.6
elaboration String Reserved field, default is null 0.6
opaque LinkedHashMap Reserved field, default is null 0.6
cause ErrorCode Root cause: the source error that triggered the current error. If there is no original error, this field is null 0.6

SDK Examples

Java SDK
GetVmDnsAction action = new GetVmDnsAction();
action.vmInstanceUuid = "ff01ec80fd11327cba7519b66119d900";
action.vmNicUuid = "ff06b3f6ce3939d78731832c5ac97000";
action.ipVersion = 4;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetVmDnsAction.Result res = action.call();
Python SDK
GetVmDnsAction action = GetVmDnsAction()
action.vmInstanceUuid = "ff01ec80fd11327cba7519b66119d900"
action.vmNicUuid = "ff06b3f6ce3939d78731832c5ac97000"
action.ipVersion = 4
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetVmDnsAction.Result res = action.call()
API Reference | ZStack ZSphere · ZVF | ZStack Resource Center