VM Related Interfaces

Get VM HA Level

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

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidStringurlVirtual Machine resource UUID 0.6
systemTags (Optional)ListquerySystem Tags 0.6
userTags (Optional)ListqueryUser Tags 0.6

API Response

Response Example

{
  "level": "NeverStop"
}
NameTypeDescriptionStarting Version
levelStringVirtual Machine HA level: NeverStop or OnHostFailure0.6
successboolean 0.6
errorErrorCodeError code. If not null, the operation failed. When the operation succeeds, this field is null. For details, see error0.6

error

NameTypeDescriptionStarting Version
codeStringError code number, a globally unique identifier of the error, for example SYS.1000, HOST.10010.6
descriptionStringBrief description of the error0.6
detailsStringDetailed error information0.6
elaborationStringReserved field, defaults to null0.6
opaqueLinkedHashMapReserved field, defaults to null0.6
causeErrorCodeRoot cause. The error that triggered the current error. If there is no original error, this field is null0.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()