文档

EnableAutoTopicCreation - 开启自动创建 Topic

更新时间:

本文介绍如何调用 EnableAutoTopicCreation 开启和关闭自动创建Topic,以及修改自动创建 Topic 默认分区数。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
RegionIdstring

地域 ID。

cn-hangzhou
InstanceIdstring

实例 ID。

alikafka_post-cn-v0h1fgs2****
Operatestring

目前只支持这三种入参:

  • enable: 开启自动创建 Topic。
  • disable: 关闭自动创建 Topic。
  • updatePartition: 修改自动创建分区数。
enable
PartitionNumlong

调整自动创建 Topic 默认分区数。

当 Operate 值为 updatePartition 时,才传递该值。

12

返回参数

名称类型描述示例值
object
Codeinteger

返回码。返回 200 代表成功。

200
Messagestring

返回信息。

operation success.
RequestIdstring

请求 ID。

9E3B3592-5994-4F65-A61E-E62A77A7***
Successboolean

调用是否成功。

true

示例

正常返回示例

JSON格式

{
  "Code": 200,
  "Message": "operation success.",
  "RequestId": "9E3B3592-5994-4F65-A61E-E62A77A7***",
  "Success": true
}

错误码

HTTP status code错误码错误信息描述
400ONS_SYSTEM_FLOW_CONTROL%s. Please check and try again later.当前请求数量过多,请稍后再试。
400BIZ_FIELD_CHECK_INVALID%s. Please check and try again later.参数错误。
400MissingParameterThe %s parameter is required.参数%s缺失
400Instance.StatusNotRunningThe instance is not running and cannot operate this function. Please try again later.实例不是运行中状态,无法操作该功能,请稍后重试。
400Instance.Change.NotAllowedThis instance does not allow deployment operations.该实例不允许变更操作
400InvalidParameter.NotSupportThe %s parameter is not supported.参数%s当前不支持
404Instance.NotFoundThe instance does not exist. Please verify the entry and try again.实例不存在,请核实入参后重试。

访问错误中心查看更多错误码。

  • 本页导读 (1)
文档反馈