VM Related Interfaces
Set VM Emulator Pinning
Headers
Authorization: OAuth the-session-uuidBody
{
"setVmEmulatorPinning": {
"emulatorPinning": ""
},
"systemTags": [],
"userTags": []
}In the example above, systemTags and userTags fields can be omitted. They are listed to indicate that the body can contain these two fields.
Curl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"setVmEmulatorPinning":{"emulatorPinning":""}}' \
http://localhost:8080/zstack/v1/vm-instances/7bcde0f2638a3b83bb9120c17a7f34e1/actionsParameter List
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | Resource UUID, uniquely identifies the resource | 4.3.12 | |
| emulatorPinning | String | body (contained in setVmEmulatorPinning structure) | 4.3.12 | ||
| systemTags (Optional) | List | body | 4.3.12 | ||
| userTags (Optional) | List | body | 4.3.12 |
API Response
On success, this API returns an empty JSON structure {}. On error, the returned JSON structure contains 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 Examples
Java SDK
SetVmEmulatorPinningAction action = new SetVmEmulatorPinningAction();
action.uuid = "7bcde0f2638a3b83bb9120c17a7f34e1";
action.emulatorPinning = "";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
SetVmEmulatorPinningAction.Result res = action.call();Python SDK
SetVmEmulatorPinningAction action = SetVmEmulatorPinningAction()
action.uuid = "7bcde0f2638a3b83bb9120c17a7f34e1"
action.emulatorPinning = ""
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
SetVmEmulatorPinningAction.Result res = action.call()