Creates a consumer.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
apig:CreateConsumer |
create |
*All Resource
|
None | None |
Request syntax
POST /v1/consumers HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| name |
string |
No |
The consumer name. |
test |
| description |
string |
No |
The consumer description. |
consumer for test |
| jwtIdentityConfig | JwtIdentityConfig |
No |
The JWT identity configuration. |
|
| akSkIdentityConfigs |
array |
No |
A list of AK/SK identity configurations. |
|
| AkSkIdentityConfig |
No |
An AK/SK identity configuration. |
||
| apikeyIdentityConfig | ApiKeyIdentityConfig |
No |
The identity configuration for API key authentication. |
|
| enable |
boolean |
No |
Specifies whether to enable the consumer. |
false |
| gatewayType |
string |
No |
The gateway type. Valid values:
|
API |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| requestId |
string |
The request ID. |
479AE38F-A574-52F7-87EA-E91199999F9E |
| code |
string |
The response status code. |
Ok |
| message |
string |
The response message. |
success |
| data |
object |
The response data. |
|
| consumerId |
string |
The consumer ID. |
cs-cvnjramm1hks1r3fmmug |
Examples
Success response
JSON format
{
"requestId": "479AE38F-A574-52F7-87EA-E91199999F9E",
"code": "Ok",
"message": "success",
"data": {
"consumerId": "cs-cvnjramm1hks1r3fmmug"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.