github.com/morlay/goqcloud@v0.0.0-20181123023149-b00e0b0b9afc/clients/dts/describe_sync_jobs.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/18570
     9  
    10  type DescribeSyncJobsRequest struct {
    11  	// 灾备同步任务ID
    12  	JobId *string `name:"JobId,omitempty"`
    13  	// 灾备同步任务名
    14  	JobName *string `name:"JobName,omitempty"`
    15  	// 返回实例数量,默认20,有效区间[1,100]
    16  	Limit *int64 `name:"Limit,omitempty"`
    17  	// 偏移量,默认为0
    18  	Offset *int64 `name:"Offset,omitempty"`
    19  	// 排序字段,可以取值为JobId、Status、JobName、CreateTime
    20  	Order *string `name:"Order,omitempty"`
    21  	// 排序方式,升序为ASC,降序为DESC
    22  	OrderSeq *string `name:"OrderSeq,omitempty"`
    23  	// 区域
    24  	Region string `name:"Region"`
    25  }
    26  
    27  func (req *DescribeSyncJobsRequest) Invoke(client github_com_morlay_goqcloud.Client) (*DescribeSyncJobsResponse, error) {
    28  	resp := &DescribeSyncJobsResponse{}
    29  	err := client.Request("dts", "DescribeSyncJobs", "2018-03-30").Do(req, resp)
    30  	return resp, err
    31  }
    32  
    33  type DescribeSyncJobsResponse struct {
    34  	github_com_morlay_goqcloud.TencentCloudBaseResponse
    35  	// 任务详情数组
    36  	JobList []*SyncJobInfo `json:"JobList"`
    37  	// 任务数目
    38  	TotalCount int64 `json:"TotalCount"`
    39  }