github.com/morlay/goqcloud@v0.0.0-20181123023149-b00e0b0b9afc/clients/cbs/apply_snapshot.go (about)

     1  package cbs
     2  
     3  import (
     4  	github_com_morlay_goqcloud "github.com/morlay/goqcloud"
     5  )
     6  
     7  // 回滚快照
     8  // https://cloud.tencent.com/document/api/362/15643
     9  
    10  type ApplySnapshotRequest struct {
    11  	// 快照原云硬盘ID,可通过DescribeDisks接口查询。
    12  	DiskId string `name:"DiskId"`
    13  	// 区域
    14  	Region string `name:"Region"`
    15  	// 快照ID, 可通过DescribeSnapshots查询。
    16  	SnapshotId string `name:"SnapshotId"`
    17  }
    18  
    19  func (req *ApplySnapshotRequest) Invoke(client github_com_morlay_goqcloud.Client) (*ApplySnapshotResponse, error) {
    20  	resp := &ApplySnapshotResponse{}
    21  	err := client.Request("cbs", "ApplySnapshot", "2017-03-12").Do(req, resp)
    22  	return resp, err
    23  }
    24  
    25  type ApplySnapshotResponse struct {
    26  	github_com_morlay_goqcloud.TencentCloudBaseResponse
    27  }