Queries the statistics of a specified metric for a specified site monitoring task.
Operation description
This topic provides an example to show how to query the statistics of the Availability
metric for a site monitoring task whose ID is ef4cdc8b-9dc7-43e7-810e-f950e56c****
. The result indicates that the availability rate of the site is 100%
.
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 |
---|---|---|---|---|
cms:DescribeSiteMonitorStatistics | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
TaskId | string | Yes | The ID of the site monitoring task. For more information about how to obtain the ID of a site monitoring task, see DescribeSiteMonitorList . | ef4cdc8b-9dc7-43e7-810e-f950e56c**** |
TimeRange | string | No | The statistical period. Unit: minutes. Default value: 1440 (1 day). Maximum value: 43200 (30 days). | 1440 |
StartTime | string | No | The timestamp that specifies the beginning of the time range to query. Unit: milliseconds. The default value is 1 hour ahead of the current time. | 1576142850527 |
MetricName | string | Yes | The name of the metric. Valid values:
| Availability |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"Code": "200",
"Message": "Succcessful",
"Data": "100",
"RequestId": "3AD2724D-E317-4BFB-B422-D6691D071BE1",
"Success": "true"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
206 | %s | %s | - |
400 | InvalidParameterValue | The specified parameter is not valid. | - |
400 | InvalidParameterValue | %s | - |
401 | AccessDeniedException | You donot have sufficient access to perform this action. | - |
403 | Forbidden | You are not authorized to operate the specified resource. | No permission, please use RAM to authorize |
403 | InvalidClientTokenId | The X.509 certificate or cms access key ID provided does not exist in our records. | - |
429 | Throttli∂ngException | The request was denied due to request throttling. | - |
500 | InternalError | The request processing has failed due to some unknown error. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|