本接口用于查询符合条件的集群列表和详情。
下表列出了接口特定的请求参数以及公共请求参数 Action 和 Version。 其他公共参数,请参见公共参数。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ListClusters | 公共参数,本接口取值为 |
Version | String | 是 | 2021-03-03 | 公共参数,本接口取值为 |
Filter | 否 | 详见请求示例 | 待查询集群的筛选条件。详细说明,请参见ClusterFilterRequest。 | |
Tags | []Tag | 否 | 详见请求示例 | 基于标签查询集群列表。
|
PageNumber | Integer | 否 | 1 | 开始显示返回结果的页码,从 1 开始,默认为 1。 |
PageSize | Integer | 否 | 10 | 单页展示的集群信息数量,最小取值为 1,最大取值为 100,默认取值为 10 个。 |
POST /?Action=ListClusters&Version=2021-03-03 HTTP/1.1 Content-Type:application/json { "PageNumber": 1, "PageSize": 10, "Filter": { "Name": "test", "Ids": ["cc9q8pbfqtofn8jck****"], "DeleteProtectionEnabled": true, "Statuses": [{"Phase": "Running"}] }, "Tags":[ { "Key":"key", "Value":"value" } ] }
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Items | 详见返回示例 | 集群的详细信息列表。更多说明,请参见ClusterResponse。 | |
PageNumber | Integer | 1 | 当前页码。 |
PageSize | Integer | 10 | 单页显示的集群信息条数。 |
TotalCount | Integer | 100 | 返回数据列表的总量。 |
HTTP/1.1 200 OK Content-Type:application/json { "ResponseMetadata": { "RequestId": "2022051511134201****", "Action": "ListClusters", "Version": "2021-03-03", "Service": "veecp_openapi", "Region": "cn-beijing" }, "Result": { "TotalCount": 1, "PageNumber": 1, "PageSize": 10, "Items": [ { "Id": "cc9q8pbfqtofn8jck****", "ClientToken": "", "CreateTime": "2022-05-06T02:49:19Z", "UpdateTime": "2022-05-15T03:13:20Z", "KubernetesVersion": "v1.20.15-vke.2", "Name": "test", "Description": "", "Status": { "Phase": "Running", "Conditions": [ { "Type": "Ok" } ] }, "DeleteProtectionEnabled": true, "ClusterConfig": { "VpcId": "vpc-2d73mgmzuivb458ozfd*****", "SubnetIds": [ "subnet-2d73mhao7vj0g58ozfe53****" ], "SecurityGroupIds": [ "sg-3re8ffwjclybk5zsk2hrp****" ], "ApiServerPublicAccessEnabled": true, "ApiServerPublicAccessConfig": { "PublicAccessNetworkConfig": { "BillingType": 2, "Bandwidth": 1, "Isp": "BGP" } }, "ResourcePublicAccessDefaultEnabled": false, "ApiServerEndpoints": { "PrivateIp": { "Ipv4": "192.168.30.***" }, "PublicIp": { "Ipv4": "10.249.151.***" } } }, "PodsConfig": { "PodNetworkMode": "Flannel", "FlannelConfig": { "PodCidrs": [ "172.18.*.*/20" ], "MaxPodsPerNode": 64 } }, "ServicesConfig": { "ServiceCidrsv4": [ "172.23.88.0/21" ] }, "NodeStatistics": { "TotalCount": 3, "CreatingCount": 0, "RunningCount": 3, "UpdatingCount": 0, "DeletingCount": 0, "FailedCount": 0 }, "ChargeType": "PostPaid", "Tags":[ { "Key":"key", "Value":"value", "Type":"Custom" } ], "LoggingConfig": { "LogProjectId": "xxxx-xxxx-xxxxx", "LogSetups": [ { "LogType": "Audit", "LogTopicId": "xxx-xxx-xxxx", "LogTtl": 30, "Enabled": true } ] } } ] } }
HTTP/1.1 200 OK Content-Type:application/json { "ResponseMetadata": { "RequestId": "2022051511134201****", "Action": "ListClusters", "Version": "2021-03-03", "Service": "veecp_openapi", "Region": "cn-beijing" }, { "Result":{ "Id":"cca4amgvqtofr0pan****", "KubernetesVersion":"v1.20.15-vke.2", "Name":"vpc-cni-test", "Description":"", "Status":{ "Phase":"Running", "Conditions":[ { "Type":"Ok" } ] }, "DeleteProtectionEnabled":false, "ClusterConfig":{ "VpcId":"vpc-2byu7e7duuups2dx0efrp****", "SubnetIds":[ "subnet-3rfdvud78a7ls5zsk2ioe****", "subnet-2byujbut86txc2dx0eeao****" ], "SecurityGroupIds":[ "sg-3rf6nggqn46io5zsk2im0****" ], "ApiServerPublicAccessEnabled":false, "ApiServerPublicAccessConfig":{ "PublicAccessNetworkConfig":{ "BillingType":0, "Bandwidth":0, "Isp":"" } }, "ResourcePublicAccessDefaultEnabled":false, "ApiServerEndpoints":{ "PrivateIp":{ "Ipv4":"192.168.*.*" }, "PublicIp":{ "Ipv4":"" } } }, "PodsConfig":{ "PodNetworkMode":"VpcCniShared", "VpcCniConfig":{ "SubnetIds":[ "subnet-3rfdvud78a7ls5zsk2ioe****", "subnet-2byujbut86txc2dx0eeao****" ] } }, "ServicesConfig":{ "ServiceCidrsv4":[ "172.28.*.*/22" ] }, "NodeStatistics":{ "TotalCount":0, "CreatingCount":0, "RunningCount":0, "UpdatingCount":0, "DeletingCount":0, "FailedCount":0 }, "ChargeType":"PostPaid", "CreateTime":"2022-05-21T09:05:08Z", "UpdateTime":"2022-05-21T09:05:08Z" } } }
本接口无特有错误码,错误码请参见公共错误码。