1. 接口描述
接口请求域名:
ckafka.api.qcloud.com
本接口(GetInstanceAttributes)用于在用户账户下获取消息队列 CKafka 实例属性。2. 输入参数
参数名称 | 是否必选 | 类型 | 描述 |
instanceId | 是 | String | 实例 ID |
3. 输出参数
参数名称 | 类型 | 描述 |
instanceId | String | 实例 ID |
instanceName | String | 实例名称 |
vip | String | 访问实例的 VIP |
vport | Int | 访问实例的 vport |
vipList | JSON Object | 接入点 VIP 列表信息,具体字段含义可参考 示例 |
status | Int | 实例的状态。0:创建中,1:运行中,2:删除中 |
bandwith | Int | 实例带宽,单位:Mbps |
diskSize | Int | 实例的存储大小,单位:GB |
vpcId | String | VPC 的 ID,为空表示是基础网络 |
healthy | Int | 实例健康状态, 1:健康,2:告警,3:异常 |
healthyMessage | String | 实例健康信息,当前会展示磁盘利用率,最大长度为256 |
createTime | Int | 创建时间,UNIX Time Stamp |
expireTime | Int | 过期时间,UNIX Time Stamp |
subnetId | String | 子网 ID, 为空表示基础网络 |
zoneId | Int | 可用区 |
maxRetentionTime | Int | 实例日志的最长保留时间,单位:分钟 |
config | JSON Object | 自动创建 Topic 配置, 若该字段为空,则表示未开启自动创建,字段含义可参考 示例 |
remainderPartitions | Int | 剩余创建分区数 |
remainderTopics | Int | 剩余创建主题数 |
createdPartitions | Int | 当前创建分区数 |
createdTopics | Int | 当前创建主题数 |
4. 示例
输入:
https://domain/v2/index.php?Action=GetInstanceAttributes&instanceId=ckafka-xxxxxx&<公共请求参数>
输出:
{"code": 0,"message": "","codeDesc": "Success","data": {"instanceId": "ckafka-rylqnz2l","instanceName": "test","vipList": [{"vip": "172.16.123.15","vport": "9092"}],"vip": "172.16.123.15","vport": "9092","status": 1,"bandwidth": 4000,"diskSize": 3000,"zoneId": 100003,"vpcId": "vpc-7b4slf9d","subnetId": "subnet-q9gkx68q","healthy": 1,"healthyMessage": "","createTime": 1534735551,"expireTime": 1537413951,"msgRetentionTime": 10,"config": {"auto.create.topics.enable": "true",// 是否开启自动创建主题,true表示开启"num.partitions": 3,// 自动创建主题分区数"default.replication.factor": 3//自动创建主题副本个数},"remainderPartitions": 283,"remainderTopics": 148,"createdPartitions": 17,"createdTopics": 2}}