本接口用于修改现有的投递任务。
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 |
content 格式如下:
字段名 | 类型 | 是否必有 | 含义 |
---|---|---|---|
enable_tag | bool | 是 | 是否投递 TAG 信息 |
meta_fields | array(string) | 是 | 需要投递的元数据列表,目前仅支持:__SOURCE__,__FILENAME__和__TIMESTAMP__ |
其中 effective、ckafka 和 content 至少要有一个。
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 0
无特殊。
无。
参见 错误码。