You can call the ModifyDBInstanceMonitor operation to modify the monitoring frequency of an ApsaraDB RDS instance.

Before you call this operation, make sure that you understand the billing methods and pricing of ApsaraDB RDS. For more information, see Billable items, billing methods, and pricing.

Alibaba Cloud provides different monitoring frequencies for different instances. For more information, see Set monitoring frequencies.

Note
  • If your want to set the monitoring frequency to every few seconds, you are charged additional fees. For more information, see Billable items, billing methods, and pricing.
  • This operation is not supported for ApsaraDB RDS for PostgreSQL instances. The monitoring frequency of an ApsaraDB RDS for PostgreSQL instance varies based on the query time range. For more information, see Query performance metrics.

Debugging

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
Action String Yes ModifyDBInstanceMonitor

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

DBInstanceId String Yes rm-uf6wjk5xxxxxxx

The ID of the instance. You can call the DescribeDBInstances operation to query the IDs of instances.

Period String Yes 60

The monitoring frequency that you want to use. Valid values:

  • 5
  • 10
  • 60
  • 300

Unit: seconds.

ClientToken String No ETnLKlblzczshOTUbOCzxxxxxxx

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

Response parameters

Parameter Type Example Description
RequestId String 52B9805C-432C-4ED1-83FD-2F916B6D2733

The ID of the request.

Examples

Sample requests

http(s)://rds.aliyuncs.com/?Action=ModifyDBInstanceMonitor
&DBInstanceId=rm-uf6wjk5xxxxxxx
&Period=60
&<Common request parameters>

Sample success responses

XML format

<ModifyDBInstanceMonitorResponse>
	  <requestId>52B9805C-432C-4ED1-83FD-2F916B6D2733</requestId>
</ModifyDBInstanceMonitorResponse>

JSON format

{
    "requestId": "52B9805C-432C-4ED1-83FD-2F916B6D2733"
}

Error codes

HTTP status code Error code Error message Description
404 InvalidDBInstanceId.NotFound The DBInstanceId provided does not exist in our records. The error message returned because the instance cannot be found. Confirm that the instance is created within your Alibaba Cloud account and is not deleted.

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