跳转到主要内容
资源中心/网络资源/二层网络资源相关接口

创建VXLAN网络

创建VXLAN网络

POST/zstack/v1/l2-networks/vxlan

操作 ID

CreateL2VxlanNetwork

起始版本

0.6

执行模式

同步

认证信息

需要认证

认证信息

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

Authorizationstring必填

Bearer 令牌

X-Tenant-IDstring

X-Tenant-ID

请求参数

application/json

请求体字段

  • params
    Object必填

    请求体参数结构

    • vni
      Integer

      Vxlan网络VNI

    • poolUuid
      String必填

      Vxlan网络资源池UUID

    • name
      String必填

      资源名称

    • description
      String

      资源的详细描述

    • zoneUuid
      String必填

      区域UUID

    • physicalInterface
      String必填

      物理接口。

    • type
      String

      类型。

    • resourceUuid
      String

      资源UUID。若指定,资源会使用该字段值作为UUID。

    • vSwitchType
      String

      虚拟交换机类型

    • tagUuid
      List

      可选UUID标签列表。

  • 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

  • inventory
    L2VxlanNetworkPoolInventory必填

    详情参考inventory

    • vni
      Integer必填

      暂无描述。

    • poolUuid
      String必填

      Vxlan网络资源池uuid

    • uuid
      String必填

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

    • name
      String必填

      资源名称

    • description
      String必填

      资源的详细描述

    • zoneUuid
      String必填

      区域UUID

    • physicalInterface
      String必填

      物理接口。

    • type
      String必填

      类型。

    • createDate
      Timestamp必填

      创建时间

    • lastOpDate
      Timestamp必填

      最后一次修改时间

    • attachedClusterUuids
      List必填

      暂无描述。