分布式消息服务KAFKA版-Kafka实例创建Topic:请求示例

时间:2024-01-24 16:40:32

请求示例

创建一个Topic,Topic名称为test01。

POST https://{endpoint}/v2/{project_id}/instances/{instance_id}/topics

{
  "id" : "test01",
  "partition" : 3,
  "replication" : 3,
  "retention_time" : 72,
  "sync_message_flush" : false,
  "sync_replication" : "false",
  "topic_other_configs" : [ {
    "name" : "message.timestamp.type",
    "value" : "LogAppendTime"
  }, {
    "name" : "max.message.bytes",
    "value" : 10485760
  } ],
  "topic_desc" : ""
}
support.huaweicloud.com/api-kafka/CreateInstanceTopic.html