Modify the API KEY Quota
Operation description
Supported engine
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
rdsai:UpdateApiKeyQuota |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
No |
The instance ID. |
rds_copilot***_public_cn-*********6 |
| Keys |
array<object> |
No |
A list of API keys. |
|
|
object |
No |
|||
| ApiKey |
string |
No |
The API key. |
sk-rds-xxx |
| LimitType |
string |
No |
The limit type. Valid values:
|
fixed |
| TokenQuota |
integer |
No |
The token quota. This parameter is required when |
100000 |
| LimitRate |
number |
No |
The limit rate. This parameter is required when |
0.2 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response object. |
||
| RequestId |
string |
The request ID. |
FE9C65D7-930F-57A5-A207-8C396329**** |
| Success |
boolean |
Indicates whether the request was successful. |
true |
| Message |
string |
The returned message. |
success |
| Data |
object |
The returned data. |
|
| CustomKeyList |
array<object> |
The list of custom API keys. |
|
|
object |
|||
| ApiKey |
string |
The API key. |
sk-rds-xxx |
| TokenQuota |
integer |
The token quota for the API key. |
10000 |
| LimitType |
string |
The quota limiting method. Valid values:
|
fixed |
| LimitRate |
number |
The limit rate. |
0.2 |
Examples
Success response
JSON format
{
"RequestId": "FE9C65D7-930F-57A5-A207-8C396329****",
"Success": true,
"Message": "success",
"Data": {
"CustomKeyList": [
{
"ApiKey": "sk-rds-xxx",
"TokenQuota": 10000,
"LimitType": "fixed",
"LimitRate": 0.2
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidIpWhitelistError | Invalid IP address or CIDR in whitelist. | |
| 400 | DomainNotReadyError | Domain is not ready yet, please try again later. | |
| 400 | InvalidQuotaValueError | Keys quota setting is not correct. | |
| 400 | QuotaSumExceededError | Sum of custom key quotas exceeds instance total quota. | |
| 400 | SystemKeyQuotaNotConfigurableError | Cannot configure quota for system key. | |
| 400 | MoPostpayRatioNotAllowedError | Ratio mode is not supported for POSTPAY instances. Use 'fixed' mode instead. | |
| 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.