跳转到主要内容
计算管理/主机相关接口/PCI设备相关接口
PUTPCI Device Related APIs起始版本 3.5.0同步需要认证

更新PCI设备规格

更新PCI设备规格

调试可用性

在线调试

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

路径参数

请求参数

路径参数

  • uuidString必填

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

请求体字段

  • nameString

    资源名称。

  • descriptionString

    资源的详细描述。

  • romContentString

    基础64编码firmware内容。

  • romVersionString

    firmware版本。

  • abandonSpecRomboolean

    删除已存在firmware。

响应状态

200 OK

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

  • successboolean必填

    操作是否成功。

  • errorErrorCode必填

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

    • codeString必填

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

    • descriptionString必填

      错误的概要描述

    • detailsString必填

      错误的详细信息

    • elaborationString必填

      保留字段,默认为null

    • opaqueLinkedHashMap必填

      保留字段,默认为null

    • causeErrorCode必填

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

  • inventoryPciDeviceSpecInventory必填

    详情参考inventory

    • uuidString必填

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

    • nameString必填

      资源名称

    • descriptionString必填

      资源的详细描述

    • vendorIdString必填

      供应商ID

    • deviceIdString必填

      设备ID

    • subvendorIdString必填

      子供应商ID

    • subdeviceIdString必填

      子设备ID

    • ramSizeString必填

      显存容量

    • maxPartNumInteger必填

      最大切分数量

    • isVirtualBoolean必填

      是否虚拟设备

    • romVersionString必填

      固件版本

    • romMd5sumString必填

      固件MD5

    • createDateTimestamp必填

      创建时间

    • lastOpDateTimestamp必填

      最后一次修改时间

    • typePciDeviceType必填

      详情参考type

      • GPU_Video_ControllerPciDeviceType必填

        GPU显卡控制器

      • GPU_Audio_ControllerPciDeviceType必填

        GPU声卡控制器

      • GPU_3D_ControllerPciDeviceType必填

        GPU 3D控制器

      • Moxa_DevicePciDeviceType必填

        MOXA卡

      • GenericPciDeviceType必填

        一般设备

    • statePciDeviceSpecState必填

      详情参考state

      • EnabledPciDeviceSpecState必填

        启用

      • DisabledPciDeviceSpecState必填

        停用

请求地址

PUT/zstack/v1/pci-device-specs/{uuid}/actions

/zstack/v1/pci-device-specs/{uuid}/actions

操作 ID

UpdatePciDeviceSpec

永久链接

请求示例

curl -X PUT 'http://{host}/zstack/v1/pci-device-specs/{uuid}/actions' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"name":"<name>","description":"<description>","romContent":"<romContent>","romVersion":"<romVersion>","abandonSpecRom":true,"state":"<state>","systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

响应示例

200
{ "inventory": { "uuid": "304bc9b4af93442fb666bef79e84243a", "name": "MSI_GTX1060", "description": "NVIDIA Corporation, GP106 [GeForce GTX 1060 6GB], a1, VGA compatible controller", "vendorId": "10de", "deviceId": "1c03", "subvendorId": "1462", "subdeviceId": "3283", "type": "GPU_Video_Controller", "state": "Enabled", "romVersion": "86.06.0E.00.28", "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM" } }

变更历史

此 API 暂无变更历史记录。

查看全部变更历史