SetVmSoundType

API Request

URLs
PUT zstack/v1/vm-instances/{uuid}/actions
Headers
Authorization: OAuth the-session-uuid
Body
{
  "setVmSoundType": {
    "soundType": "ac97"
  },
  "systemTags": [],
  "userTags": []
}
Note: 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 '{"setVmSoundType":{"soundType":"ac97"}}' http://localhost:8080/zstack/v1/vm-instances/0ae1191601f430d88e1707716d24ff39/actions
Parameter List
Name Type Location Description Allowed Values Starting Version
uuid String url Virtual Machine UUID 3.7.0
soundType String body (contained in setVmSoundType structure) Virtual sound card type, default is ich6
  • ac97
  • ich6
3.7.0
systemTags (Optional) List body Optional. The system tags. 3.7.0
userTags (Optional) List body Optional. The user tags. 3.7.0

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
SetVmSoundTypeAction action = new SetVmSoundTypeAction();
action.uuid = "0ae1191601f430d88e1707716d24ff39";
action.soundType = "ac97";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
SetVmSoundTypeAction.Result res = action.call();
Python SDK
SetVmSoundTypeAction action = SetVmSoundTypeAction()
action.uuid = "0ae1191601f430d88e1707716d24ff39"
action.soundType = "ac97"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
SetVmSoundTypeAction.Result res = action.call()
API Reference | ZStack ZSphere · ZVF | ZStack Resource Center