Creates access credentials for a specified application group. This operation supports a dry run to preview the results.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
opensearch:WriteAppGroupCredential |
create |
*AppGroupCredential
|
None | None |
Request syntax
POST /v4/openapi/app-groups/{appGroupIdentity}/credentials HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| appGroupIdentity |
string |
Yes |
The identity of the application group. |
app_group_123 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| dryRun |
boolean |
No |
Specifies whether to perform a dry run. In a dry run, the system checks the request parameters but does not execute the operation. |
|
| body |
object |
No |
The request body, which contains information such as the credential type. |
|
| type |
string |
No |
The credential type, such as `api-key`, `account`, `invoke-key`, or `api-token`. To create an API key, set this parameter to `api-token`. |
api-token |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The structure of a successful response. |
||
| requestId |
string |
The unique ID of the request. |
1-2-3-4 |
| result |
object |
The details of the operation result. |
|
| appGroupId |
integer |
The ID of the application group. |
app_group_123 |
| type |
string |
The credential type. |
api-token |
| enabled |
boolean |
Indicates whether the credential is enabled. |
|
| token |
string |
The generated credential token. |
generated_token_string |
Examples
Success response
JSON format
{
"requestId": "1-2-3-4",
"result": {
"appGroupId": 0,
"type": "api-token",
"enabled": false,
"token": "generated_token_string"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.