Queries the performance data of an ApsaraDB for MongoDB instance.
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 |
---|---|---|---|---|
dds:DescribeDBInstancePerformance | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBInstanceId | string | Yes | The instance ID. Note
If you set this parameter to the ID of a sharded cluster instance, you must also specify the NodeId parameter.
| dds-bp2635**** |
NodeId | string | No | The ID of the mongos or shard node in a sharded cluster instance. You can specify this parameter to view the performance data of a single node. Note
This parameter is valid when you set the DBInstanceId parameter to the ID of a sharded cluster instance.
| d-bp2287**** |
Key | string | Yes | The performance metric. For more information about valid values, see Monitoring items and metrics. Note
If you need to specify multiple metrics, separate the metrics with commas (,).
| CpuUsage |
StartTime | string | Yes | The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC. | 2022-06-13T10:58Z |
EndTime | string | Yes | The end of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC. The end time must be later than the start time. | 2022-06-13T11:58Z |
RoleId | string | No | The role ID of the node in a standalone or replica set instance. You can call the DescribeReplicaSetRole operation to query the role ID of the node. Note
This parameter is available when you set the DBInstanceId parameter to the ID of a standalone instance or a replica set instance.
| 6025**** |
Interval | string | No | The interval at which performance data is collected. Valid values: 5, 30, 60, 600, 1800, 3600, 86400. | 60 |
ReplicaSetRole | string | No | The role of the node in the standalone or replica set instance. Valid values:
Note
| Primary |
Response parameters
Examples
Sample success responses
JSON
format
{
"PerformanceKeys": {
"PerformanceKey": [
{
"Key": "CpuUsage",
"Unit": "%",
"ValueFormat": "cpu_usage",
"PerformanceValues": {
"PerformanceValue": [
{
"Value": "0.23",
"Date": "2022-06-13T10:58:00Z"
}
]
}
}
]
},
"EndTime": "2022-06-13T11:58Z",
"RequestId": "4A300BC7-6D8F-527F-A2DB-A7768D26E9AC",
"StartTime": "2022-06-13T10:58Z"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidPerformanceKey.Malformed | The specified parameter Key is not valid. | - |
400 | InvalidStartTime.Malformed | The specified parameter StartTime is not valid. | - |
400 | InvalidEndTime.Malformed | The specified parameter EndTime is not valid. | - |
400 | InvalidStartTimeAndEndTime.Malformed | The end time must be greater than the start time | The end time cannot be earlier than the start time. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-05-23 | The Error code has changed. The request parameters of the API has changed | View Change Details |