Alaya NeW Cloud

查询全部智算中心下K8s集群部署状态

按智算中心聚合返回结果,每个中心包含:合并标识、各K8s集群的合并状态列表。

GEThttps://api.alayanew.com/v1/cci/instance/k8s-clusters/merge-status/all

鉴权(Authorizations)

AuthorizationString必填

用户可通过已获取的 Open API Key 做验证。例如:Bearer [YOUR_API_KEY]

Response

statusInteger

业务状态码,200表示成功。

messageString

接口响应信息,成功或失败原因描述。例如:"OK"

dataArray<Object>

智算中心维度 CCI K8s 合并状态聚合列表。

显示 properties
aidcCodeString

智算中心编码。

aidcIdInteger

智算中心 ID。

isMergedFlagBoolean

智算中心维度是否已合并:任一 K8s 集群合并则为 true。

k8sMergeStatusListArray<Object>

该智算中心下各 K8s 集群合并状态。

显示 properties
zoneIdString

K8s 集群 ID(云下 k8s_id)。

isMergedFlagBoolean

是否合并 K8s 集群。

curl -X 'GET' \
  'https://api.alayanew.com/v1/cci/instance/k8s-clusters/merge-status/all' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer [YOUR_API_KEY]'
import requests

url = "https://api.alayanew.com/v1/cci/instance/k8s-clusters/merge-status/all"

headers = {
    "accept": "application/json",
    "Authorization": "Bearer [YOUR_API_KEY]"
}

response = requests.get(url, headers=headers)
response.raise_for_status()

print(response.json())
const url = 'https://api.alayanew.com/v1/cci/instance/k8s-clusters/merge-status/all';

fetch(url, {
  method: 'GET',
  headers: {
    'accept': 'application/json',
    'Authorization': 'Bearer [YOUR_API_KEY]'
  }
})
  .then(response => {
    if (!response.ok) {
      throw new Error(`HTTP error! status: ${response.status}`);
    }
    return response.json();
  })
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));
{
  "status": 200,
  "message": "OK",
  "data": [
    {
      "aidcCode": "string",
      "aidcId": 9007199254740991,
      "isMergedFlag": true,
      "k8sMergeStatusList": [
        {
          "zoneId": "string",
          "isMergedFlag": true
        }
      ]
    }
  ]
}
{
  "status": 403,
  "message": "Forbidden",
  "data": {}
}
{
  "status": 500,
  "message": "Internal Server Error",
  "data": {}
}

Last updated on