跳转到主要内容
资源中心/硬件设施/物理机相关接口/USB透传相关接口
PUTUSB Pass-through Operations起始版本 2.2同步需要认证

更新USB设备

更新USB设备

调试可用性

在线调试

使用当前认证信息和示例参数提交 Mock 请求。

请求参数

此接口无需请求参数。

响应状态

200 OK

该 API 成功时返回以下响应结构。

  • errorErrorCode必填

    错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error

    • codeString必填

      错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001

    • descriptionString必填

      错误的概要描述

    • detailsString必填

      错误的详细信息

    • elaborationString必填

      保留字段,默认为null

    • opaqueLinkedHashMap必填

      保留字段,默认为null

    • causeErrorCode必填

      根错误,引发当前错误的源错误,若无原错误,该字段为null

  • inventoryUsbDeviceInventory必填

    详情参考inventory

    • uuidString必填

      资源的UUID,唯一标示该资源

    • nameString必填

      资源名称

    • descriptionString必填

      资源的详细描述

    • hostUuidString必填

      物理机UUID

    • vmInstanceUuidString必填

      云主机UUID

    • busNumString必填

      总线号

    • devNumString必填

      设备号

    • idVendorString必填

      暂无描述。

    • idProductString必填

      设备ID。

    • iManufacturerString必填

      生产商

    • iProductString必填

      设备类型

    • iSerialString必填

      序列号

    • usbVersionString必填

      USB版本

    • attachTypeString必填

      加载方式

    • createDateTimestamp必填

      创建时间

    • lastOpDateTimestamp必填

      最后一次修改时间

    • stateUsbDeviceState必填

      详情参考state

      • nameString必填

        资源名称

      • ordinalint必填

        暂无描述。

请求地址

PUT/zstack/v1/usb-device/usb-devices/{uuid}/actions

/zstack/v1/usb-device/usb-devices/{uuid}/actions

操作 ID

UpdateUsbDevice

永久链接

请求示例

curl -X PUT 'http://{host}/zstack/v1/usb-device/usb-devices/{uuid}/actions' -H 'Authorization: OAuth {sessionUuid}'

响应示例

200
{ "inventory": { "uuid": "2695f7ce0bda4587bbabbbfaad080554", "description": "test usb", "hostUuid": "4261ceb358ce473fa62c137c1ba8d3ef", "vmInstanceUuid": "4c059c5e0a834d86984d3141d8ec42cb", "state": "Disabled", "idVendor": "10de", "idProduct": "0e0f", "iManufacturer": "SanDisk", "iProduct": "USB Storage", "iSerial": "000000000001", "usbVersion": "3.0", "attachType": "PassThrough" } }

变更历史

此 API 暂无变更历史记录。

查看全部变更历史