Documentation
¶
Index ¶
Constants ¶
View Source
const APIVersion = "2018-07-24"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewClient ¶
func NewClient(credential *common.Credential, region string, clientProfile *profile.ClientProfile) (client *Client, err error)
func NewClientWithSecretId ¶
Deprecated
func (*Client) DescribeBaseMetrics ¶
func (c *Client) DescribeBaseMetrics(request *DescribeBaseMetricsRequest) (response *DescribeBaseMetricsResponse, err error)
获取基础指标详情
func (*Client) GetMonitorData ¶
func (c *Client) GetMonitorData(request *GetMonitorDataRequest) (response *GetMonitorDataResponse, err error)
获取云产品的监控数据。传入产品的命名空间、对象维度描述和监控指标即可获得相应的监控数据。 接口调用频率限制为:20次/秒,1200次/分钟。 若您需要调用的指标、对象较多,可能存在因限频出现拉取失败的情况,建议尽量将请求按时间维度均摊。
type DescribeBaseMetricsRequest ¶
type DescribeBaseMetricsRequest struct {
*tchttp.BaseRequest
// 业务命名空间
Namespace *string `json:"Namespace" name:"Namespace"`
// 指标名
MetricName *string `json:"MetricName" name:"MetricName"`
}
func NewDescribeBaseMetricsRequest ¶
func NewDescribeBaseMetricsRequest() (request *DescribeBaseMetricsRequest)
func (*DescribeBaseMetricsRequest) FromJsonString ¶
func (r *DescribeBaseMetricsRequest) FromJsonString(s string) error
func (*DescribeBaseMetricsRequest) ToJsonString ¶
func (r *DescribeBaseMetricsRequest) ToJsonString() string
type DescribeBaseMetricsResponse ¶
type DescribeBaseMetricsResponse struct {
*tchttp.BaseResponse
Response *struct {
// 查询得到的指标描述列表
MetricSet []*MetricSet `json:"MetricSet" name:"MetricSet" list`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId" name:"RequestId"`
} `json:"Response"`
}
func NewDescribeBaseMetricsResponse ¶
func NewDescribeBaseMetricsResponse() (response *DescribeBaseMetricsResponse)
func (*DescribeBaseMetricsResponse) FromJsonString ¶
func (r *DescribeBaseMetricsResponse) FromJsonString(s string) error
func (*DescribeBaseMetricsResponse) ToJsonString ¶
func (r *DescribeBaseMetricsResponse) ToJsonString() string
type DimensionsDesc ¶
type DimensionsDesc struct {
// 维度名数组
Dimensions []*string `json:"Dimensions" name:"Dimensions" list`
}
type GetMonitorDataRequest ¶
type GetMonitorDataRequest struct {
*tchttp.BaseRequest
// 命名空间,每个云产品会有一个命名空间
Namespace *string `json:"Namespace" name:"Namespace"`
// 指标名称
MetricName *string `json:"MetricName" name:"MetricName"`
// 实例对象的维度组合
Instances []*Instance `json:"Instances" name:"Instances" list`
// 监控统计周期。默认为取值为300,单位为s
Period *uint64 `json:"Period" name:"Period"`
// 起始时间,如2018-09-22T19:51:23+08:00
StartTime *string `json:"StartTime" name:"StartTime"`
// 结束时间,默认为当前时间。 EndTime不能小于EtartTime
EndTime *string `json:"EndTime" name:"EndTime"`
}
func NewGetMonitorDataRequest ¶
func NewGetMonitorDataRequest() (request *GetMonitorDataRequest)
func (*GetMonitorDataRequest) FromJsonString ¶
func (r *GetMonitorDataRequest) FromJsonString(s string) error
func (*GetMonitorDataRequest) ToJsonString ¶
func (r *GetMonitorDataRequest) ToJsonString() string
type GetMonitorDataResponse ¶
type GetMonitorDataResponse struct {
*tchttp.BaseResponse
Response *struct {
// 统计周期
Period *uint64 `json:"Period" name:"Period"`
// 指标名
MetricName *string `json:"MetricName" name:"MetricName"`
// 数据点数组
DataPoints []*DataPoint `json:"DataPoints" name:"DataPoints" list`
// 开始时间
StartTime *string `json:"StartTime" name:"StartTime"`
// 结束时间
EndTime *string `json:"EndTime" name:"EndTime"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId" name:"RequestId"`
} `json:"Response"`
}
func NewGetMonitorDataResponse ¶
func NewGetMonitorDataResponse() (response *GetMonitorDataResponse)
func (*GetMonitorDataResponse) FromJsonString ¶
func (r *GetMonitorDataResponse) FromJsonString(s string) error
func (*GetMonitorDataResponse) ToJsonString ¶
func (r *GetMonitorDataResponse) ToJsonString() string
type Instance ¶
type Instance struct {
// 实例的维度组合
Dimensions []*Dimension `json:"Dimensions" name:"Dimensions" list`
}
type MetricObjectMeaning ¶
type MetricSet ¶
type MetricSet struct {
// 命名空间,每个云产品会有一个命名空间
Namespace *string `json:"Namespace" name:"Namespace"`
// 指标名称
MetricName *string `json:"MetricName" name:"MetricName"`
// 指标使用的单位
Unit *string `json:"Unit" name:"Unit"`
// 指标使用的单位
UnitCname *string `json:"UnitCname" name:"UnitCname"`
// 指标支持的统计周期,单位是秒,如60、300
Period []*int64 `json:"Period" name:"Period" list`
// 统计周期内指标方式
Periods []*PeriodsSt `json:"Periods" name:"Periods" list`
// 统计指标含义解释
Meaning *MetricObjectMeaning `json:"Meaning" name:"Meaning"`
// 维度描述信息
Dimensions []*DimensionsDesc `json:"Dimensions" name:"Dimensions" list`
}
Click to show internal directories.
Click to hide internal directories.