跳转到主要内容
资源中心/网络服务/网络服务相关接口/端口转发相关接口

获取云主机网卡列表

获取可应用端口转发规则的云主机网卡列表。

GET/zstack/v1/port-forwarding/{ruleUuid}/vm-instances/candidate-nics

操作 ID

GetPortForwardingAttachableVmNics

起始版本

0.6

执行模式

同步

认证信息

需要认证

认证信息

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

Authorizationstring必填

Bearer 令牌

X-Tenant-IDstring

X-Tenant-ID

请求参数

路径参数

  • ruleUuid
    String必填

    规则的uuid

查询参数

  • systemTags
    List

    系统标签

  • userTags
    List

    用户标签

响应状态

200 OK
200 OK

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

  • 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,唯一标示该资源

    • vmInstanceUuid
      String必填

      云主机UUID

    • l3NetworkUuid
      String必填

      三层网络UUID

    • ip
      String必填

      来源IP地址。

    • mac
      String必填

      MAC地址。

    • netmask
      String必填

      暂无描述。

    • gateway
      String必填

      网关IP地址。

    • metaData
      String必填

      元数据。

    • deviceId
      Integer必填

      设备ID。

    • createDate
      Timestamp必填

      创建时间

    • lastOpDate
      Timestamp必填

      最后一次修改时间