github.com/morlay/goqcloud@v0.0.0-20181123023149-b00e0b0b9afc/clients/dts/switch_dr_to_master.go (about) 1 package dts 2 3 import ( 4 github_com_morlay_goqcloud "github.com/morlay/goqcloud" 5 ) 6 7 // 灾备升级为主实例 8 // https://cloud.tencent.com/document/api/571/18567 9 10 type SwitchDrToMasterRequest struct { 11 // 数据库的类型 (如 mysql) 12 DatabaseType string `name:"DatabaseType"` 13 // 灾备实例的信息 14 DstInfo SyncInstanceInfo `name:"DstInfo"` 15 // 区域 16 Region string `name:"Region"` 17 } 18 19 func (req *SwitchDrToMasterRequest) Invoke(client github_com_morlay_goqcloud.Client) (*SwitchDrToMasterResponse, error) { 20 resp := &SwitchDrToMasterResponse{} 21 err := client.Request("dts", "SwitchDrToMaster", "2018-03-30").Do(req, resp) 22 return resp, err 23 } 24 25 type SwitchDrToMasterResponse struct { 26 github_com_morlay_goqcloud.TencentCloudBaseResponse 27 // 后台异步任务请求id 28 AsyncRequestId string `json:"AsyncRequestId"` 29 }