github.com/morlay/goqcloud@v0.0.0-20181123023149-b00e0b0b9afc/clients/dts/modify_migrate_job.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/18138
     9  
    10  type ModifyMigrateJobRequest struct {
    11  	// 当选择'指定库表'迁移的时候, 需要设置待迁移的源数据库表信息,用符合json数组格式的字符串描述, 如下所例。对于database-table两级结构的数据库:[{"Database":"db1","Table":["table1","table2"]},{"Database":"db2"}]对于database-schema-table三级结构:[{"Database":"db1","Schema":"s1","Table":["table1","table2"]},{"Database":"db1","Schema":"s2","Table":["table1","table2"]},{"Database":"db2","Schema":"s1","Table":["table1","table2"]},{"Database":"db3"},{"Database":"db4","Schema":"s1"}]如果是'整个实例'的迁移模式,不需设置该字段
    12  	DatabaseInfo *string `name:"DatabaseInfo,omitempty"`
    13  	// 目标实例接入类型,值包括:extranet(外网),cvm(cvm自建实例),dcg(专线接入的实例),vpncloud(云vpn接入的实例),vpnselfbuild(自建vpn接入的实例),cdb(云上cdb实例). 目前只支持cdb.
    14  	DstAccessType *string `name:"DstAccessType,omitempty"`
    15  	// 目标实例信息, 其中目标实例地域不允许修改.
    16  	DstInfo *DstInfo `name:"DstInfo,omitempty"`
    17  	// 待修改的数据迁移任务ID
    18  	JobId string `name:"JobId"`
    19  	// 数据迁移任务名称
    20  	JobName *string `name:"JobName,omitempty"`
    21  	// 迁移任务配置选项
    22  	MigrateOption *MigrateOption `name:"MigrateOption,omitempty"`
    23  	// 区域
    24  	Region string `name:"Region"`
    25  	// 源实例接入类型,值包括:extranet(外网),cvm(cvm自建实例),dcg(专线接入的实例),vpncloud(云vpn接入的实例),vpnselfbuild(自建vpn接入的实例),cdb(云上cdb实例)
    26  	SrcAccessType *string `name:"SrcAccessType,omitempty"`
    27  	// 源实例信息,具体内容跟迁移任务类型相关
    28  	SrcInfo *SrcInfo `name:"SrcInfo,omitempty"`
    29  }
    30  
    31  func (req *ModifyMigrateJobRequest) Invoke(client github_com_morlay_goqcloud.Client) (*ModifyMigrateJobResponse, error) {
    32  	resp := &ModifyMigrateJobResponse{}
    33  	err := client.Request("dts", "ModifyMigrateJob", "2018-03-30").Do(req, resp)
    34  	return resp, err
    35  }
    36  
    37  type ModifyMigrateJobResponse struct {
    38  	github_com_morlay_goqcloud.TencentCloudBaseResponse
    39  }