All Products
Search
Document Center

ApsaraDB for MongoDB:DescribeDBInstancePerformance

Last Updated:Apr 01, 2024

Queries the performance data of an ApsaraDB for MongoDB instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
dds:DescribeDBInstancePerformanceREAD
  • dbinstance
    acs:dds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
  • dds:ResourceTag
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

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****
NodeIdstringNo

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****
KeystringYes

The performance metric. For more information about valid values, see Performance metrics.

Note If you need to specify multiple metrics, separate the metrics with commas (,).
CpuUsage
StartTimestringYes

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
EndTimestringYes

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
RoleIdstringNo

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****
ReplicaSetRolestringNo

The role of the node in a standalone or replica set instance. Valid values:

  • Primary
  • Secondary
Note
  • This parameter is valid only when you set the DBInstanceId parameter to the ID of a standalone instance or a replica set instance.

  • If you set the DBInstanceId parameter to the ID of a standalone instance, the value of this parameter can only be Primary.

Primary

Response parameters

ParameterTypeDescriptionExample
object
PerformanceKeysobject []

The details of performance metrics.

Keystring

The performance metrics that are returned.

CpuUsage
Unitstring

The unit of the performance metric.

%
ValueFormatstring

The format of the performance metric value. If the performance metric contains multiple fields, the fields are separated with ampersands ( &).

For example, if you query disk space usage, the returned value of the ValueFormat parameter is ins_size&data_size&log_size.

cpu_usage
PerformanceValuesobject []

The details of the performance metric values.

Valuestring

The value of the performance metric.

0.23
Datestring

The date and time when the metric value was generated.

2022-06-13T10:58:00Z
EndTimestring

The end of the queried time range. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC.

2022-06-13T11:58Z
RequestIdstring

The request ID.

4A300BC7-6D8F-527F-A2DB-A7768D26E9AC
StartTimestring

The beginning of the queried time range. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC.

2022-06-13T10:58Z

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400InvalidPerformanceKey.MalformedThe specified parameter Key is not valid.-
400InvalidStartTime.MalformedThe specified parameter StartTime is not valid.-
400InvalidEndTime.MalformedThe specified parameter EndTime is not valid.-
400InvalidStartTimeAndEndTime.MalformedThe end time must be greater than the start timeThe end time cannot be earlier than the start time.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history