All Products
Search
Document Center

ApsaraDB RDS:ModifyDBInstanceMetrics

Last Updated:Jul 05, 2024

Modifies the Enhanced Monitoring metrics that are displayed for an ApsaraDB RDS for PostgreSQL instance.

Operation description

Supported database engines

  • PostgreSQL

References

Note Before you call this operation, carefully read the following documentation. Make sure that you fully understand the prerequisites and impacts for calling this operation.

View the Enhanced Monitoring metrics

Debugging

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

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceNamestringYes

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

pgm-bp1s1j103lo6****
ScopestringYes

The application scope of this modification. Valid values:

  • instance: This modification is applied only to the current instance.
  • region: This modification is applied to all ApsaraDB RDS for PostgreSQL instances that are equipped with the same type of storage media as the current instance in the region to which the current instance belongs. For example, if the current instance is equipped with cloud disks, this modification is applied to all ApsaraDB RDS for PostgreSQL instances that are equipped with cloud disks in the region to which the current instance belongs.
instance
MetricsConfigstringYes

The keys of the Enhanced Monitoring metrics that you want to display for the instance. You can enter a maximum of 30 metric keys. If you enter multiple metric keys, you must separate the metric keys with commas (,).

You can call the DescribeAvailableMetrics operation to query the keys of metrics.

os.cpu_usage.sys.avg,os.cpu_usage.user.avg

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

DBInstanceIdstring

The instance ID.

pgm-bp1s1j103lo6****
RequestIdstring

The request ID.

B55934BB-FFAA-5276-80A8-E0FDB12810B3
Scopestring

The application scope of this modification. Valid values:

  • instance: This modification is applied only to the current instance.
  • region: This modification is applied to all ApsaraDB RDS for PostgreSQL instances that are equipped with the same type of storage media as the current instance in the region to which the current instance belongs.
instance

Examples

Sample success responses

JSONformat

{
  "DBInstanceId": "pgm-bp1s1j103lo6****",
  "RequestId": "B55934BB-FFAA-5276-80A8-E0FDB12810B3",
  "Scope": "instance"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidMetricsConfigThe specified metrics config is invalid.The specified metric configuration is invalid.
400InvalidScopeThe specified scope is invalidThe specified scope is invalid.
400InvalidDBInstanceEngineType.Formatthe DB instance engine type does not support this operation.This operation is not supported for the database engine of the instance.
404InvalidDBInstanceName.NotFoundThe database instance does not exist.The name of the RDS instance cannot be found. Check the name of the RDS instance.

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

Change history

Change timeSummary of changesOperation
2022-06-23API Description Update. The Error code has changedView Change Details