github.com/morlay/goqcloud@v0.0.0-20181123023149-b00e0b0b9afc/clients/sqlserver/modify_migration.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/19940
     9  
    10  type ModifyMigrationRequest struct {
    11  	// 迁移DB对象 ,离线迁移(SourceType=4或SourceType=5)不使用,若不填则不修改
    12  	MigrateDBSet []*MigrateDB `name:"MigrateDBSet,omitempty"`
    13  	// 迁移任务ID
    14  	MigrateId int64 `name:"MigrateId"`
    15  	// 新的迁移任务的名称,若不填则不修改
    16  	MigrateName *string `name:"MigrateName,omitempty"`
    17  	// 新的迁移类型(1:结构迁移 2:数据迁移 3:增量同步),若不填则不修改
    18  	MigrateType *int64 `name:"MigrateType,omitempty"`
    19  	// 区域
    20  	Region string `name:"Region"`
    21  	// 迁移源,若不填则不修改
    22  	Source *MigrateSource `name:"Source,omitempty"`
    23  	// 迁移源的类型 1:CDB for SQLServer 2:云服务器自建SQLServer数据库 4:SQLServer备份还原 5:SQLServer备份还原(COS方式),若不填则不修改
    24  	SourceType *int64 `name:"SourceType,omitempty"`
    25  	// 迁移目标,若不填则不修改
    26  	Target *MigrateTarget `name:"Target,omitempty"`
    27  }
    28  
    29  func (req *ModifyMigrationRequest) Invoke(client github_com_morlay_goqcloud.Client) (*ModifyMigrationResponse, error) {
    30  	resp := &ModifyMigrationResponse{}
    31  	err := client.Request("sqlserver", "ModifyMigration", "2018-03-28").Do(req, resp)
    32  	return resp, err
    33  }
    34  
    35  type ModifyMigrationResponse struct {
    36  	github_com_morlay_goqcloud.TencentCloudBaseResponse
    37  	// 迁移任务ID
    38  	MigrateId int64 `json:"MigrateId"`
    39  }