github.com/morlay/goqcloud@v0.0.0-20181123023149-b00e0b0b9afc/clients/cdb/create_backup.go (about) 1 package cdb 2 3 import ( 4 github_com_morlay_goqcloud "github.com/morlay/goqcloud" 5 ) 6 7 // 创建云数据库备份 8 // https://cloud.tencent.com/document/api/236/15844 9 10 type CreateBackupRequest struct { 11 // 目标备份方法,可选的值:logical - 逻辑冷备,physical - 物理冷备。 12 BackupMethod string `name:"BackupMethod"` 13 // 实例ID,格式如:cdb-c1nl9rpv。与云数据库控制台页面中显示的实例ID相同。 14 InstanceId string `name:"InstanceId"` 15 // 区域 16 Region string `name:"Region"` 17 } 18 19 func (req *CreateBackupRequest) Invoke(client github_com_morlay_goqcloud.Client) (*CreateBackupResponse, error) { 20 resp := &CreateBackupResponse{} 21 err := client.Request("cdb", "CreateBackup", "2017-03-20").Do(req, resp) 22 return resp, err 23 } 24 25 type CreateBackupResponse struct { 26 github_com_morlay_goqcloud.TencentCloudBaseResponse 27 // 备份任务ID。 28 BackupId int64 `json:"BackupId"` 29 }