Creates a group.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateConsumerGroup

The operation that you want to perform. Set the value to CreateConsumerGroup.

InstanceId String Yes alikafka_post-cn-0pp1l9z8****

The ID of the instance.

ConsumerId String Yes test

The name of the group. The value of this parameter must meet the following requirements:

  • The value can contain only letters, digits, hyphens (-), and underscores (_), and it must contain at least one letter or digit.
  • The value must be 3 to 128 characters in length. An overlength value is automatically truncated to 128 characters.
  • After a group is created, its name cannot be modified.
RegionId String Yes cn-hangzhou

The ID of the region in which the instance resides.

Remark String No test

Remarks.

Response parameters

Parameter Type Example Description
Code Integer 200

The HTTP status code. The HTTP status code 200 indicates that the request is successful.

Message String operation success

The returned message.

RequestId String E57A8862-DF68-4055-8E55-B80CB4****

The ID of the request.

Success Boolean true

Indicates whether the request is successful.

Examples

Sample requests

http(s)://alikafka.cn-hangzhou.aliyuncs.com/?Action=CreateConsumerGroup
&InstanceId=alikafka_post-cn-0pp1l9z8****
&ConsumerId=test
&RegionId=cn-hangzhou
&Remark=test
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateConsumerGroupResponse>
    <Code>200</Code>
    <Message>operation success</Message>
    <RequestId>E57A8862-DF68-4055-8E55-B80CB4****</RequestId>
    <Success>true</Success>
</CreateConsumerGroupResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Code" : 200,
  "Message" : "operation success",
  "RequestId" : "E57A8862-DF68-4055-8E55-B80CB4****",
  "Success" : true
}

Error codes

For a list of error codes, visit the API Error Center.