SetVmQga
API Request
URLs
PUT zstack/v1/vm-instances/{uuid}/actionsHeaders
Authorization: OAuth the-session-uuidBody
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"setVmQga": {
"enable": false
},
"systemTags": [],
"userTags": []
}
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.Curl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"setVmQga":{"enable":false}}' \
http://localhost:8080/zstack/v1/vm-instances/8f37ceee285c3418b28247388508601a/actionsRequest Parameters
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | The resource UUID. | 0.6 | |
| enable | boolean | body (contained in the params structure) | 0.6 | ||
| systemTags | List | body | Optional. The system tags. | 0.6 | |
| userTags | List | body | Optional. The user tags. | 0.6 |
API Response
When the API succeeded, an empty JSON structure {} is returned. When the API
failed, the returned JSON structure includes an error field. For
example,
{
"error": {
"code": "SYS.1001",
"description": "A message or a operation timeout",
"details": "Create VM on KVM timeout after 300s"
}
}SDK Sample
Java
SDK
SetVmQgaAction action = new SetVmQgaAction();
action.uuid = "771991c9b47f45a392bddeadba95ab2b";
action.enable = false;
action.sessionId = "6dc45ce48e8345f89c8487bb9a5180f8";
SetVmQgaAction.Result res = action.call();Python
SDK
SetVmQgaAction action = SetVmQgaAction()
action.uuid = "084bb6e8ecd9497fb261049cce04b116"
action.enable = false
action.sessionId = "5e78bf8076a84933928ee8d2ef04eca9"
SetVmQgaAction.Result res = action.call()