CreateApiKey
Creates an API key.
Operation description
Creates an API key.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
gpdb:CreateApiKey |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID. |
cn-hangzhou |
| WorkspaceId |
string |
Yes |
The workspace ID. |
ws-***** |
| KeyName |
string |
Yes |
The name of the API key. |
my api key |
| Description |
string |
No |
The description. |
test secret |
| ServiceIds |
array |
No |
The IDs of the services to be authorized. |
|
|
string |
No |
The ID of the service to be authorized. |
agdb-xxxxxx |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| ApiKey |
string |
The API key. |
sk-xxxxxxx |
| RequestId |
string |
The request ID. |
B4CAF581-2AC7-41AD-8940-D56DF7AADF5B |
| KeyId |
string |
The API key ID. |
api-xxxxxxx |
Examples
Success response
JSON format
{
"ApiKey": "sk-xxxxxxx",
"RequestId": "B4CAF581-2AC7-41AD-8940-D56DF7AADF5B",
"KeyId": "api-xxxxxxx"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.