列出 kafka 集群 topic -ListUKafkaTopics

展示kafka集群上所有topic

Request Parameters

Parameter nameTypeDescriptionRequired
Regionstring地域。 参见 地域和可用区列表Yes
Zonestring可用区。参见 可用区列表Yes
ProjectIdstring项目 ID。不填写为默认项目,子帐号必须填写。 请参考 GetProjectList 接口No
ClusterInstanceIdstring集群资源idYes

Response Elements

Parameter nameTypeDescriptionRequired
RetCodeint操作返回码Yes
Actionstring操作名称Yes
TopicListarraytopic 信息列表Yes
Lengthint列表长度No

TopicInfo

Parameter nameTypeDescriptionRequired
Topicstringtopic 名称No
NumOfPartitionint分区数量No
NumOfOccupyBrokerint占用 broker 数量No
NumOfReplicaint副本数量No
UnderReplicasPerfloat落后副本占比No

Request Example

https://api.ucloud.cn/?Action=ListUKafkaTopics
&Zone=cn-zj-02
&ClusterInstanceId=ukafka-asje3q
&Region=cn-zj
&ProjectId=qVHhqxTv

Response Example

{
    "RetCode": 0,
    "Action": "ListTopicsResponse",
    "TopicList": [
        {
            "topic": "nil",
            "numOfPartition": 3,
            "numOfOccupyBroker": 3,
            "numOfReplica": 3,
            "allReplicas": 9,
            "allIsr": 9,
            "underReplicasPer": 0
        },
        {
            "topic": "foo",
            "numOfPartition": 3,
            "numOfOccupyBroker": 3,
            "numOfReplica": 3,
            "allReplicas": 9,
            "allIsr": 9,
            "underReplicasPer": 0
        },
        {
            "topic": "bar",
            "numOfPartition": 1,
            "numOfOccupyBroker": 3,
            "numOfReplica": 3,
            "allReplicas": 3,
            "allIsr": 3,
            "underReplicasPer": 0
        }
    ],
    "Length": 3
}