跳转到主要内容
资源中心/弹性裸金属管理(Plus)

创建裸金属实例

创建裸金属实例

POST/zstack/v1/baremetal2/bm-instances

操作 ID

CreateBareMetal2Instance

起始版本

4.0.0

执行模式

同步

认证信息

需要认证

认证信息

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

Authorizationstring必填

Bearer 令牌

X-Tenant-IDstring

X-Tenant-ID

请求参数

application/json

请求体字段

  • params
    Object必填

    请求体参数结构

    • name
      String必填

      资源名称

    • description
      String

      资源的详细描述

    • zoneUuid
      String

      区域UUID

    • clusterUuid
      String

      集群UUID

    • gatewayUuid
      String

      裸金属网关节点UUID

    • chassisUuid
      String

      裸金属节点UUID

    • chassisOfferingUuid
      String

      裸金属节点规格UUID

    • imageUuid
      String

      镜像UUID

    • primaryStorageUuidForRootVolume
      String

      根云盘所在主存储UUID

    • primaryStorageUuidForDataVolume
      String

      数据盘所在主存储UUID

    • dataDiskOfferingUuids
      List

      数据云盘规格UUID列表

    • rootVolumeSystemTags
      List

      根云盘系统标签

    • dataVolumeSystemTags
      List

      数据盘系统标签

    • gatewayAllocatorStrategy
      String

      裸金属网关节点分配策略

    • resourceUuid
      String

      资源UUID

    • tagUuids
      List

      标签UUID列表

    • chassisDiskUuid
      String

      本地系统盘UUID

    • l3NetworkUuids
      List

      一组三层网络的UUID

    • defaultL3NetworkUuid
      String

      默认L3网络UUID

    • vmNicParams
      String

      网卡信息

  • 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

  • inventory
    BareMetal2InstanceInventory必填

    详情参考inventory

    • chassisUuid
      String必填

      裸金属节点UUID

    • lastChassisUuid
      String必填

      上次所在裸金属节点UUID

    • gatewayUuid
      String必填

      裸金属网关节点UUID

    • lastGatewayUuid
      String必填

      上次所在裸金属网关节点UUID

    • chassisOfferingUuid
      String必填

      裸金属节点规格UUID

    • gatewayAllocatorStrategy
      String必填

      裸金属网关节点分配策略

    • status
      String必填

      连接状态

    • uuid
      String必填

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

    • name
      String必填

      资源名称

    • description
      String必填

      资源的详细描述

    • zoneUuid
      String必填

      区域UUID

    • clusterUuid
      String必填

      集群UUID

    • imageUuid
      String必填

      镜像UUID

    • rootVolumeUuid
      String必填

      根云盘UUID

    • platform
      String必填

      平台类型

    • defaultL3NetworkUuid
      String必填

      默认网络UUID

    • type
      String必填

      类型

    • hypervisorType
      String必填

      虚拟化类型

    • memorySize
      Long必填

      内存容量

    • cpuNum
      Integer必填

      CPU核数

    • cpuSpeed
      Long必填

      CPU速率

    • createDate
      Timestamp必填

      创建时间

    • lastOpDate
      Timestamp必填

      最后一次修改时间

    • state
      String必填

      运行状态

    • provisionNic
      BareMetal2InstanceProvisionNicInventory必填

      详情参考provisionNic

      • uuid
        String必填

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

      • networkUuid
        String必填

        裸金属部署网络UUID

      • mac
        String必填

        MAC地址

      • ip
        String必填

        IP地址

      • netmask
        String必填

        子网掩码

      • gateway
        String必填

        网关地址

      • metadata
        String必填

        附加元数据。

      • createDate
        Timestamp必填

        创建时间

      • lastOpDate
        Timestamp必填

        最后一次修改时间

    • vmNics
      List必填

      详情参考vmNics

      • uuid
        String必填

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

      • vmInstanceUuid
        String必填

        云主机UUID

      • l3NetworkUuid
        String必填

        三层网络UUID

      • ip
        String必填

        IP地址

      • mac
        String必填

        MAC地址

      • hypervisorType
        String必填

        虚拟化类型

      • netmask
        String必填

        子网掩码

      • gateway
        String必填

        网关

      • metaData
        String必填

        元数据。

      • ipVersion
        Integer必填

        IP地址版本

      • deviceId
        Integer必填

        设备ID

      • type
        String必填

        网卡类型

      • createDate
        Timestamp必填

        创建时间

      • lastOpDate
        Timestamp必填

        最后一次修改时间

      • usedIps
        List必填

        详情参考usedIps

        • uuid
          String必填

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

        • ipRangeUuid
          String必填

          IP段UUID

        • l3NetworkUuid
          String必填

          三层网络UUID

        • ipVersion
          Integer必填

          IP协议号

        • ip
          String必填

          IP地址

        • netmask
          String必填

          网络掩码

        • gateway
          String必填

          网关地址

        • usedFor
          String必填

          intended使用。

        • ipInLong
          long必填

          IP地址represented长integer。

        • vmNicUuid
          String必填

          云主机网卡UUID

        • createDate
          Timestamp必填

          创建时间

        • lastOpDate
          Timestamp必填

          最后一次修改时间

    • allVolumes
      List必填

      详情参考allVolumes

      • uuid
        String必填

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

      • name
        String必填

        资源名称

      • description
        String必填

        资源的详细描述

      • primaryStorageUuid
        String必填

        主存储UUID

      • vmInstanceUuid
        String必填

        云主机UUID

      • diskOfferingUuid
        String必填

        云盘规格UUID

      • rootImageUuid
        String必填

        云盘根镜像UUID

      • installPath
        String必填

        云盘在主存储上的路径

      • type
        String必填

        云盘类型,数据云盘/根云盘

      • format
        String必填

        云盘格式

      • size
        Long必填

        云盘大小

      • actualSize
        Long必填

        云盘真实大小

      • deviceId
        Integer必填

        设备ID。

      • state
        String必填

        云盘是否开启

      • status
        String必填

        云盘状态

      • createDate
        Timestamp必填

        创建时间

      • lastOpDate
        Timestamp必填

        最后一次修改时间

      • isShareable
        Boolean必填

        是否共享云盘

      • volumeQos
        String必填

        云盘Qos,格式如total=1048576

  • 变更时间

    新增请求体字段 defaultL3NetworkUuid, l3NetworkUuids, vmNicParams
    查看 API