跳转到主要内容
资源中心/硬件设施/物理机相关接口/USB透传相关接口

获取USB透传候选列表

获取USB透传候选列表

GET/zstack/v1/vm-instances/{vmInstanceUuid}/candidate-usb-devices

操作 ID

GetUsbDeviceCandidatesForAttachingVm

起始版本

2.2

执行模式

同步

认证信息

需要认证

认证信息

调用该 API 时需要在请求头中携带以下认证信息。

Authorizationstring必填

Bearer 令牌

X-Tenant-IDstring

X-Tenant-ID

请求参数

路径参数

  • vmInstanceUuid
    String必填

    云主机UUID

查询参数

  • attachType
    String

    加载类型

  • systemTags
    List

    系统标签

  • userTags
    List

    用户标签

响应状态

200 OK
200 OK

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

  • success
    boolean必填

    成功

  • error
    ErrorCode必填

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

    • code
      String必填

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

    • description
      String必填

      错误的概要描述

    • details
      String必填

      错误的详细信息

    • elaboration
      String必填

      保留字段,默认为null

    • opaque
      LinkedHashMap必填

      保留字段,默认为null

    • cause
      ErrorCode必填

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

  • inventories
    List必填

    详情参考inventories

    • uuid
      String必填

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

    • name
      String必填

      资源名称

    • description
      String必填

      资源的详细描述

    • hostUuid
      String必填

      物理机UUID

    • vmInstanceUuid
      String必填

      云主机UUID

    • busNum
      String必填

      总线号

    • devNum
      String必填

      设备号

    • idVendor
      String必填

      暂无描述。

    • idProduct
      String必填

      设备ID。

    • iManufacturer
      String必填

      生产商

    • iProduct
      String必填

      设备类型

    • iSerial
      String必填

      序列号

    • usbVersion
      String必填

      USB版本

    • attachType
      String必填

      加载方式

    • createDate
      Timestamp必填

      创建时间

    • lastOpDate
      Timestamp必填

      最后一次修改时间

    • state
      UsbDeviceState必填

      详情参考state

      • name
        String必填

        资源名称

      • ordinal
        int必填

        ordinal数量。