获取指定消费策略的详细信息。
GET /consumer
GET /consumer?topic_id=xxxx-xx-xx-xx-xxxxxxxx HTTP/1.1
Host: <Region>.cls.myqcloud.com
Authorization: <AuthorizationString>
无特殊
字段名 | 类型 | 位置 | 是否必选 | 含义 |
---|---|---|---|---|
topic_id | string | query | 是 | 查询的日志主题 ID |
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 123
{
"effective": true,
"ckafka": {
"vip": "10.123.123.123",
"vport": "8888",
"instance_id": "xxxxxx",
"instance_name": "myname",
"topic_id": "xxxxx",
"topic_name": "xxx",
},
"content":{"enable_tag":true,"meta_fields":["__SOURCE__"]},
"need_content":true
}
无特殊
字段名 | 类型 | 是否必选 | 含义 |
---|---|---|---|
effective | bool | 是 | 是否生效 |
ckafka | object | 是 | ckafka 消费相关信息 |
content | object | 否 | ckafka 的元数据信息 |
need_content | bool | 否 | 是否投递ckafka 的元数据信息,默认为true |
ckafka 格式如下:
字段名 | 类型 | 是否必选 | 含义 |
---|---|---|---|
vip | string | 是 | ckafka 的 VIP |
vport | string | 是 | ckafka 的 vport |
instance_id | string | 是 | ckafka 的 instance_id |
instance_name | string | 是 | ckafka 的 instance_name |
topic_id | string | 是 | ckafka 的 topic_id |
topic_name | string | 是 | ckafka 的 topic_name |
请参见 错误码 文档。
创建新的消费任务。
POST /consumer
POST /consumer?topic_id=xxxxx HTTP/1.1
Host: <Region>.cls.myqcloud.com
Authorization: <AuthorizationString>
Content-Type: application/json
{
"ckafka": {
"vip": "10.123.123.123",
"vport": "8888",
"instance_id": "xxxxxx",
"instance_name": "myname",
"topic_id": "xxxxx",
"topic_name": "xxx",
},
"content": {"enable_tag":true,"meta_fields":["__SOURCE__"]},
"need_content": true
}
无特殊
字段名 | 类型 | 位置 | 是否必选 | 含义 |
---|---|---|---|---|
topic_id | string | query | 是 | 消费任务绑定的 topic_id |
ckafka | object | body | 是 | ckafka 消费相关信息 |
content | object | body | 否 | ckafka 的元数据信息 |
need_content | bool | body | 否 | 是否投递 ckafka 的元数据信息,默认为 true |
ckafka 格式如下:
字段名 | 类型 | 是否必选 | 含义 |
---|---|---|---|
vip | string | 是 | ckafka 的 vip |
vport | string | 是 | ckafka 的 vport |
instance_id | string | 是 | ckafka 的 instance_id |
instance_name | string | 是 | ckafka 的 instance_name |
topic_id | string | 是 | ckafka 的 topic_id |
topic_name | string | 是 | ckafka 的 topic_name |
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 0
无特殊
无
请参见 错误码 文档。
修改现有的消费任务。
PUT /consumer
PUT /shipper?topic_id=xxxxxxxx HTTP/1.1
Host: <Region>.cls.myqcloud.com
Authorization: <AuthorizationString>
Content-Type: application/json
{
"effective": true,
"ckafka": {
"vip": "10.123.123.123",
"vport": "8888",
"instance_id": "xxxxxx",
"instance_name": "myname",
"topic_id": "xxxxx",
"topic_name": "xxx",
},
"content": {"enable_tag":true,"meta_fields":["__SOURCE__"]},
"need_content": true
}
无特殊
字段名 | 类型 | 位置 | 是否必选 | 含义 |
---|---|---|---|---|
topic_id | string | query | 是 | 消费任务绑定的 topic_id |
effective | bool | body | 否 | 消费任务是否生效 |
ckafka | object | body | 否 | ckafka 消费相关信息 |
content | object | body | 否 | ckafka 的元数据信息 |
need_content | bool | body | 否 | 是否投递 ckafka 的元数据信息,默认为 true |
ckafka 格式如下:
字段名 | 类型 | 是否必选 | 含义 |
---|---|---|---|
vip | string | 是 | ckafka 的 VIP |
vport | string | 是 | ckafka 的 vport |
instance_id | string | 是 | ckafka 的 instance_id |
instance_name | string | 是 | ckafka 的 instance_name |
topic_id | string | 是 | ckafka 的 topic_id |
topic_name | string | 是 | ckafka 的 topic_name |
其中 effective、ckafka 至少要有一个。
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 0
无特殊
无
请参见 错误码 文档。
删除消费任务。
DELETE /consumer
DELETE /consumer?topic_id=xxxx-xx-xx-xx-xxxxxxxx HTTP/1.1
Host: <Region>.cls.myqcloud.com
Authorization: <AuthorizationString>
无特殊
字段名 | 类型 | 位置 | 是否必选 | 含义 |
---|---|---|---|---|
topic_id | string | query | 是 | 要删除消费任务的日志主题 ID |
HTTP/1.1 200 OK
Content-Length: 0
无特殊
无
请参见 错误码 文档。
本页内容是否解决了您的问题?