GetVmInstanceHaLevel

API Request

URLs
GET zstack/v1/vm-instances/{uuid}/ha-levels
Headers
Authorization: OAuth the-session-uuid
Curl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 92f80693e3d641c68c014d4f762c0b70" \
-X GET http://localhost:8080/zstack/v1/vm-instances/76d39c6862b840a3aa4568d83db99022/ha-levels
Parameter List
Name Type Location Description Allowed Values Starting Version
uuid String url Virtual Machine resource UUID 0.6
systemTags (Optional) List query System Tags 0.6
userTags (Optional) List query User Tags 0.6

API Response

Response Example
{
  "level": "NeverStop"
}
Name Type Description Starting Version
level String Virtual Machine HA level: NeverStop or OnHostFailure 0.6
success boolean Whether the operation succeeded. 0.6
error ErrorCode Error code. If not null, the operation failed. When the operation succeeds, this field is null. For details, see error 0.6
#error
Name Type Description Starting Version
code String Error code number, a 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, defaults to null 0.6
opaque LinkedHashMap Reserved field, defaults to null 0.6
cause ErrorCode Root cause. The error that triggered the current error. If there is no original error, this field is null 0.6

SDK Examples

Java SDK
GetVmInstanceHaLevelAction action = new GetVmInstanceHaLevelAction();
action.uuid = "76d39c6862b840a3aa4568d83db99022";
action.sessionId = "ed55da0421704d2ca59ff0106cae94bb";
GetVmInstanceHaLevelAction.Result res = action.call();
Python SDK
GetVmInstanceHaLevelAction action = GetVmInstanceHaLevelAction()
action.uuid = "76d39c6862b840a3aa4568d83db99022"
action.sessionId = "559a84ded13d4e88a7fdb01f2dfd47f0"
GetVmInstanceHaLevelAction.Result res = action.call()
API Reference | ZStack ZSphere · ZVF | ZStack Resource Center