Creates an AgenticDB tenant API key.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardb:CreateAgenticDBTenantApiKey |
create |
*DBCluster
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. |
cn-hangzhou |
| DBClusterId |
string |
Yes |
The AgenticDB cluster ID. |
pagc-bp1abcdef1234567 |
| TenantName |
string |
Yes |
The name of the tenant. The name must be unique within the same cluster and be 2 to 64 characters in length. |
my-tenant |
| Description |
string |
No |
The description of the purpose. |
Dedicated key for MCP server |
| ExpireTime |
string |
No |
The expiration time in ISO 8601 format. If this parameter is not specified, the API key never expires. |
2027-01-01T00:00:00Z |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
F45FFACC-1B2C-3D4E-5F6A-7B8C9D0E1F2A |
| TenantId |
string |
The tenant ID. |
t-aaaa111122223333 |
| TenantName |
string |
The tenant name. |
my-tenant |
| ApiKeyId |
string |
The resource ID of the API key. |
ak-xxxxxxxxxxxx |
| ApiKey |
string |
The plaintext of the API key. This value is returned only in the current response. |
pagc_key_xxxx.yyyy |
| CreateTime |
string |
The creation time. The time is in ISO 8601 format and follows the UTC time zone (format: YYYY-MM-DDTHH:mm:ssZ). |
2026-06-10T08:00:00Z |
| ExpireTime |
string |
The expiration time. This parameter is empty if the API key never expires. The time is in ISO 8601 format and follows the UTC time zone (format: YYYY-MM-DDTHH:mm:ssZ). |
2027-01-01T00:00:00Z |
Examples
Success response
JSON format
{
"RequestId": "F45FFACC-1B2C-3D4E-5F6A-7B8C9D0E1F2A",
"TenantId": "t-aaaa111122223333",
"TenantName": "my-tenant",
"ApiKeyId": "ak-xxxxxxxxxxxx",
"ApiKey": "pagc_key_xxxx.yyyy",
"CreateTime": "2026-06-10T08:00:00Z",
"ExpireTime": "2027-01-01T00:00:00Z"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.