查询集群详情
更新时间:2023-06-30
该接口用于查询指定集群的详细信息。
请求结构
GET /v{version}/clusters/{clusterId} HTTP/1.1
Host: kafka-api.bj.baidubce.com
Authorization: authorization string
请求头域
除公共头域外,无其他特殊头域。
请求参数
参数名称 | 类型 | 是否必须 | 参数位置 | 描述 |
---|---|---|---|---|
version | String | 是 | URL参数 | API版本号 |
clusterId | String | 是 | URL参数 | 待查询的集群ID |
返回头域
除公共头域外,无其他特殊头域。
返回参数
参数名称 | 类型 | 描述 |
---|---|---|
cluster | ClusterDetail | 返回的集群详细信息 |
错误码
错误码 | 错误描述 | HTTP状态码 | 描述 |
---|---|---|---|
ERROR_PARAMS | 请求参数错误 | 400 | 请求参数错误 |
CLUSTER_NOT_FOUND | 集群不存在 | 451 | 集群不存在 |
CLUSTER_HAD_DELETED | 集群已删除 | 451 | 集群已删除 |
CLUSTER_NOT_BELONGED | 未拥有该集群 | 451 | 未拥有该集群 |
INTERNAL_ERROR | 服务内部错误 | 500 | 服务内部错误 |
请求示例
GET http://kafka-api.bj.baidubce.com/v2/clusters/33a168bb70c0459787416077114ab233
Authorization: bce-auth-v1/ALTAKaiKeDfBD880eMWBE5oIGE/2023-05-08T11:43:45Z/1800/host;x-bce-date/322f3f98ce57d296c0f5abc64e5554b640ea035c5cb462fcaeab54b9810a3c61
Host: kafka-api.bj.baidubce.com
返回示例
HTTP/1.1 200 OK
x-bce-request-id: 97e6d4ad-6fca-4609-ad4d-9a27c4d1a362
Date: Mon, 08 May 2023 09:39:11 GMT
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"cluster": {
"clusterId": "33a168bb70c0459787416077114ab233",
"clusterSid": "kafka-o8uu8JKS",
"name": "demo",
"region":"bj",
"type": "PROVISIONED",
"mode": "HP",
"state": "ACTIVE",
"provisioned": {
"kafkaVersion": "2.7.2",
"billing": {
"payment": "Prepaid",
"timeLength": 1,
"timeUnit": "month",
"expireTime":"2023-05-15T03:06:01Z",
"renewEnabled": true,
"renewTimeLength": 1,
"renewTimeUnit": "month"
},
"vpc": {
"vpcId":"vpc-tf3xqatke54b",
"name":"默认私有网络",
"cidr":"172.18.0.0/16"
},
"subnets": [
{
"subnetId": "sbn-12kruawmu30u",
"name": "系统预定义子网",
"subnetType": "BCC",
"zone": "cn-fwh-a",
"vpcId": "vpc-tf3xqatke54b",
"cidr": "172.18.0.0/20"
}
],
"logicalZones": [
"cn-fwh-a"
],
"securityGroup": {
"securityGroupId": "g-bqw18bis4cm4",
"name": "KAFKA默认安全组",
"vpcId": "vpc-tf3xqatke54b"
},
"publicIpEnabled": false,
"publicIpBandwidth": 0,
"intranetIpEnabled": false,
"authentications": [
{
"mode": "NONE"
},
{
"mode": "SASL_SCRAM"
}
],
"aclEnabled": true,
"numberOfBrokerNodes": 3,
"numberOfBrokerNodesPerZone": 3,
"nodeType": "kafka.g4.c2m8",
"storageMeta": {
"storageType": "ENHANCED_SSD_PL1",
"storageSize": 100,
"numberOfDisk": 1
},
"configMeta": {
"configId": null,
"revisionId": null,
"context": {
"log.retention.hours":"24"
}
},
"deploySetEnabled": false,
},
"tags": [
{
"tagKey": "KAFKA-Cluster",
"tagValue": ""
}
],
"createTime": "2023-05-10T03:06:01Z"
}
}