DescribeDBInstancePerformance
Queries the performance data of an ApsaraDB for MongoDB instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dds:DescribeDBInstancePerformance |
get |
*dbinstance
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBInstanceId |
string |
Yes |
The instance ID. Note
If you specify the ID of a sharded cluster instance for this parameter, you must also specify the NodeId parameter. |
dds-bp2635**** |
| NodeId |
string |
No |
Instance ID of the mongos or shard node in a sharded cluster instance. You can use this parameter to query the performance of a single node. Note
This parameter is available only when you specify instance ID of a sharded cluster instance for the DBInstanceId parameter. |
d-bp2287**** |
| Key |
string |
Yes |
The performance metrics. For more information, see Monitoring metrics. Note
To specify multiple metrics, separate them with commas (,). |
CpuUsage |
| StartTime |
string |
Yes |
The start time of the query. Specify the time in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC. |
2022-06-13T10:58Z |
| EndTime |
string |
Yes |
The end time of the query. The end time must be later than the start time. Specify the time in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC. |
2022-06-13T11:58Z |
| RoleId |
string |
No |
The instance ID of the node in a standalone instance or replica set instance. You can call the DescribeReplicaSetRole operation to query the instance ID. Note
This parameter is available only when you specify the ID of a standalone instance or replica set instance for the DBInstanceId parameter. |
6025**** |
| Interval |
string |
No |
The data granularity. Valid values: 5, 30, 60, 600, 1800, 3600, and 86400. |
60 |
| ReplicaSetRole |
string |
No |
The role of the node in a standalone instance or replica set instance. Valid values:
Note
Valid values:
|
Primary |
| SearchId |
string |
No |
The ID of the search node. Note
|
dds-2zec12675c9e****-search |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| PerformanceKeys |
object |
||
| PerformanceKey |
array<object> |
The list of performance metric information. |
|
|
array<object> |
|||
| Key |
string |
The performance metric. |
CpuUsage |
| Unit |
string |
The unit of the performance metric. |
% |
| ValueFormat |
string |
The format of the performance metric value. If the performance metric contains multiple fields, the fields are usually separated by ampersands (&). For example, if you query the disk space usage, the returned ValueFormat is ins_size&data_size&log_size. |
cpu_usage |
| PerformanceValues |
object |
||
| PerformanceValue |
array<object> |
The list of performance metric values. |
|
|
object |
|||
| Value |
string |
The performance metric value. |
0.23 |
| Date |
string |
The date when the performance metric value was generated. The time is in the ISO 8601 (RFC 3339) format in UTC. Example: 2022-06-13T10:58:00Z. |
2022-06-13T10:58:00Z |
| EndTime |
string |
The end time of the query. The time is displayed in the yyyy-MM-ddTHH:mmZ format in UTC. |
2022-06-13T11:58Z |
| RequestId |
string |
The request ID. |
4A300BC7-6D8F-527F-A2DB-A7768D26E9AC |
| StartTime |
string |
The start time of the query. Specify the time in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC. |
2022-06-13T10:58Z |
Examples
Success response
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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.