github.com/morlay/goqcloud@v0.0.0-20181123023149-b00e0b0b9afc/clients/es/describe_instances.go (about) 1 package es 2 3 import ( 4 github_com_morlay_goqcloud "github.com/morlay/goqcloud" 5 ) 6 7 // 查询ES集群实例 8 // https://cloud.tencent.com/document/api/845/30631 9 10 type DescribeInstancesRequest struct { 11 // 一个或多个集群实例ID 12 InstanceIds []*string `name:"InstanceIds,omitempty"` 13 // 一个或多个集群实例名称 14 InstanceNames []*string `name:"InstanceNames,omitempty"` 15 // 分页大小,默认值20 16 Limit *int64 `name:"Limit,omitempty"` 17 // 分页起始值, 默认值0 18 Offset *int64 `name:"Offset,omitempty"` 19 // 排序字段:1,实例ID;2,实例名称;3,可用区;4,创建时间,若orderKey未传递则按创建时间降序排序 20 OrderByKey *int64 `name:"OrderByKey,omitempty"` 21 // 排序方式:0,升序;1,降序;若传递了orderByKey未传递orderByType, 则默认升序 22 OrderByType *int64 `name:"OrderByType,omitempty"` 23 // 区域 24 Region string `name:"Region"` 25 // 集群实例所属可用区,不传则默认所有可用区 26 Zone *string `name:"Zone,omitempty"` 27 } 28 29 func (req *DescribeInstancesRequest) Invoke(client github_com_morlay_goqcloud.Client) (*DescribeInstancesResponse, error) { 30 resp := &DescribeInstancesResponse{} 31 err := client.Request("es", "DescribeInstances", "2018-04-16").Do(req, resp) 32 return resp, err 33 } 34 35 type DescribeInstancesResponse struct { 36 github_com_morlay_goqcloud.TencentCloudBaseResponse 37 // 实例详细信息列表 38 InstanceList []*InstanceInfo `json:"InstanceList"` 39 // 返回的实例个数 40 TotalCount int64 `json:"TotalCount"` 41 }