github.com/morlay/goqcloud@v0.0.0-20181123023149-b00e0b0b9afc/clients/cdb/upgrade_db_instance_engine_version.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/15870 9 10 type UpgradeDbInstanceEngineVersionRequest struct { 11 // 主实例数据库引擎版本,支持值包括:5.6和5.7 12 EngineVersion string `name:"EngineVersion"` 13 // 实例ID,格式如:cdb-c1nl9rpv或者cdbro-c1nl9rpv。与云数据库控制台页面中显示的实例ID相同,可使用查询实例列表 接口获取,其值为输出参数中字段 InstanceId 的值 14 InstanceId string `name:"InstanceId"` 15 // 区域 16 Region string `name:"Region"` 17 // 切换访问新实例的方式,默认为0,升级主实例时,可指定该参数,升级只读实例或者灾备实例时指定该参数无意义,支持值包括:0-立刻切换,1-时间窗切换;当该值为1时,升级中过程中,切换访问新实例的流程将会在时间窗内进行,或者用户主动调用接口切换访问新实例触发该流程 18 WaitSwitch *int64 `name:"WaitSwitch,omitempty"` 19 } 20 21 func (req *UpgradeDbInstanceEngineVersionRequest) Invoke(client github_com_morlay_goqcloud.Client) (*UpgradeDbInstanceEngineVersionResponse, error) { 22 resp := &UpgradeDbInstanceEngineVersionResponse{} 23 err := client.Request("cdb", "UpgradeDBInstanceEngineVersion", "2017-03-20").Do(req, resp) 24 return resp, err 25 } 26 27 type UpgradeDbInstanceEngineVersionResponse struct { 28 github_com_morlay_goqcloud.TencentCloudBaseResponse 29 // 异步任务ID,可使用查询任务列表获取其执行情况 30 AsyncRequestId string `json:"AsyncRequestId"` 31 }