查询资源监控指标。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
MetricName |
string |
是 |
指标名称。可选的值有:
|
disk_bps_percent |
StartTime |
string |
否 |
获取指标数据的起始时间点。最远可选当前时刻过去 30 天内的时刻作为起始时间点。当 StartTime 和 EndTime 参数都为空时,默认查询最近一个 period 的监控指标。按照 ISO 8601 标准表示,并使用 UTC +0 时间,格式为 yyyy-MM-ddTHH:mm:ssZ。 |
2023-11-21T01:50:00Z |
EndTime |
string |
否 |
获取指标数据的结束时间点。不应大于当前时刻。按照 ISO 8601 标准表示,并使用 UTC +0 时间,格式为 yyyy-MM-ddTHH:mm:ssZ。 |
2023-11-21T02:00:00Z |
Period |
integer |
否 |
获取指标数据的间隔时间。单位:秒。默认值为 5 秒。可选的取值:
|
60 |
Dimensions |
string |
否 |
维度 Map,JSON 格式,表示查询的维度,当前可选的键为:
返回结果取所有维度筛选条件的交集。 |
{"DiskId":["d-bp14xxxx","d-bp11xxxx"], "DeviceCategory": ["cloud_essd"]} |
RegionId |
string |
否 |
地域 ID。 |
cn-shanghai |
AggreOps |
string |
否 |
时间维度聚合方式。可选的值有:
|
AVG_OVER_TIME |
AggreOverLineOps |
string |
否 |
线之间的聚合方式。可选的值有:
|
NON |
GroupByLabels |
array |
否 |
用于分组聚合的字段列表。 |
|
string |
否 |
用于分组的字段。可选的字段有:
|
DeviceType |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
DescribeMetricDataResponse |
||
TotalCount |
integer |
查询到的数据总数。 |
1 |
DataList |
array<object> |
云盘的监控数据集合。 |
|
object |
返回数据列表。 |
||
Labels |
any |
标签。 |
{"DiskId": "d-1234"} |
Datapoints |
any |
监控数据列表,一系列连续的秒级时间戳和查询的指标对应时刻的值的列表。 |
{"1699258861": 1,"1699259461": 0} |
RequestId |
string |
请求 ID。 |
11B55F58-D3A4-4A9B-9596-342420D0**** |
Warnings |
array |
警告信息列表。 |
|
string |
警告信息。 |
not complete. |
示例
正常返回示例
JSON
格式
{
"TotalCount": 1,
"DataList": [
{
"Labels": "{\"DiskId\": \"d-1234\"}",
"Datapoints": "{\"1699258861\": 1,\"1699259461\": 0}"
}
],
"RequestId": "11B55F58-D3A4-4A9B-9596-342420D0****",
"Warnings": [
"not complete."
]
}
错误码
HTTP status code |
错误码 |
错误信息 |
描述 |
---|---|---|---|
400 | InvalidParameter | The parameter %s is invalid. | 参数错误 |
400 | InvalidParameter.Conflict | The specified parameter %s and %s are not blank at the same time. | 参数冲突 |
400 | InvalidParameter.Format | Specified parameter format is not valid. | 返回值格式不正确(Format 不支持)。返回格式支持 XML 与 JSON,默认为 XML。 |
400 | MissingParameter | The input parameter %s that is mandatory for processing this request is not supplied. | 参数缺失。 |
500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | 内部错误。 |
403 | Forbidden | User is not authorized to operate. | 当前用户无权限对当前资源执行任何操作。请检查您的账号权限或者咨询您的主账号管理员。 |
403 | Forbidden.Action | User is not authorized to operate this action. | 当前用户无权限执行该操作。请检查您的账号权限或者咨询您的主账号管理员。 |
403 | InvalidAccountStatus.NotEnoughBalance | Your account does not have enough balance. | 您的账户余额不足。 |
403 | LastTokenProcessing | The last token request is processing. | 相同clientToken的请求正在执行,请稍后再重试。 |
403 | NoPermission.SLR | The RAM user does not have the permission to create service linked role: AliyunServiceLinkedRoleForEBS. | 当前用户无权限创建SLR。 |
403 | OperationDenied | The operation is not allowed. | 当前操作不允许执行。 |
404 | InvalidApi.NotFound | Specified api is not found, please check your url and method. | |
404 | NoSuchResource | The specified resource does not exist. | 指定的资源不存在。 |
504 | RequestTimeout | The request is timeout, please try again later. | 该请求超时,请稍后再重试。 |
429 | BLOCK.LimitedRequest | Request was denied due to user flow control. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。