ZStack Logo

ZStack AIOS

获取IAM2项目可关联的容器集群 (GetIAM2ProjectContainerClusterCandidates)

面向开发者的 API 使用规范、SDK 调用方式和 AIOS 相关接口说明。

API请求

URLs
GET zstack/v1/iam2/projects/container/cluster/candidates
Headers
Authorization: OAuth the-session-uuid
Curl示例
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/iam2/projects/container/cluster/candidates
参数列表
名字 类型 位置 描述 可选值 起始版本
systemTags (可选) List body 系统标签 5.1.8
userTags (可选) List body 用户标签 5.1.8

API返回

返回示例
{
  "inventories": [
    {
      "containerUuid": "endpoint-uuid",
      "clusterId": 1,
      "clusterName": "cluster-a",
      "containerName": "endpoint-a",
      "containerDescription": "container endpoint",
      "projectTag": "project-a"
    }
  ]
}
名字类型描述起始版本
inventoriesList候选容器集群列表5.3.28
containerUuidString容器管理端点UUID5.3.28
clusterIdlong集群ID5.3.28
clusterNameString集群名称5.3.28
containerNameString容器管理端点名称5.3.28
containerDescriptionString容器管理端点描述5.3.28
projectTagString项目标签5.3.28

SDK示例

Java SDK
GetIAM2ProjectContainerClusterCandidatesAction action = new GetIAM2ProjectContainerClusterCandidatesAction();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetIAM2ProjectContainerClusterCandidatesAction.Result res = action.call();
Python SDK
GetIAM2ProjectContainerClusterCandidatesAction action = GetIAM2ProjectContainerClusterCandidatesAction()
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetIAM2ProjectContainerClusterCandidatesAction.Result res = action.call()