Creates a consumer.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardb:CreateConsumer |
create |
*All Resource
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| GwClusterId |
string |
Yes |
The gateway instance ID. You can obtain the ID from the GwClusterId parameter returned by the CreateGateway operation. |
pg-xxxxxxxxxx |
| Name |
string |
Yes |
The username. |
test |
| ConsumerGroupName |
string |
No |
The consumer group ID. You can obtain the ID from the ConsumerGroupId parameter returned by the CreateConsumerGroup operation. |
cg-p3gk2oh55c** |
| NickName |
string |
No |
The nickname. |
test |
| KeyType |
string |
No |
The key type. Default value: ApiKey. Valid values: ApiKey. |
ApiKey |
| RegionId |
string |
No |
The region ID. |
cn-beijing |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
Id of the request |
CD3FA5F3-FAF3-44CA-AFFF-BAF869****** |
| ApiKey |
string |
The complete API key. This parameter is returned only in the current response. |
6c4b1f0317cd4fd7a5b446d3503d** |
| KeyType |
string |
The key type. Default value: ApiKey. Valid values: ApiKey. |
ApiKey |
| ConsumerId |
string |
The user ID. |
c-mqveroemc*** |
Examples
Success response
JSON format
{
"RequestId": "CD3FA5F3-FAF3-44CA-AFFF-BAF869******",
"ApiKey": "6c4b1f0317cd4fd7a5b446d3503d**",
"KeyType": "ApiKey",
"ConsumerId": "c-mqveroemc***"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.