All Products
Search
Document Center

ApsaraDB for MongoDB:DescribeDBInstancePerformance

Last Updated:Dec 26, 2025

Queries the performance data of a MongoDB instance.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dds:DescribeDBInstancePerformance

get

*dbinstance

acs:dds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}

  • dds:ResourceTag

None

Request parameters

Parameter

Type

Required

Description

Example

DBInstanceId

string

Yes

The instance ID.

Note

NodeId is required when specifying a sharded cluster instance ID

dds-bp2635****

NodeId

string

No

The ID of a mongos or shard node in the sharded cluster instance. This parameter lets you query the performance of a single node.

Note

Available only when DBInstanceId is set to the ID of a sharded cluster instance.

d-bp2287****

Key

string

Yes

The performance metrics. For more information, see Metrics.

Note

To specify multiple metrics, separate them with commas (,).

CpuUsage

StartTime

string

Yes

The beginning of the time range to 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 of the time range to 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 role ID of a node in a standalone or replica set instance. To query the role ID, call the DescribeReplicaSetRole operation.

Note

Available only when DBInstanceId is set to the ID of a standalone or replica set instance.

6025****

Interval

string

No

The data granularity of the performance metrics in seconds. Valid values: 5, 30, 60, 600, 1800, 3600, and 86400.

60

ReplicaSetRole

string

No

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

  • Primary: The primary node.

  • Secondary: A secondary node.

Note
  • Available only when DBInstanceId is set to the ID of a standalone or replica set instance.

  • If DBInstanceId is set to the ID of a standalone instance, this parameter only supports the value Primary.

Primary

SearchId

string

No

The Search node ID.

Note

Available only after the Search feature is enabled for the instance.

dds-2zec12675c9e****-search

Response elements

Element

Type

Description

Example

object

PerformanceKeys

object

PerformanceKey

array<object>

The list of performance metrics.

array<object>

Key

string

The performance metric.

CpuUsage

Unit

string

The unit of the performance metric.

%

ValueFormat

string

The format of the performance metric values. If a performance metric contains multiple fields, the fields are 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 value of the performance metric.

0.23

Date

string

The time when the performance metric value was generated.

2022-06-13T10:58:00Z

EndTime

string

The end of the time range to query. The time is in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC.

2022-06-13T11:58Z

RequestId

string

The request ID.

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

StartTime

string

The beginning of the time range to query. The time is in the yyyy-MM-ddTHH:mmZ format. The time is displayed 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.