Resets an API key.
Operation description
Applicable engines
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
rdsai:ResetApiKey |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The ID of the instance. |
rds_copilot***_public_cn-*********6 |
| ApiKey |
string |
No |
The API key. |
sk-rds-***** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response schema. |
||
| RequestId |
string |
The request ID. |
FE9C65D7-930F-57A5-A207-8C396329241C |
| Success |
boolean |
Indicates whether the request was successful. |
true |
| Message |
string |
The response message. |
success |
| Data |
object |
The returned data. |
|
| ApiKey |
string |
The new system API key. |
sk-rds-***** |
| BaseUrl |
string |
The model invocation URL. |
http://xxx.yy/v1 |
| CustomKeyList |
array<object> |
A list of custom API keys. |
|
|
object |
|||
| ApiKey |
string |
The custom API key. |
sk-rds-***** |
| KeyName |
string |
The name of the API key. |
api-***** |
Examples
Success response
JSON format
{
"RequestId": "FE9C65D7-930F-57A5-A207-8C396329241C",
"Success": true,
"Message": "success",
"Data": {
"ApiKey": "sk-rds-*****\n",
"BaseUrl": "http://xxx.yy/v1",
"CustomKeyList": [
{
"ApiKey": "sk-rds-*****",
"KeyName": "api-*****"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | MoInvalidIpWhitelistError | Invalid IP address or CIDR in whitelist. | |
| 400 | MoDomainNotReadyError | Domain is not ready yet, please try again later. | |
| 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.