You can call this operation to set the monitoring granularity for a ApsaraDB for MongoDB instance.

Note For more information about the monitoring granularity values supported for various metrics, see Set monitoring granularity.

Before you call this operation, make sure that the following requirements are met:

  • A replica set or sharded cluster instance is used.
  • MongoDB 3.4 (the latest minor version) or 4.0 must be selected.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
DBInstanceId String Yes dds-bpxxxxxxxx

The ID of the instance.

Granularity String Yes 1

The monitoring granularity. Valid values: 1 or 300. Unit: seconds.

AccessKeyId String No LTAIgbTGpxxxxxx

The AccessKey ID provided to you by Alibaba Cloud.

Action String No ModifyDBInstanceMonitor

The operation that you want to perform. Set the value to ModifyDBInstanceTDE.

Response parameters

Parameter Type Example Description
RequestId String EFD65226-08CC-4C4D-B6A4-CB3C382F67B0

The ID of the request.


Sample requests

http(s):// Action=ModifyDBInstanceMonitor
&<Common request parameters>

Sample success responses

XML format


JSON format


Error codes

For a list of error codes, visit the API Error Center.