public static final class DescribeMetricTopRequest.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
DescribeMetricTopRequest |
build() |
DescribeMetricTopRequest.Builder |
dimensions(String dimensions)
The monitoring dimensions of the specified resource.
|
DescribeMetricTopRequest.Builder |
endTime(String endTime)
The end of the time range to query monitoring data.
|
DescribeMetricTopRequest.Builder |
express(String express)
The expression that is used to compute the query results in real time.
|
DescribeMetricTopRequest.Builder |
length(String length)
The number of entries per page.
|
DescribeMetricTopRequest.Builder |
metricName(String metricName)
The metric that is used to monitor the cloud service.
|
DescribeMetricTopRequest.Builder |
namespace(String namespace)
The namespace of the cloud service.
|
DescribeMetricTopRequest.Builder |
orderby(String orderby)
The field based on which data is sorted.
|
DescribeMetricTopRequest.Builder |
orderDesc(String orderDesc)
The order in which data is sorted.
|
DescribeMetricTopRequest.Builder |
period(String period)
The statistical period of the monitoring data.
|
DescribeMetricTopRequest.Builder |
startTime(String startTime)
The start of the time range to query monitoring data.
|
public DescribeMetricTopRequest.Builder dimensions(String dimensions)
The monitoring dimensions of the specified resource.
Set the value to a collection of key:value pairs. Example: {"userId":"120886317861****"} or {"instanceId":"i-2ze2d6j5uhg20x47****"}.
example:You can query a maximum of 50 instances in each request.
[{"instanceId": "i-abcdefgh12****"}]
public DescribeMetricTopRequest.Builder endTime(String endTime)
The end of the time range to query monitoring data.
If the StartTime and EndTime parameters are not specified, the monitoring data of the last statistical period is queried.``
If the StartTime and EndTime parameters are specified, the monitoring data of the last statistical period in the specified time range is queried.````
Period parameter to 15, the specified time range must be less than or equal to 20 minutes. For example, if you set the StartTime parameter to 2021-05-08 08:10:00 and the EndTime parameter to 2021-05-08 08:30:00, the monitoring data of the last 15 seconds in the time range is queried.Period parameter to 60 or 900, the specified time range must be less than or equal to 2 hours. For example, if you set the Period parameter to 60, the StartTime parameter to 2021-05-08 08:00:00, and the EndTime parameter to 2021-05-08 10:00:00, the monitoring data of the last 60 seconds in the time range is queried.Period parameter to 3600, the specified time range must be less than or equal to two days. For example, if you set the StartTime parameter to 2021-05-08 08:00:00 and the EndTime parameter to 2021-05-10 08:00:00, the monitoring data of the last 3,600 seconds in the time range is queried.The following formats are supported:
example:We recommend that you use UNIX timestamps to prevent time zone-related issues.
2021-05-08 10:00:00
public DescribeMetricTopRequest.Builder express(String express)
The expression that is used to compute the query results in real time.
example:Only the
groupbyexpression is supported. This expression is similar to the GROUP BY statement used in databases.
{"groupby":["userId","instanceId"]}
public DescribeMetricTopRequest.Builder length(String length)
The number of entries per page.
Default value: 10.
example:The maximum value of the Length parameter in a request is 1440.
10
public DescribeMetricTopRequest.Builder metricName(String metricName)
The metric that is used to monitor the cloud service.
For more information about metric names, see Appendix 1: Metrics.
This parameter is required.
example:cpu_idle
public DescribeMetricTopRequest.Builder namespace(String namespace)
The namespace of the cloud service.
For more information about the namespaces of cloud services, see Appendix 1: Metrics.
This parameter is required.
example:acs_ecs_dashboard
public DescribeMetricTopRequest.Builder orderDesc(String orderDesc)
The order in which data is sorted. Valid values:
False
public DescribeMetricTopRequest.Builder orderby(String orderby)
The field based on which data is sorted. Valid values:
This parameter is required.
example:Average
public DescribeMetricTopRequest.Builder period(String period)
The statistical period of the monitoring data.
Valid values: 15, 60, 900, and 3600.
Unit: seconds.
If this parameter is not specified, monitoring data is queried based on the period in which metric values are reported.
Statistical periods vary based on the metrics that are specified by MetricName. For more information, see Appendix 1: Metrics.
60
public DescribeMetricTopRequest.Builder startTime(String startTime)
The start of the time range to query monitoring data.
If the StartTime and EndTime parameters are not specified, the monitoring data of the last statistical period is queried.``
If the StartTime and EndTime parameters are specified, the monitoring data of the last statistical period in the specified time range is queried.````
Period parameter to 15, the specified time range must be less than or equal to 20 minutes. For example, if you set the StartTime parameter to 2021-05-08 08:10:00 and the EndTime parameter to 2021-05-08 08:30:00, the monitoring data of the last 15 seconds in the time range is queried.Period parameter to 60 or 900, the specified time range must be less than or equal to 2 hours. For example, if you set the Period parameter to 60, the StartTime parameter to 2021-05-08 08:00:00, and the EndTime parameter to 2021-05-08 10:00:00, the monitoring data of the last 60 seconds in the time range is queried.Period parameter to 3600, the specified time range must be less than or equal to two days. For example, if you set the StartTime parameter to 2021-05-08 08:00:00 and the EndTime parameter to 2021-05-10 08:00:00, the monitoring data of the last 3,600 seconds in the time range is queried.The following formats are supported:
You must set the StartTime parameter to a point in time that is later than 00:00:00 Thursday, January 1, 1970. Otherwise, this parameter is invalid.
We recommend that you use UNIX timestamps to prevent time zone-related issues.
2021-05-08 08:00:00
public DescribeMetricTopRequest build()
Copyright © 2026. All rights reserved.