Reviewed-by: Ziuzko, Stanislav <stanislav.ziuzko@t-systems.com> Co-authored-by: Chen, Junjie <chenjunjie@huawei.com> Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
7.9 KiB
Creating a Consumer Group
Function
This API is used to create a consumer group.
URI
POST /v2/{project_id}/kafka/instances/{instance_id}/group
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain it, see Obtaining a Project ID. |
instance_id |
Yes |
String |
Instance ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
group_name |
Yes |
String |
Consumer group name. |
group_desc |
No |
String |
Consumer group description. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
- |
String |
Specified IPv4 private IP addresses. The number of specified IP addresses must be less than or equal to the number of new brokers. If the number of specified IP addresses is less than the number of brokers, the unspecified brokers are randomly assigned private IP addresses. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Example Requests
Creating a consumer group named test
POST https://{endpoint}/v2/{project_id}/kafka/instances/{instance_id}/group { "group_name" : "test" }
Example Responses
Status code: 200
Creation succeeded.
success
Status Codes
Status Code |
Description |
---|---|
200 |
Creation succeeded. |
400 |
Creation failed. |
Error Codes
See Error Codes.