github.com/morlay/goqcloud@v0.0.0-20181123023149-b00e0b0b9afc/clients/tia/list_jobs.go (about) 1 package tia 2 3 import ( 4 github_com_morlay_goqcloud "github.com/morlay/goqcloud" 5 ) 6 7 // 列举Job 8 // https://cloud.tencent.com/document/api/851/18305 9 10 type ListJobsRequest struct { 11 // 运行任务的集群 12 Cluster string `name:"Cluster"` 13 // 分页参数,返回数量 14 Limit *int64 `name:"Limit,omitempty"` 15 // 分页参数,起始位置 16 Offset *int64 `name:"Offset,omitempty"` 17 // 区域 18 Region string `name:"Region"` 19 } 20 21 func (req *ListJobsRequest) Invoke(client github_com_morlay_goqcloud.Client) (*ListJobsResponse, error) { 22 resp := &ListJobsResponse{} 23 err := client.Request("tia", "ListJobs", "2018-02-26").Do(req, resp) 24 return resp, err 25 } 26 27 type ListJobsResponse struct { 28 github_com_morlay_goqcloud.TencentCloudBaseResponse 29 // 训练任务列表 30 Jobs []*Job `json:"Jobs"` 31 }