跳转到主要内容
平台运维/灾备管理/灾备服务(Plus)/灾备服务相关接口

创建云盘镜像

从云盘备份创建数据云盘镜像。

POST/zstack/v1/images/data-volume-templates/from/volume-template/{backupUuid}

操作 ID

CreateDataVolumeTemplateFromVolumeBackup

起始版本

2.6.0

执行模式

同步

认证信息

需要认证

认证信息

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

Authorizationstring必填

Bearer 令牌

X-Tenant-IDstring

X-Tenant-ID

请求参数

application/json

路径参数

  • backupUuid
    String必填

    云盘备份uuid

请求体字段

  • params
    Object必填

    请求体参数结构

    • backupStorageUuid
      String必填

      镜像存储UUID

    • name
      String必填

      资源名称

    • description
      String

      资源的详细描述

    • guestOsType
      String

      宿主机操作系统类型

    • platform
      String

      宿主机平台类型

    • system
      boolean

      是否系统镜像

    • resourceUuid
      String

      指定资源uuid

    • architecture
      String

      可选。

    • tagUuids
      List

      标签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

  • inventory
    ImageInventory必填

    详情参考inventory

    • uuid
      String必填

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

    • name
      String必填

      资源名称

    • description
      String必填

      资源的详细描述

    • state
      String必填

      镜像的启动状态

    • status
      String必填

      镜像的就绪状态

    • size
      Long必填

      镜像大小

    • actualSize
      Long必填

      镜像真实容量

    • md5Sum
      String必填

      镜像的md5值

    • url
      String必填

      镜像的URL地址

    • mediaType
      String必填

      镜像的类型

    • guestOsType
      String必填

      镜像对应的客户机操作系统类型

    • type
      String必填

      内部使用字段

    • platform
      String必填

      镜像的系统平台

    • format
      String必填

      镜像的格式,比如:raw

    • system
      Boolean必填

      标识是否为系统镜像

    • createDate
      Timestamp必填

      创建时间

    • lastOpDate
      Timestamp必填

      最后一次修改时间

    • backupStorageRefs
      List必填

      详情参考backupStorageRefs

      • imageUuid
        String必填

        镜像UUID

      • backupStorageUuid
        String必填

        镜像存储UUID

      • installPath
        String必填

        在镜像服务器上的安装路径

      • exportUrl
        String必填

        导出镜像的url

      • exportMd5Sum
        String必填

        导出镜像的md5值

      • status
        String必填

        镜像就绪状态

      • createDate
        Timestamp必填

        创建时间

      • lastOpDate
        Timestamp必填

        最后一次修改时间