github.com/morlay/goqcloud@v0.0.0-20181123023149-b00e0b0b9afc/clients/sqlserver/describe_slowlogs.go (about) 1 package sqlserver 2 3 import ( 4 github_com_morlay_goqcloud "github.com/morlay/goqcloud" 5 time "time" 6 ) 7 8 // 获取慢查询日志文件信息 9 // https://cloud.tencent.com/document/api/238/19936 10 11 type DescribeSlowlogsRequest struct { 12 // 查询结束时间 13 EndTime time.Time `name:"EndTime"` 14 // 实例ID,形如mssql-k8voqdlz 15 InstanceId string `name:"InstanceId"` 16 // 分页返回结果,分页大小,默认20,不超过100 17 Limit *int64 `name:"Limit,omitempty"` 18 // 从第几页开始返回,起始页,从0开始,默认为0 19 Offset *int64 `name:"Offset,omitempty"` 20 // 区域 21 Region string `name:"Region"` 22 // 查询开始时间 23 StartTime time.Time `name:"StartTime"` 24 } 25 26 func (req *DescribeSlowlogsRequest) Invoke(client github_com_morlay_goqcloud.Client) (*DescribeSlowlogsResponse, error) { 27 resp := &DescribeSlowlogsResponse{} 28 err := client.Request("sqlserver", "DescribeSlowlogs", "2018-03-28").Do(req, resp) 29 return resp, err 30 } 31 32 type DescribeSlowlogsResponse struct { 33 github_com_morlay_goqcloud.TencentCloudBaseResponse 34 // 慢查询日志信息列表 35 Slowlogs []*SlowlogInfo `json:"Slowlogs"` 36 // 查询总数 37 TotalCount int64 `json:"TotalCount"` 38 }