Get VM USB Redirect Status

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

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth bb5fd18e914f4bfd88032edd0ee7b975" \
-X GET http://localhost:8080/zstack/v1/vm-instances/4b9d28c1d35f4f14b8ba1bb982500c50/usbredirect

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidStringurlUUID of the resource, uniquely identifies the resource 2.1
systemTags (Optional)Listquery  2.1
userTags (Optional)Listquery  2.1

API Response

Response Example

{
  "enable": true
}
NameTypeDescriptionStarting Version
successboolean 0.6
enablebooleanWhether USB redirect is enabled0.6
errorErrorCodeError code. If not null, the operation failed. This field is null when the operation succeeds. See error0.6

error

NameTypeDescriptionStarting Version
codeStringError code, a globally unique identifier of the error, e.g. SYS.1000, HOST.10012.1
descriptionStringBrief description of the error2.1
detailsStringDetailed error information2.1
elaborationStringReserved field, defaults to null2.1
opaqueLinkedHashMapReserved field, defaults to null2.1
causeErrorCodeRoot cause, the source error that caused the current error, null if no original error2.1

SDK Examples

Java SDK

GetVmUsbRedirectAction action = new GetVmUsbRedirectAction();
action.uuid = "c58671c58dd147e29d4bc263feafa04d";
action.sessionId = "e173648fdca94fd3ae720473a305ce4c";
GetVmUsbRedirectAction.Result res = action.call();

Python SDK

GetVmUsbRedirectAction action = GetVmUsbRedirectAction()
action.uuid = "08efac4de45a4f6789d1009afa9e295e"
action.sessionId = "3f5a7473758d4c8ab3cc4664461500a4"
GetVmUsbRedirectAction.Result res = action.call()