Modifies the Enhanced Monitoring metrics that are displayed for an ApsaraDB RDS for PostgreSQL instance.
Operation description
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
rds:ModifyDBInstanceMetrics | update |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBInstanceName | string | Yes | The instance ID. You can call the DescribeDBInstances operation to query the instance ID. | pgm-bp1s1j103lo6**** |
Scope | string | Yes | The application scope of this modification. Valid values:
| instance |
MetricsConfig | string | Yes | 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
Examples
Sample success responses
JSON
format
{
"DBInstanceId": "pgm-bp1s1j103lo6****",
"RequestId": "B55934BB-FFAA-5276-80A8-E0FDB12810B3",
"Scope": "instance"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidMetricsConfig | The specified metrics config is invalid. | The specified metric configuration is invalid. |
400 | InvalidScope | The specified scope is invalid | The specified scope is invalid. |
400 | InvalidDBInstanceEngineType.Format | the DB instance engine type does not support this operation. | This operation is not supported for the database engine of the instance. |
404 | InvalidDBInstanceName.NotFound | The 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 time | Summary of changes | Operation |
---|---|---|
2022-06-23 | API Description Update. The Error code has changed | View Change Details |