本文介绍如何调用 EnableAutoTopicCreation 开启和关闭自动创建Topic,以及修改自动创建 Topic 默认分区数。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
RegionId | string | 是 | 地域 ID。 | cn-hangzhou |
InstanceId | string | 是 | 实例 ID。 | alikafka_post-cn-v0h1fgs2**** |
Operate | string | 是 | 目前只支持这三种入参:
| enable |
PartitionNum | long | 否 | 调整自动创建 Topic 默认分区数。 当 Operate 值为 updatePartition 时,才传递该值。 | 12 |
返回参数
示例
正常返回示例
JSON
格式
{
"Code": 200,
"Message": "operation success.",
"RequestId": "9E3B3592-5994-4F65-A61E-E62A77A7***",
"Success": true
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | ONS_SYSTEM_FLOW_CONTROL | %s. Please check and try again later. | 当前请求数量过多,请稍后再试。 |
400 | BIZ_FIELD_CHECK_INVALID | %s. Please check and try again later. | 参数错误。 |
400 | MissingParameter | The %s parameter is required. | 参数%s缺失 |
400 | Instance.StatusNotRunning | The instance is not running and cannot operate this function. Please try again later. | 实例不是运行中状态,无法操作该功能,请稍后重试。 |
400 | Instance.Change.NotAllowed | This instance does not allow deployment operations. | 该实例不允许变更操作 |
400 | InvalidParameter.NotSupport | The %s parameter is not supported. | 参数%s当前不支持 |
404 | Instance.NotFound | The instance does not exist. Please verify the entry and try again. | 实例不存在,请核实入参后重试。 |
访问错误中心查看更多错误码。