获取租户的CCE集群列表 - ListManagedClusters
功能介绍
获取当前租户的CCE集群列表
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限,具体权限要求请参见权限和授权项。
URI
GET /v1/managedclusters
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
unimported |
否 |
Boolean |
是否已导入到ucs |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
身份认证信息 |
响应参数
状态码:200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
[数组元素] |
Array of Cluster objects |
- |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
kind |
String |
API类型,固定值“Cluster”,该值不可修改。 |
|
apiVersion |
String |
API版本,固定值“v1”,该值不可修改。 |
|
metadata |
ObjectMeta object |
集群的基本信息,为集合类的元素类型,包含一组由不同名称定义的属性。 |
|
spec |
ClusterSpec object |
spec是集合类的元素类型,您对需要管理的集群对象进行详细描述的主体部分都在spec中给出。UCS通过spec的描述来创建或更新对象。 |
|
status |
ClusterStatus object |
集合类的元素类型,用于记录对象在系统中的当前状态信息。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
uid |
String |
集群ID |
|
name |
String |
集群名称 |
|
labels |
Map<String,String> |
标签 |
|
annotations |
Map<String,String> |
插件注解 |
|
creationTimestamp |
String |
创建时间 |
|
updateTimestamp |
String |
更新时间 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
syncMode |
String |
集群和karmada控制面之间的同步模式 |
|
clusterGroupID |
String |
容器舰队id |
|
manageType |
String |
集群类型,取值如下: |
|
ruleNamespaces |
Array of RuleNamespace objects |
集群包含的RuleNamespace列表 |
|
apiEndpoint |
String |
apiserver地址 |
|
secretRef |
LocalSecretReference object |
访问集群的secret信息 |
|
insecureSkipTLSVerification |
Boolean |
是否跳过https校验 |
|
proxyURL |
String |
代理链接 |
|
provider |
String |
提供商 |
|
type |
String |
类型 |
|
category |
String |
类别 |
|
enableDistMgt |
Boolean |
CCE Turbo集群是否支持管理边缘基础设施。 |
|
region |
String |
区域 |
|
country |
String |
国家 |
|
city |
String |
城市 |
|
projectID |
String |
项目id |
|
projectName |
String |
项目名 |
|
zone |
String |
地区 |
|
taints |
Array of Taint objects |
污点 |
|
IsDownloadedCert |
Boolean |
是否已经下载过证书 |
|
policyId |
String |
策略管理id |
|
operatorNamespace |
String |
集群所属domainID |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
rules |
Array of RuleInfo objects |
权限策略列表 |
|
namespaces |
Array of strings |
命名空间列表 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
kubernetesVersion |
String |
kubernetes版本 |
|
conditions |
Array of ConditionStatus objects |
conditions信息 |
|
nodeSummary |
NodeSummary object |
节点统计信息 |
|
resourceSummary |
ResourceSummary object |
资源统计信息 |
|
endpoints |
Endpoint object |
端点 |
|
phase |
String |
阶段状态信息 |
|
reason |
String |
表述上次状况变化的原因 |
|
message |
String |
上次状态转换的详细信息 |
|
arrearFreeze |
String |
欠费冻结 |
|
policeFreeze |
String |
公安冻结 |
|
apiEnablements |
Array of APIEnablement objects |
开启的资源列表 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
type |
String |
状态类型 |
|
status |
String |
状态 |
|
observedgeneration |
Integer |
状态对象的版本 |
|
lastTransitionTime |
String |
上次状态更新的实践 |
|
reason |
String |
状态原因 |
|
message |
String |
状态信息 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
allocatable |
Map<String,Object> |
可分配的资源 |
|
allocating |
Map<String,Object> |
分配中的资源 |
|
allocated |
Map<String,Object> |
已分配的资源 |
|
capacity |
Map<String,Object> |
资源总量 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
groupVersion |
String |
资源组版本 |
|
resources |
Array of APIResource objects |
资源类型、名称 |
状态码:400
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
- |
String |
- |
请求示例
无
响应示例
状态码:200
返回未导入到UCS的CCE集群
[ {
"kind" : "Cluster",
"apiVersion" : "v1",
"metadata" : {
"name" : "cluster-test",
"uid" : "57ef11e7-7d72-11ee-a590-0255ac100b05",
"creationTimestamp" : "2023-11-07T13:34:15Z",
"labels" : {
"FeatureGates" : "elbv3,SupportClientCertificateRevocation,xGPU"
}
},
"spec" : {
"syncMode" : "",
"apiEndpoint" : "https://cce-internal.cn-north-4.myhuaweicloud.com",
"provider" : "huaweicloud",
"type" : "cce",
"category" : "self",
"region" : "cn-north-4",
"country" : "CN",
"city" : "150900",
"projectID" : "b6315dd3d0ff4be5b31a963256794989",
"projectName" : "cn-north-4",
"IsDownloadedCert" : false
},
"status" : {
"kubernetesVersion" : "v1.27",
"conditions" : [ {
"type" : "Ready",
"status" : "True",
"lastTransitionTime" : "2023-11-27T12:42:24.182645394+08:00",
"reason" : "ClusterAvailable"
}, {
"type" : "Cluster",
"status" : "Available",
"lastTransitionTime" : "2023-11-27T12:42:24.182646152+08:00",
"reason" : "ClusterAvailable"
} ],
"endpoints" : [ {
"url" : "https://192.168.1.44:5443",
"type" : "Internal"
} ],
"phase" : "Available"
}
} ]
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
返回未导入到UCS的CCE集群 |
|
400 |
客户端请求错误,服务器无法执行请求 |
错误码
请参见错误码。