github.com/morlay/goqcloud@v0.0.0-20181123023149-b00e0b0b9afc/clients/sqlserver/create_backup.go (about) 1 package sqlserver 2 3 import ( 4 github_com_morlay_goqcloud "github.com/morlay/goqcloud" 5 ) 6 7 // 创建备份 8 // https://cloud.tencent.com/document/api/238/19946 9 10 type CreateBackupRequest struct { 11 // 需要备份库名的列表(多库备份才填写) 12 DBNames []*string `name:"DBNames,omitempty"` 13 // 实例ID,形如mssql-i1z41iwd 14 InstanceId *string `name:"InstanceId,omitempty"` 15 // 区域 16 Region string `name:"Region"` 17 // 备份策略(0-实例备份 1-多库备份) 18 Strategy *int64 `name:"Strategy,omitempty"` 19 } 20 21 func (req *CreateBackupRequest) Invoke(client github_com_morlay_goqcloud.Client) (*CreateBackupResponse, error) { 22 resp := &CreateBackupResponse{} 23 err := client.Request("sqlserver", "CreateBackup", "2018-03-28").Do(req, resp) 24 return resp, err 25 } 26 27 type CreateBackupResponse struct { 28 github_com_morlay_goqcloud.TencentCloudBaseResponse 29 // 异步任务ID 30 FlowId int64 `json:"FlowId"` 31 }