云主机

  • 云主机 > API 文档 > 快照 > 创建快照

    创建快照

    最近更新时间: 2021-02-26 11:56:48

    请求路径

    POST /v1/vm/snapshot

    请求参数

    名称 类型 位置 必须 描述
    region_id string body

    地域 ID。

    您可以调用 DescribeRegions 查看最新的七牛云地域列表。

    disk_id string body

    根据指定的磁盘创建快照。

    snapshot_name string body

    快照名称。

    长度为 2~128 个英文或中文字符。必须以大小字母或中文开头,不能以 http://https:// 开头。可以包含数字、半角冒号(:)、下划线(_)或者连字符(-)。

    默认值:空

    description string body

    镜像的描述信息。长度为 2~256 个英文或中文字符,不能以 http://https:// 开头。 默认值:空

    client_token string body

    保证请求幂等性, 客户端生成的一个唯一值

    cost_charge_type string body 付费方式,目前仅支持 PostPaid
    cost_charge_mode string body 计费方式,固定为 PayBySnapshot
    cost_period_unit string body 计费单位
    cost_period integer body 计费周期

    返回值

    名称 类型 描述
    request_id string 请求 ID
    data Snapshot 快照

    Snapshot

    名称 类型 描述
    cost_charge_type string

    付费方式

    cost_charge_mode string

    计费方式

    region_id string

    地域 ID

    created_at string

    创建时间

    updated_at string

    更新时间

    snapshot_id string

    快照 ID

    snapshot_name string

    快照名称

    description string

    描述

    status string

    状态

    • progressing: 创建中
    • accomplished: 创建成功
    • failed: 创建失败
    progress string

    创建进度

    source_disk_id string 源磁盘ID
    source_disk_name string 源磁盘名称
    source_disk_type string 源磁盘类型,`data` 数据盘 `system` 系统盘

    返回值示例

    {
      "data": {
        "_id": "5fca940543c29c4c46b79229",
        "uid": 123,
        "region_id": "cn-shanghai",
        "snapshot_id": "s-uf67**",
        "snapshot_name": "Created from i-uf6**",
        "description": "Created from i-uf6**",
        "status": "accomplished",
        "progress": "100%",
        "source_disk_id": "d-uf62**",
        "source_disk_name": "ox2**",
        "source_disk_type": "system",
        "source_disk_size": 40,
        "created_at": "2020-12-05T03:54:45.826+08:00",
        "updated_at": "2020-12-05T03:54:49.232+08:00"
      },
      "request_id": "N8cGF3EvRnQOSFMW"
    }
    
    以上内容是否对您有帮助?
  • Qvm free helper
    Close