Documentation ¶
Index ¶
Constants ¶
View Source
const ( // GetMetricDataPath userId - scope - metricName GetMetricDataPath = "/json-api/v1/metricdata/%s/%s/%s" // BatchMetricDataPath userId - scope BatchMetricDataPath = "/json-api/v1/metricdata/metricName/%s/%s" Average = "average" Maximum = "maximum" Minimum = "minimum" Sum = "sum" SampleCount = "sampleCount" )
View Source
const ( ProductName = "bcm" DefaultBcmEndpoint = ProductName + "." + bce.DEFAULT_REGION + "." + bce.DEFAULT_DOMAIN )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchGetMetricDataRequest ¶
type BatchGetMetricDataRequest struct { UserId string `json:"userId,omitempty"` Scope string `json:"scope,omitempty"` MetricNames []string `json:"metricNames,omitempty"` Dimensions map[string]string `json:"dimensions,omitempty"` Statistics []string `json:"statistics,omitempty"` StartTime string `json:"startTime,omitempty"` EndTime string `json:"endTime,omitempty"` PeriodInSecond int `json:"periodInSecond,omitempty"` }
type BatchGetMetricDataResponse ¶
type BatchGetMetricDataResponse struct { RequestId string `json:"requestId,omitempty"` Code string `json:"code,omitempty"` Message string `json:"message,omitempty"` SuccessList []*SuccessBatchGetMetricData `json:"successList,omitempty"` ErrorList []*ErrorBatchGetMetricData `json:"errorList,omitempty"` }
type Client ¶
Client of BCM service is a kind of BceClient, so derived from BceClient
func NewClient ¶
NewClient make the bcm service client with default configuration. Use `cli.Config.xxx` to access the config or change it to non-default value.
func (*Client) BatchGetMetricData ¶
func (c *Client) BatchGetMetricData(req *BatchGetMetricDataRequest) (*BatchGetMetricDataResponse, error)
BatchGetMetricData batch get metric data
func (*Client) GetMetricData ¶
func (c *Client) GetMetricData(req *GetMetricDataRequest) (*GetMetricDataResponse, error)
GetMetricData get metric data
type DataPoints ¶
type ErrorBatchGetMetricData ¶
type GetMetricDataRequest ¶
type GetMetricDataRequest struct { UserId string `json:"userId,omitempty"` Scope string `json:"scope,omitempty"` MetricName string `json:"metricName,omitempty"` Dimensions map[string]string `json:"dimensions,omitempty"` Statistics []string `json:"statistics,omitempty"` StartTime string `json:"startTime,omitempty"` EndTime string `json:"endTime,omitempty"` PeriodInSecond int `json:"periodInSecond,omitempty"` }
type GetMetricDataResponse ¶
type GetMetricDataResponse struct { RequestId string `json:"requestId,omitempty"` Code string `json:"code,omitempty"` Message string `json:"message,omitempty"` DataPoints []*DataPoints `json:"dataPoints,omitempty"` }
type SuccessBatchGetMetricData ¶
type SuccessBatchGetMetricData struct { MetricName string `json:"metricName,omitempty"` Dimensions []*Dimension `json:"dimensions,omitempty"` DataPoints []*DataPoints `json:"dataPoints,omitempty"` }
Click to show internal directories.
Click to hide internal directories.