Queries the amount of data written to Application Monitoring, Managed Service for OpenTelemetry, Managed Service for Prometheus, and Real User Monitoring (RUM).
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
arms:QueryCommercialUsage | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
IntervalInSec | integer | Yes | The time interval between data slices. Unit: seconds. Minimum value: 3600. Valid values:
| 3600 |
StartTime | long | Yes | The start of the time range to query. Unit: milliseconds. | 1699200000000 |
EndTime | long | Yes | The end of the time range to query. Unit: milliseconds. | 1699286400000 |
OrderBy | string | No | The dimension by which data is sorted. Valid value:
| dataType |
Metric | string | Yes | The name of the metric. Valid value: USAGEFEE.STAT. | USAGEFEE.STAT |
Order | string | No | The order in which data is sorted. Valid value:
| ASC |
AdvancedFilters | array<object> | No | The filter conditions. | |
object | No | |||
Key | string | No | The key of the filter condition. | regionId |
Value | string | No | The value of the filter condition. | cn-hangzhou |
OpType | string | No | The operator. Valid values: eq and in. | eq |
Dimensions | array | No | The dimensions of the metric that you want to query. Valid values:
| |
string | No | The dimension of the metric. | dataType | |
Measures | array | No | The measures of the metric that you want to query. | |
string | No | The measure of the metric. Valid value: byte_sum. | byte_sum | |
QueryType | string | Yes | The data type. Valid values:
| instantQuery |
Response parameters
Examples
Sample success responses
JSON
format
{
"Code": "200",
"HttpStatusCode": 0,
"Message": "success",
"RequestId": "99A663CB-8D7B-4B0D-A006-03C8EE38E7BB",
"Success": true,
"Data": {
"Complete": true,
"Items": [
{
"date": "1697108400",
"dataType": "metrics",
"byte_sum": 9497922
}
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | ParameterMetricIllegal | The specified metric is invalid. | The specified metric is invalid. |
400 | ParameterMeasuresIllegal | The specified Measures is invalid. | The specified Measures is invalid. |
400 | ParameterTimeStampIllegal | The specified timeStamp is invalid. | The specified timeStamp is invalid. |
400 | ParameterOrderIllegal | The specified order is invalid. | The specified order is invalid. |
400 | ParameterPageSizeIllegal | The specified PageSize is invalid. | The specified PageSize is invalid. |
400 | ParameterIntervalIllegal | The specified interval is invalid. | The specified interval is invalid. |
400 | ParameterMeasuresMissing | You must specify measures. | You must specify measures. |
400 | ParameterDimensionsIllegal | The specified dimensions is invalid. | The specified dimensions is invalid. |
400 | ParameterRegionIdIllegal | The specified RegionId is invalid. | The specified RegionId is invalid. |
400 | InternalError | Internal error. Please try again. Contact the DingTalk service account if the issue persists after multiple retries. | Internal error. Please try again. Contact the DingTalk service account if the issue persists after multiple retries. |
403 | APINotAuthorize | The current user is not authorized to access the interface. | The current user is not authorized to access the interface. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-07-25 | The Error code has changed. The response structure of the API has changed | View Change Details |