Updates the alert threshold percentage for one or more API keys.
Operation description
Applicable engine
Try it now
Test
RAM authorization
Request syntax
GET HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
rds_copilot***_public_cn-*********6 |
| Apikey |
array<object> |
Yes |
A list of API keys and their alert thresholds. |
|
|
object |
No |
|||
| Apikey |
string |
No |
The API key. |
sk-rds-***** |
| ThresholdPercent |
integer |
No |
The alert threshold percentage. An alert is triggered when usage reaches this percentage of the quota. For example, a value of |
[0, 100],0 会清理告警设置 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response schema. |
||
| RequestId |
string |
The request ID. |
FE9C65D7-930F-57A5-A207-8C396329**** |
| Success |
boolean |
Indicates whether the request was successful. |
true |
| Results |
array<object> |
The list of results. |
|
|
object |
The result. |
||
| InstanceId |
string |
The instance ID. |
rds_copilot***_public_cn-o*****1 |
| KeyType |
string |
The key type. |
system / custom |
| KeyName |
string |
The API key name. |
api-***** |
| ThresholdPercent |
integer |
The alert threshold percentage. An alert is triggered when usage reaches this percentage of the quota. For example, a value of |
[0, 100],0 会清理告警设置 |
| Apikey |
string |
The API key. |
sk-rds-***** |
Examples
Success response
JSON format
{
"RequestId": "FE9C65D7-930F-57A5-A207-8C396329****",
"Success": true,
"Results": [
{
"InstanceId": "rds_copilot***_public_cn-o*****1",
"KeyType": "system / custom",
"KeyName": "api-*****",
"ThresholdPercent": 0,
"Apikey": "sk-rds-*****"
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | QuotaAlertItemsRequiredError | apikeys 参数不能为空 | |
| 400 | QuotaAlertBatchFailedError | All quota alert operations failed. | |
| 403 | InvalidUserOrder | There is no valid order for this UID. | There is no valid order for this UID |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.