VM Related Interfaces

Get VM Monitor Number

GET/zstack/v1/vm-instances/{uuid}/monitorNumber

Get the number of monitors supported by the VM

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 536c3b51e70f441190204e645a3d2d76" \
-X GET http://localhost:8080/zstack/v1/vm-instances/deb35f3b8ebf4b7e9765726a9c8e3505/monitorNumber

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidStringurlResource UUID, uniquely identifies the resource 2.2
systemTags (Optional)Listquery  2.2
userTags (Optional)Listquery  2.2

API Response

Response Example

{
  "monitorNumber": 2.0
}
NameTypeDescriptionStarting Version
monitorNumberInteger 2.2
errorErrorCodeError code. If not null, the operation failed. When the operation succeeds, this field is null. For details, see error2.2

error

NameTypeDescriptionStarting Version
codeStringError code number, a globally unique identifier of the error, for example SYS.1000, HOST.10012.2
descriptionStringBrief description of the error2.2
detailsStringDetailed error information2.2
elaborationStringReserved field, defaults to null2.2
opaqueLinkedHashMapReserved field, defaults to null2.2
causeErrorCodeRoot cause. The error that triggered the current error. If there is no original error, this field is null2.2

SDK Examples

Java SDK

GetVmMonitorNumberAction action = new GetVmMonitorNumberAction();
action.uuid = "6415ca5909524c00b7b66c9662b45df1";
action.sessionId = "4bf39c422c2d4e01b5ab88da17096d0d";
GetVmMonitorNumberAction.Result res = action.call();

Python SDK

GetVmMonitorNumberAction action = GetVmMonitorNumberAction()
action.uuid = "dc6e40115e674ccab14d9425d0028428"
action.sessionId = "3f5d36676ca94b9183b567470a22ed19"
GetVmMonitorNumberAction.Result res = action.call()