Create Aggregation Index

Last updated: 2019-11-29 19:19:12


1. API Description

This API (CreateMetricAggeration) is used to add metric aggregation. To aggregate the specified dimensions under the metric to achieve features that can collect or query information of a certain group of dimensions under the metric.
For example: The metric diskusage has the dimension dimensionNames.0=ip dimensionNames.1=diskname
You can specify dimension IP only when you aggregate the dimension dimensionNames.0=ip and call the API "Add Statistical Type". Here, the disk utilization is calculated using machine IP dimension.

Domain name:

2. Input Parameters

Parameter Name Required Type Description
namespace Yes String Namespace, which can be queried by calling the API Query Namespace (DescribeNamespace)
metricName Yes String Metric name, which can be queried by calling the API Query Metric (DescribeMetric)
dimensionNames.n Yes String Name of dimension to be aggregated. It can be queried by calling the API Query Metric (DescribeMetric)
statisticsType.m.period No Int Statistical period. Currently you can only enter 300 seconds
statisticsType.m.statistics No String Statistical type added for the aggregation dimension, such as max, min, last, sum, avg, etc

Add statistical types for all dimensions under the aggregation when you enter statisticsType.m.statistics and statisticsType.m.period

3. Output Parameters

Parameter Name Type Description
code Int Error code, 0: Successful; other values: Failed. For more information, please see Error Codes
message String Error message

4. Error Codes

Error Code Error Description Error Message
-503 Incorrect request parameter InvalidParameter
-505 Parameter is missing InvalidParameter.MissingParameter
-507 Limit has been exceeded OperationDenied.ExceedLimit
-509 Incorrect dimension group InvalidParameter.DimensionGroupError
-513 DB operation failed InternalError.DBoperationFail
-514 Resource already exists OperationDenied.SourceAlreadyExists

5. Example

&<Common request parameters>