调用 CreateGroup 接口,创建 Consumer Group。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | CreateGroup | 要执行的操作,取值:CreateGroup。 |
Version | String | 是 | 2023-06-01 | API的版本,取值:2023-06-01。 |
GroupName | String | 是 | bmq-cg-1 | 自定义设置Consumer Group 的名称,约束限制如下:
|
InstanceId | String | 是 | o-00c0****m46c | Consumer Group 所属实例 ID。 |
Description | String | 否 | 测试使用 | Consumer Group 的描述语句。 |
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
GroupId | String | 25950****901433daa48208d5450cd19 | Consumer Group 的 ID。 |
POST /?Action=CreateGroup&Version=2023-06-01 HTTP/1.1
Host: bmq.volcengineapi.com
Content-Type: application/json; charset=UTF-8
X-Date: 20241104T134340Z
X-Content-Sha256: 287e874e******d653b44d21e
Authorization: HMAC-SHA256 Credential=AK********/20241104/cn-beijing/bmq/request, SignedHeaders=host;x-content-sha256;x-date, Signature=********
{
"GroupName": "bmq-cg-1",
"InstanceId": "o-00c0****m46c"
}
json
{
"ResponseMetadata": {
"RequestId": "202411042143441740051470288****",
"Action": "CreateGroup",
"Version": "2023-06-01",
"Service": "bmq",
"Region": "cn-beijing"
},
"Result": {
"GroupId": "25950****901433daa48208d5450cd19"
}
}
json
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。