From e83629d452f34c67caa1d65bd12b86faf0dd5bdd Mon Sep 17 00:00:00 2001 From: Claudio Ferreira Filho Date: Thu, 26 Mar 2026 09:50:49 -0300 Subject: [PATCH 1/7] feat: add custom endpoint domain support for HCSO/on-premise deployments - Add HUAWEI_ENDPOINT_DOMAIN env var to override myhuaweicloud.com domain - Add endpoint_domain field to MCPConfig (config.yaml + env var) - Modify create_api_client to replace domain when endpoint_domain is set - Pass endpoint_domain from config through server to API client This enables usage with Huawei Cloud Stack Online (HCSO) and other on-premise deployments where API endpoints use a different domain. Closes #137 --- assets/utils/hwc_tools.py | 13 ++++++++++--- assets/utils/model.py | 1 + assets/utils/server.py | 2 +- assets/utils/variable.py | 1 + 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/assets/utils/hwc_tools.py b/assets/utils/hwc_tools.py index 6ef73bd..995bc09 100644 --- a/assets/utils/hwc_tools.py +++ b/assets/utils/hwc_tools.py @@ -17,6 +17,7 @@ from .variable import ( HUAWEI_ACCESS_KEY, HUAWEI_SECRET_KEY, + HUAWEI_ENDPOINT_DOMAIN, MCP_SERVER_MODE, MCP_SERVER_PORT, ) @@ -160,11 +161,15 @@ def do_http_request( return response -def create_api_client(ak, sk, x_host, region="cn-north-4"): +def create_api_client(ak, sk, x_host, region="cn-north-4", endpoint_domain=None): endpoint = x_host - if x_host.find("com") != -1: - endpoint = f"https://{x_host}" + # Support custom endpoint domain for HCSO / on-premise deployments + if endpoint_domain and "myhuaweicloud.com" in endpoint: + endpoint = endpoint.replace("myhuaweicloud.com", endpoint_domain) + + if "." in endpoint and not endpoint.startswith("http"): + endpoint = f"https://{endpoint}" if endpoint.find("{region}") != -1: endpoint = endpoint.replace("{region}", region) @@ -269,11 +274,13 @@ def load_config(config_path: Union[str, Path]) -> MCPConfig: port=config_dict.get("port", 8888), ak=config_dict.get("ak", ""), sk=config_dict.get("sk", ""), + endpoint_domain=config_dict.get("endpoint_domain", ""), ) env_mapping = [ (HUAWEI_ACCESS_KEY, "ak", None, None), (HUAWEI_SECRET_KEY, "sk", None, None), + (HUAWEI_ENDPOINT_DOMAIN, "endpoint_domain", None, None), (MCP_SERVER_MODE, "transport", None, get_args(TransportType)), (MCP_SERVER_PORT, "port", int, None), ] diff --git a/assets/utils/model.py b/assets/utils/model.py index 9952c50..0eb288a 100644 --- a/assets/utils/model.py +++ b/assets/utils/model.py @@ -11,6 +11,7 @@ class MCPConfig: transport: TransportType ak: Optional[str] = None sk: Optional[str] = None + endpoint_domain: Optional[str] = None def check(self): if not self.service_code: diff --git a/assets/utils/server.py b/assets/utils/server.py index b9c1ad2..0a6f455 100644 --- a/assets/utils/server.py +++ b/assets/utils/server.py @@ -135,7 +135,7 @@ async def call_tool( } raise ToolError(error_msg) - client = create_api_client(ak, sk, x_host, region) + client = create_api_client(ak, sk, x_host, region, self.config.endpoint_domain) try: arguments = filter_parameters(arguments) diff --git a/assets/utils/variable.py b/assets/utils/variable.py index 3dc7102..92228cf 100644 --- a/assets/utils/variable.py +++ b/assets/utils/variable.py @@ -2,5 +2,6 @@ TRANSPORT_HTTP = "http" HUAWEI_ACCESS_KEY = "HUAWEI_ACCESS_KEY" HUAWEI_SECRET_KEY = "HUAWEI_SECRET_KEY" +HUAWEI_ENDPOINT_DOMAIN = "HUAWEI_ENDPOINT_DOMAIN" MCP_SERVER_MODE = "MCP_SERVER_MODE" MCP_SERVER_PORT = "MCP_SERVER_PORT" From 38ba449fcb69369dafde90868362644d54df4295 Mon Sep 17 00:00:00 2001 From: Claudio Ferreira Filho Date: Wed, 8 Apr 2026 09:03:33 -0300 Subject: [PATCH 2/7] feat: add HCSO internal network support (prefix, project_id, iam_endpoint) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - HUAWEI_ENDPOINT_PREFIX: inject suffix into service name (e.g. '-prevnet') roma.region.domain → roma-prevnet.region.domain - HUAWEI_PROJECT_ID: required for HCSO on-premise authentication - HUAWEI_IAM_ENDPOINT: custom IAM endpoint for on-premise deployments Uses BasicCredentials.with_iam_endpoint() for HCSO IAM All new parameters supported via env vars and config.yaml. --- .gitignore | 3 ++- assets/utils/hwc_tools.py | 22 ++++++++++++++++++++-- assets/utils/model.py | 3 +++ assets/utils/server.py | 8 +++++++- assets/utils/variable.py | 3 +++ 5 files changed, 35 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 150a2e8..300efc5 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ test.py /.venv/ .vscode *.egg-info -uv.lock \ No newline at end of file +uv.lockdocs/ +NOTA-FORNECEDOR-HUAWEI.md diff --git a/assets/utils/hwc_tools.py b/assets/utils/hwc_tools.py index 995bc09..0211ce5 100644 --- a/assets/utils/hwc_tools.py +++ b/assets/utils/hwc_tools.py @@ -18,6 +18,9 @@ HUAWEI_ACCESS_KEY, HUAWEI_SECRET_KEY, HUAWEI_ENDPOINT_DOMAIN, + HUAWEI_ENDPOINT_PREFIX, + HUAWEI_PROJECT_ID, + HUAWEI_IAM_ENDPOINT, MCP_SERVER_MODE, MCP_SERVER_PORT, ) @@ -161,20 +164,29 @@ def do_http_request( return response -def create_api_client(ak, sk, x_host, region="cn-north-4", endpoint_domain=None): +def create_api_client(ak, sk, x_host, region="cn-north-4", endpoint_domain=None, + endpoint_prefix=None, project_id=None, iam_endpoint=None): endpoint = x_host # Support custom endpoint domain for HCSO / on-premise deployments if endpoint_domain and "myhuaweicloud.com" in endpoint: endpoint = endpoint.replace("myhuaweicloud.com", endpoint_domain) + # Inject prefix into service name (e.g. "-prevnet" for internal network) + # roma.region.domain → roma-prevnet.region.domain + if endpoint_prefix: + dot_idx = endpoint.index(".") + endpoint = endpoint[:dot_idx] + endpoint_prefix + endpoint[dot_idx:] + if "." in endpoint and not endpoint.startswith("http"): endpoint = f"https://{endpoint}" if endpoint.find("{region}") != -1: endpoint = endpoint.replace("{region}", region) - credentials = BasicCredentials(ak, sk) + credentials = BasicCredentials(ak, sk, project_id) + if iam_endpoint: + credentials = credentials.with_iam_endpoint(iam_endpoint) http_config = HttpConfig() http_config.ignore_ssl_verification = True @@ -275,12 +287,18 @@ def load_config(config_path: Union[str, Path]) -> MCPConfig: ak=config_dict.get("ak", ""), sk=config_dict.get("sk", ""), endpoint_domain=config_dict.get("endpoint_domain", ""), + endpoint_prefix=config_dict.get("endpoint_prefix", ""), + project_id=config_dict.get("project_id", ""), + iam_endpoint=config_dict.get("iam_endpoint", ""), ) env_mapping = [ (HUAWEI_ACCESS_KEY, "ak", None, None), (HUAWEI_SECRET_KEY, "sk", None, None), (HUAWEI_ENDPOINT_DOMAIN, "endpoint_domain", None, None), + (HUAWEI_ENDPOINT_PREFIX, "endpoint_prefix", None, None), + (HUAWEI_PROJECT_ID, "project_id", None, None), + (HUAWEI_IAM_ENDPOINT, "iam_endpoint", None, None), (MCP_SERVER_MODE, "transport", None, get_args(TransportType)), (MCP_SERVER_PORT, "port", int, None), ] diff --git a/assets/utils/model.py b/assets/utils/model.py index 0eb288a..4f7977b 100644 --- a/assets/utils/model.py +++ b/assets/utils/model.py @@ -12,6 +12,9 @@ class MCPConfig: ak: Optional[str] = None sk: Optional[str] = None endpoint_domain: Optional[str] = None + endpoint_prefix: Optional[str] = None + project_id: Optional[str] = None + iam_endpoint: Optional[str] = None def check(self): if not self.service_code: diff --git a/assets/utils/server.py b/assets/utils/server.py index 0a6f455..1ecb557 100644 --- a/assets/utils/server.py +++ b/assets/utils/server.py @@ -135,7 +135,13 @@ async def call_tool( } raise ToolError(error_msg) - client = create_api_client(ak, sk, x_host, region, self.config.endpoint_domain) + client = create_api_client( + ak, sk, x_host, region, + self.config.endpoint_domain, + self.config.endpoint_prefix, + self.config.project_id, + self.config.iam_endpoint, + ) try: arguments = filter_parameters(arguments) diff --git a/assets/utils/variable.py b/assets/utils/variable.py index 92228cf..3102770 100644 --- a/assets/utils/variable.py +++ b/assets/utils/variable.py @@ -3,5 +3,8 @@ HUAWEI_ACCESS_KEY = "HUAWEI_ACCESS_KEY" HUAWEI_SECRET_KEY = "HUAWEI_SECRET_KEY" HUAWEI_ENDPOINT_DOMAIN = "HUAWEI_ENDPOINT_DOMAIN" +HUAWEI_ENDPOINT_PREFIX = "HUAWEI_ENDPOINT_PREFIX" +HUAWEI_PROJECT_ID = "HUAWEI_PROJECT_ID" +HUAWEI_IAM_ENDPOINT = "HUAWEI_IAM_ENDPOINT" MCP_SERVER_MODE = "MCP_SERVER_MODE" MCP_SERVER_PORT = "MCP_SERVER_PORT" From 6e6bbcfe666094217436b531a4955e9cd3af4177 Mon Sep 17 00:00:00 2001 From: Claudio Ferreira Filho Date: Fri, 10 Apr 2026 15:11:47 -0300 Subject: [PATCH 3/7] chore: prepare for PyPI publishing (v0.3.1) - Bump version to 0.3.1 - Add HCSO/on-premise to description and keywords - Fix license to Apache-2.0 (matching repo LICENSE) - Add project URLs (fork + upstream) - Add Python 3.11-3.13 classifiers - Add co-author --- pyproject.toml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c6abd59..26c8b55 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,21 +6,25 @@ build-backend = "setuptools.build_meta" [project] name = "huaweicloud-mcp-server" -version = "0.3.0" -description = "A Model Context Protocol server providing tools for Huawei Cloud" +version = "0.3.1" +description = "A Model Context Protocol server providing tools for Huawei Cloud. Fork with HCSO/on-premise support." readme = "README.md" requires-python = ">=3.10" authors = [ { name = "huaweicloud-dtse-team", email = "huaweicloud-dtse-team@huawei.com" }, + { name = "Claudio Filho", email = "filhocf@gmail.com" }, ] -keywords = ["huaweicloud", "mcp", "llm"] -license = { text = "MIT" } +keywords = ["huaweicloud", "mcp", "llm", "hcso", "on-premise"] +license = { text = "Apache-2.0" } classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", + "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] dependencies = [ "aiohttp>=3.11.18", @@ -32,6 +36,12 @@ dependencies = [ "huaweicloudsdkcore>=3.1.150" ] +[project.urls] +Homepage = "https://github.com/filhocf/mcp-server" +Repository = "https://github.com/filhocf/mcp-server" +Upstream = "https://github.com/HuaweiCloudDeveloper/mcp-server" +Issues = "https://github.com/HuaweiCloudDeveloper/mcp-server/issues" + [tool.setuptools] packages = [ "assets", From 3b93dfae9be7bc9f29cccf4c8b011003d7972215 Mon Sep 17 00:00:00 2001 From: Claudio Ferreira Filho Date: Thu, 16 Apr 2026 09:32:39 -0300 Subject: [PATCH 4/7] feat: add multi-tenant support via HUAWEI_TENANTS_FILE - New TenantConfig dataclass for per-tenant credentials - HUAWEI_TENANTS_FILE env var points to JSON with tenant configs - 'tenant' parameter injected into all tools when multi-tenant active - call_tool resolves credentials from tenant > default_tenant > config - Backward compatible: without HUAWEI_TENANTS_FILE, behavior unchanged - tenants.example.json with sicar/mgi template - .gitignore: docs/, uv.lock, tenants.json --- .gitignore | 3 +++ assets/utils/hwc_tools.py | 34 ++++++++++++++++++++++++++- assets/utils/model.py | 17 +++++++++++++- assets/utils/server.py | 49 +++++++++++++++++++++++++++++++++------ assets/utils/variable.py | 1 + tenants.example.json | 23 ++++++++++++++++++ 6 files changed, 118 insertions(+), 9 deletions(-) create mode 100644 tenants.example.json diff --git a/.gitignore b/.gitignore index 300efc5..5480500 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,6 @@ test.py *.egg-info uv.lockdocs/ NOTA-FORNECEDOR-HUAWEI.md +docs/ +uv.lock +tenants.json diff --git a/assets/utils/hwc_tools.py b/assets/utils/hwc_tools.py index 0211ce5..55c868e 100644 --- a/assets/utils/hwc_tools.py +++ b/assets/utils/hwc_tools.py @@ -13,7 +13,7 @@ from huaweicloudsdkcore.sdk_response import FutureSdkResponse from huaweicloudsdkcore.utils import http_utils -from .model import MCPConfig, TransportType +from .model import MCPConfig, TransportType, TenantConfig from .variable import ( HUAWEI_ACCESS_KEY, HUAWEI_SECRET_KEY, @@ -21,6 +21,7 @@ HUAWEI_ENDPOINT_PREFIX, HUAWEI_PROJECT_ID, HUAWEI_IAM_ENDPOINT, + HUAWEI_TENANTS_FILE, MCP_SERVER_MODE, MCP_SERVER_PORT, ) @@ -269,6 +270,31 @@ def load_openapi(config_path): raise IOError(f"加载OpenAPI文件失败: {str(e)}") +def _load_tenants_file(path: str) -> dict[str, TenantConfig]: + """Load tenants from a JSON file. Format: + { + "default": "sicar", + "tenants": { + "sicar": {"ak": "...", "sk": "...", "project_id": "...", ...}, + "mgi": {"ak": "...", "sk": "...", "project_id": "...", ...} + } + } + """ + with open(path, "r", encoding="utf-8") as f: + data = json.load(f) + tenants = {} + for name, t in data.get("tenants", {}).items(): + tenants[name] = TenantConfig( + name=name, ak=t["ak"], sk=t["sk"], + endpoint_domain=t.get("endpoint_domain"), + endpoint_prefix=t.get("endpoint_prefix"), + project_id=t.get("project_id"), + iam_endpoint=t.get("iam_endpoint"), + region=t.get("region"), + ) + return data.get("default"), tenants + + def load_config(config_path: Union[str, Path]) -> MCPConfig: try: with open(config_path, "r", encoding="utf-8") as f: @@ -314,6 +340,12 @@ def load_config(config_path: Union[str, Path]) -> MCPConfig: f"无效值 '{value_to_set}'. 有效值清单: {allowed_values}" ) setattr(cfg, attr_name, value_to_set) + + # Load multi-tenant config if HUAWEI_TENANTS_FILE is set + tenants_file = os.environ.get(HUAWEI_TENANTS_FILE) + if tenants_file: + cfg.default_tenant, cfg.tenants = _load_tenants_file(tenants_file) + # 参数校验 cfg.check() return cfg diff --git a/assets/utils/model.py b/assets/utils/model.py index 4f7977b..42c8b32 100644 --- a/assets/utils/model.py +++ b/assets/utils/model.py @@ -1,9 +1,22 @@ -from dataclasses import dataclass +from dataclasses import dataclass, field from typing import Optional, Literal TransportType = Literal["sse", "stdio", "http"] +@dataclass +class TenantConfig: + """Credentials and endpoint config for a single HCSO tenant.""" + name: str + ak: str + sk: str + endpoint_domain: Optional[str] = None + endpoint_prefix: Optional[str] = None + project_id: Optional[str] = None + iam_endpoint: Optional[str] = None + region: Optional[str] = None + + @dataclass class MCPConfig: port: int @@ -15,6 +28,8 @@ class MCPConfig: endpoint_prefix: Optional[str] = None project_id: Optional[str] = None iam_endpoint: Optional[str] = None + tenants: dict[str, TenantConfig] = field(default_factory=dict) + default_tenant: Optional[str] = None def check(self): if not self.service_code: diff --git a/assets/utils/server.py b/assets/utils/server.py index 1ecb557..3299f67 100644 --- a/assets/utils/server.py +++ b/assets/utils/server.py @@ -1,6 +1,7 @@ import asyncio import contextlib import json +import os import time import uuid from pathlib import Path @@ -82,6 +83,19 @@ def initialize(self) -> None: self.tools = OpenAPIToToolsConverter(self.openapi_dict).convert() logger.info(f"成功加载 {len(self.tools)} 个工具") + # Inject 'tenant' parameter into all tools if multi-tenant is configured + tenants_file = os.environ.get("HUAWEI_TENANTS_FILE") + if tenants_file and self.config.tenants: + tenant_names = list(self.config.tenants.keys()) + for tool in self.tools: + schema = tool.inputSchema + if "properties" not in schema: + schema["properties"] = {} + schema["properties"]["tenant"] = { + "type": "string", + "description": f"Tenant name. Available: {tenant_names}", + } + # 注册工具处理函数 self._register_tool_handlers() @@ -122,11 +136,32 @@ async def list_tools() -> list[Tool]: async def call_tool( name: str, arguments: dict ) -> list[TextContent | ImageContent | EmbeddedResource]: - region = arguments.get("region") or "cn-north-4" + region = arguments.pop("region", None) or "cn-north-4" + tenant_name = arguments.pop("tenant", None) x_host = self.openapi_dict["info"]["x-host"] - ak = self.config.ak - sk = self.config.sk + # Resolve credentials: tenant > config defaults + ak, sk = self.config.ak, self.config.sk + endpoint_domain = self.config.endpoint_domain + endpoint_prefix = self.config.endpoint_prefix + project_id = self.config.project_id + iam_endpoint = self.config.iam_endpoint + + if self.config.tenants: + t_name = tenant_name or self.config.default_tenant + if t_name and t_name in self.config.tenants: + t = self.config.tenants[t_name] + ak, sk = t.ak, t.sk + endpoint_domain = t.endpoint_domain or endpoint_domain + endpoint_prefix = t.endpoint_prefix or endpoint_prefix + project_id = t.project_id or project_id + iam_endpoint = t.iam_endpoint or iam_endpoint + region = t.region or region + elif t_name: + available = list(self.config.tenants.keys()) + raise ToolError( + f"Unknown tenant '{t_name}'. Available: {available}" + ) if not ak or not sk: error_msg = { @@ -137,10 +172,10 @@ async def call_tool( client = create_api_client( ak, sk, x_host, region, - self.config.endpoint_domain, - self.config.endpoint_prefix, - self.config.project_id, - self.config.iam_endpoint, + endpoint_domain, + endpoint_prefix, + project_id, + iam_endpoint, ) try: arguments = filter_parameters(arguments) diff --git a/assets/utils/variable.py b/assets/utils/variable.py index 3102770..783ccab 100644 --- a/assets/utils/variable.py +++ b/assets/utils/variable.py @@ -6,5 +6,6 @@ HUAWEI_ENDPOINT_PREFIX = "HUAWEI_ENDPOINT_PREFIX" HUAWEI_PROJECT_ID = "HUAWEI_PROJECT_ID" HUAWEI_IAM_ENDPOINT = "HUAWEI_IAM_ENDPOINT" +HUAWEI_TENANTS_FILE = "HUAWEI_TENANTS_FILE" MCP_SERVER_MODE = "MCP_SERVER_MODE" MCP_SERVER_PORT = "MCP_SERVER_PORT" diff --git a/tenants.example.json b/tenants.example.json new file mode 100644 index 0000000..56d948a --- /dev/null +++ b/tenants.example.json @@ -0,0 +1,23 @@ +{ + "default": "sicar", + "tenants": { + "sicar": { + "ak": "", + "sk": "", + "project_id": "", + "endpoint_domain": "hcso.dataprev.gov.br", + "endpoint_prefix": "-prevnet", + "iam_endpoint": "https://iam-pub-prevnet.la-south-6001.hcso.dataprev.gov.br", + "region": "la-south-6001" + }, + "mgi": { + "ak": "", + "sk": "", + "project_id": "", + "endpoint_domain": "", + "endpoint_prefix": "", + "iam_endpoint": "", + "region": "" + } + } +} From 8477c41e96932268bec07eb2608d09aaf9a889ca Mon Sep 17 00:00:00 2001 From: Claudio Ferreira Filho Date: Thu, 16 Apr 2026 09:51:12 -0300 Subject: [PATCH 5/7] =?UTF-8?q?feat:=20unified=20server=20mode=20=E2=80=94?= =?UTF-8?q?=20single=20process=20for=20multiple=20services=20(#142)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - New UnifiedMCPServer class loads multiple OpenAPI specs in one process - HUAWEI_SERVICES env var: comma-separated service codes (e.g. ecs,vpc,cce) - Tools prefixed with service code (ecs_ListServers, vpc_ListVpcs) - Compatible with multi-tenant (HUAWEI_TENANTS_FILE) - Graceful handling of invalid OpenAPI JSONs (skip with warning) - New entry point: mcp-server-unified - Fix: CCE OpenAPI JSON trailing comma --- assets/utils/unified_server.py | 259 + .../src/mcp_server_cce/config/cce.json | 26395 ++++++++-------- .../src/mcp_server_unified/__init__.py | 1 + .../src/mcp_server_unified/config/config.yaml | 3 + .../src/mcp_server_unified/run.py | 29 + pyproject.toml | 1 + 6 files changed, 14341 insertions(+), 12347 deletions(-) create mode 100644 assets/utils/unified_server.py create mode 100644 huaweicloud_services_server/mcp_server_unified/src/mcp_server_unified/__init__.py create mode 100644 huaweicloud_services_server/mcp_server_unified/src/mcp_server_unified/config/config.yaml create mode 100644 huaweicloud_services_server/mcp_server_unified/src/mcp_server_unified/run.py diff --git a/assets/utils/unified_server.py b/assets/utils/unified_server.py new file mode 100644 index 0000000..168c220 --- /dev/null +++ b/assets/utils/unified_server.py @@ -0,0 +1,259 @@ +import asyncio +import json +import os +import time +import uuid +from pathlib import Path +from typing import Any, Optional + +import uvicorn +from huaweicloudsdkcore.exceptions.exceptions import ClientRequestException +from mcp.server import Server +from mcp.server.fastmcp.exceptions import ToolError +from mcp.server.fastmcp.utilities.logging import configure_logging, get_logger +from mcp.server.sse import SseServerTransport +from mcp.server.stdio import stdio_server +from mcp.server.streamable_http_manager import StreamableHTTPSessionManager +from mcp.types import Tool, TextContent, ImageContent, EmbeddedResource +from starlette.applications import Starlette +from starlette.middleware.cors import CORSMiddleware +from starlette.responses import JSONResponse +from starlette.routing import Mount, Route +from starlette.types import Receive, Scope, Send + +from .hwc_tools import ( + create_api_client, + build_http_info, + load_openapi, + filter_parameters, + load_config, +) +from .model import MCPConfig +from .openapi import OpenAPIToToolsConverter +from .variable import TRANSPORT_SSE, TRANSPORT_HTTP + +logger = get_logger(__name__) +configure_logging("INFO") + +HUAWEI_SERVICES = "HUAWEI_SERVICES" + + +def _find_openapi_json(service_code: str) -> Optional[Path]: + """Locate the OpenAPI JSON for a service code.""" + base = Path(__file__).parent.parent.parent / "huaweicloud_services_server" + candidate = base / f"mcp_server_{service_code}" / "src" / f"mcp_server_{service_code}" / "config" / f"{service_code}.json" + return candidate if candidate.exists() else None + + +class UnifiedMCPServer: + """Single-process MCP server that loads multiple Huawei Cloud services.""" + + def __init__(self, config_path: Path): + self.config_path = config_path + self.config: Optional[MCPConfig] = None + self.server: Optional[Server] = None + self.tools: list[Tool] = [] + self.initialized: bool = False + + # service_code -> {openapi_dict, tools} + self.services: dict[str, dict[str, Any]] = {} + + self.initialize() + + def initialize(self) -> None: + if self.initialized: + return + + logger.info("Initializing unified MCP server...") + + self.config = load_config(self.config_path) + if not self.config: + raise ValueError("Failed to load config") + + self.server = Server("hwc-mcp-server-unified") + + # Determine which services to load + services_env = os.environ.get(HUAWEI_SERVICES, "") + if not services_env: + raise ValueError( + f"{HUAWEI_SERVICES} env var required. " + "Comma-separated service codes, e.g.: ecs,vpc,cce,elb" + ) + + service_codes = [s.strip().lower() for s in services_env.split(",") if s.strip()] + logger.info(f"Loading {len(service_codes)} services: {service_codes}") + + for code in service_codes: + json_path = _find_openapi_json(code) + if not json_path: + logger.warning(f"OpenAPI JSON not found for service '{code}', skipping") + continue + + try: + openapi_dict = load_openapi(json_path) + except Exception as e: + logger.warning(f"Failed to load OpenAPI for '{code}': {e}, skipping") + continue + + raw_tools = OpenAPIToToolsConverter(openapi_dict).convert() + + # Prefix tool names with service code + prefixed_tools = [] + for tool in raw_tools: + prefixed = Tool( + name=f"{code}_{tool.name}", + description=f"[{code.upper()}] {tool.description or tool.name}", + inputSchema=tool.inputSchema, + ) + prefixed_tools.append(prefixed) + + self.services[code] = { + "openapi_dict": openapi_dict, + "tools": prefixed_tools, + "raw_tools": raw_tools, + } + self.tools.extend(prefixed_tools) + logger.info(f" {code}: {len(raw_tools)} tools loaded") + + # Inject tenant parameter if multi-tenant active + if self.config.tenants: + tenant_names = list(self.config.tenants.keys()) + for tool in self.tools: + tool.inputSchema.setdefault("properties", {})["tenant"] = { + "type": "string", + "description": f"Tenant name. Available: {tenant_names}", + } + + logger.info(f"Total: {len(self.tools)} tools from {len(self.services)} services") + + self._register_tool_handlers() + self.initialized = True + + def _resolve_service(self, prefixed_name: str): + """Given 'ecs_ListServers', return ('ecs', 'ListServers', service_dict).""" + for code, svc in self.services.items(): + prefix = f"{code}_" + if prefixed_name.startswith(prefix): + original_name = prefixed_name[len(prefix):] + return code, original_name, svc + raise ToolError(f"Unknown tool: {prefixed_name}") + + def _register_tool_handlers(self) -> None: + if not self.server: + raise RuntimeError("Server not initialized") + + @self.server.list_tools() + async def list_tools() -> list[Tool]: + return self.tools + + @self.server.call_tool() + async def call_tool( + name: str, arguments: dict + ) -> list[TextContent | ImageContent | EmbeddedResource]: + code, original_name, svc = self._resolve_service(name) + openapi_dict = svc["openapi_dict"] + raw_tools = svc["raw_tools"] + + region = arguments.pop("region", None) or "cn-north-4" + tenant_name = arguments.pop("tenant", None) + x_host = openapi_dict["info"]["x-host"] + + # Resolve credentials + ak, sk = self.config.ak, self.config.sk + endpoint_domain = self.config.endpoint_domain + endpoint_prefix = self.config.endpoint_prefix + project_id = self.config.project_id + iam_endpoint = self.config.iam_endpoint + + if self.config.tenants: + t_name = tenant_name or self.config.default_tenant + if t_name and t_name in self.config.tenants: + t = self.config.tenants[t_name] + ak, sk = t.ak, t.sk + endpoint_domain = t.endpoint_domain or endpoint_domain + endpoint_prefix = t.endpoint_prefix or endpoint_prefix + project_id = t.project_id or project_id + iam_endpoint = t.iam_endpoint or iam_endpoint + region = t.region or region + elif t_name: + raise ToolError( + f"Unknown tenant '{t_name}'. Available: {list(self.config.tenants.keys())}" + ) + + if not ak or not sk: + raise ToolError("HUAWEI_ACCESS_KEY or HUAWEI_SECRET_KEY not configured") + + client = create_api_client( + ak, sk, x_host, region, + endpoint_domain, endpoint_prefix, project_id, iam_endpoint, + ) + try: + arguments = filter_parameters(arguments) + http_info = build_http_info(original_name, arguments, openapi_dict, raw_tools) + response = client.do_http_request(**http_info) + response_data = response.json() if response and response.content else {} + return [ + TextContent( + type="text", + text=json.dumps(response_data, indent=2, ensure_ascii=False), + ) + ] + except ClientRequestException as ex: + logger.error(f"[{code}] API request failed: {ex.error_msg}") + raise ValueError(ex.error_msg) + except Exception as ex: + logger.error(f"[{code}] Unexpected error: {str(ex)}") + raise + + async def run_server(self): + if not self.initialized: + raise RuntimeError("Server not initialized") + if self.config.transport == TRANSPORT_SSE: + await self._run_sse() + elif self.config.transport == TRANSPORT_HTTP: + await self._run_http() + else: + await self._run_stdio() + + async def _run_stdio(self): + logger.info("Starting unified server (stdio)") + async with stdio_server() as (read_stream, write_stream): + await self.server.run( + read_stream, write_stream, self.server.create_initialization_options() + ) + + async def _run_sse(self): + logger.info(f"Starting unified server (SSE) on port {self.config.port}") + sse = SseServerTransport("/messages/") + + async def handle_sse(request): + async with sse.connect_sse( + request.scope, request.receive, request._send + ) as streams: + await self.server.run( + streams[0], streams[1], self.server.create_initialization_options() + ) + + starlette_app = Starlette( + routes=[ + Route("/sse", endpoint=handle_sse), + Mount("/messages/", app=sse.handle_post_message), + ] + ) + starlette_app.add_middleware(CORSMiddleware, allow_origins=["*"], allow_methods=["*"], allow_headers=["*"]) + + config = uvicorn.Config(starlette_app, host="0.0.0.0", port=self.config.port) + server = uvicorn.Server(config) + await server.serve() + + async def _run_http(self): + logger.info(f"Starting unified server (HTTP) on port {self.config.port}") + session_manager = StreamableHTTPSessionManager( + app=self.server, + json_response=True, + stateless=True, + ) + await session_manager.run( + host="0.0.0.0", + port=self.config.port, + ) diff --git a/huaweicloud_services_server/mcp_server_cce/src/mcp_server_cce/config/cce.json b/huaweicloud_services_server/mcp_server_cce/src/mcp_server_cce/config/cce.json index aa0d0a7..1f3b660 100644 --- a/huaweicloud_services_server/mcp_server_cce/src/mcp_server_cce/config/cce.json +++ b/huaweicloud_services_server/mcp_server_cce/src/mcp_server_cce/config/cce.json @@ -1,13631 +1,15332 @@ { - "openapi" : "3.0.0", - "info" : { - "description" : "CCE-集群升级", - "title" : "CCE", - "version" : "2025-06-13", + "openapi": "3.0.0", + "info": { + "description": "CCE-集群升级", + "title": "CCE", + "version": "2025-06-13", "x-host_prefix": "cce", - "x-host" : "cce.{region}.myhuaweicloud.com", + "x-host": "cce.{region}.myhuaweicloud.com" }, - "servers" : [ { - "url" : "/" - } ], - "components" : { - "parameters" : { - "param_path_clusterid" : { - "name" : "cluster_id", - "in" : "path", - "description" : "集群ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", - "required" : true, - "schema" : { - "description" : "集群ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", - "type" : "string", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - }, - "type" : "object" - }, - "param_path_projectid" : { - "name" : "project_id", - "in" : "path", - "description" : "项目ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", - "required" : true, - "schema" : { - "description" : "项目ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", - "type" : "string" - }, - "type" : "object" - }, - "param_header_x_auth_token" : { - "name" : "X-Auth-Token", - "in" : "header", - "description" : "调用接口的认证方式分为Token和AK/SK两种,如果您使用的Token方式,此参数为必填,请填写Token的值,获取方式请参见[获取token](cce_02_0004.xml)。", - "required" : true, - "schema" : { - "description" : "调用接口的认证方式分为Token和AK/SK两种,如果您使用的Token方式,此参数为必填,请填写Token的值,获取方式请参见[获取token](cce_02_0004.xml)。", - "type" : "string", - "maxLength" : 16384 - }, - "type" : "object" - }, - "param_header_content_type" : { - "name" : "Content-Type", - "in" : "header", - "description" : "消息体的类型(格式)", - "required" : true, - "schema" : { - "description" : "消息体的类型(格式)", - "type" : "string", - "default" : "application/json" - }, - "type" : "object" - }, - "param_path_chart_id" : { - "name" : "chart_id", - "in" : "path", - "description" : "模板的ID", - "required" : true, - "schema" : { - "description" : "模板的ID", - "type" : "string", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - }, - "type" : "object" - }, - "param_path_upgradeworkflowid" : { - "name" : "upgrade_workflow_id", - "in" : "path", - "description" : "集群升级任务引导流程ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", - "required" : true, - "schema" : { - "description" : "集群升级任务引导流程ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", - "type" : "string", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - }, - "type" : "object" - }, - "param_path_nodeid" : { - "name" : "node_id", - "in" : "path", - "description" : "节点ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", - "required" : true, - "schema" : { - "description" : "节点ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", - "type" : "string", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - }, - "type" : "object" - }, - "param_path_nodepool_id" : { - "name" : "nodepool_id", - "in" : "path", - "description" : "节点池ID", - "required" : true, - "schema" : { - "description" : "节点池ID", - "type" : "string", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - }, - "type" : "object" - }, - "param_query_cluster_type" : { - "name" : "cluster_type", - "in" : "query", - "description" : "集群类型,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", - "required" : false, - "schema" : { - "description" : "集群类型,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", - "type" : "string" - }, - "type" : "object" - }, - "param_query_network_mode" : { - "name" : "network_mode", - "in" : "query", - "description" : "集群网络类型,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", - "required" : false, - "schema" : { - "description" : "集群网络类型,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", - "type" : "string" - }, - "type" : "object" - }, - "param_query_cluster_version" : { - "name" : "cluster_version", - "in" : "query", - "description" : "集群版本,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", - "required" : false, - "schema" : { - "description" : "集群版本,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", - "type" : "string" - }, - "type" : "object" - }, - "param_query_clusterid" : { - "name" : "cluster_id", - "in" : "query", - "description" : "集群ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", - "required" : false, - "schema" : { - "description" : "集群ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", - "type" : "string", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - }, - "type" : "object" - }, - "ListImageCachesParam_header_x_auth_token" : { - "name" : "X-Auth-Token", - "in" : "header", - "description" : "**参数解释:**", - "required" : true, - "schema" : { - "description" : "**参数解释:**", - "type" : "string", - "maxLength" : 16384, - "minLength" : 1 - }, - "type" : "object" - }, - "ListImageCachesParam_header_content_type" : { - "name" : "Content-Type", - "in" : "header", - "description" : "**参数解释:**", - "required" : true, - "schema" : { - "description" : "**参数解释:**", - "type" : "string", - "default" : "application/json", - "enum" : [ "application/json", "application/json;charset=utf-8", "application/x-pem-file", "multipart/form-data" ] - }, - "type" : "object" - }, - "ShowImageCacheParam_header_x_auth_token" : { - "name" : "X-Auth-Token", - "in" : "header", - "description" : "**参数解释:**", - "required" : true, - "schema" : { - "description" : "**参数解释:**", - "type" : "string", - "maxLength" : 16384, - "minLength" : 1 - }, - "type" : "object" - }, - "ShowImageCacheParam_header_content_type" : { - "name" : "Content-Type", - "in" : "header", - "description" : "**参数解释:**", - "required" : true, - "schema" : { - "description" : "**参数解释:**", - "type" : "string", - "default" : "application/json", - "enum" : [ "application/json", "application/json;charset=utf-8", "application/x-pem-file", "multipart/form-data" ] - }, - "type" : "object" - }, - "param_path_jobid" : { - "name" : "job_id", - "in" : "path", - "description" : "任务ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", - "required" : true, - "schema" : { - "description" : "任务ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", - "type" : "string", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - }, - "type" : "object" - }, - "param_header_x_cluster_id" : { - "name" : "X-Cluster-ID", - "in" : "header", - "description" : "集群ID,使用**https://Endpoint/uri**这种URL格式时必须指定此参数。获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", - "required" : false, - "schema" : { - "description" : "集群ID,使用**https://Endpoint/uri**这种URL格式时必须指定此参数。获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", - "type" : "string", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - }, - "type" : "object" - }, - "CreateImageCacheParam_header_x_auth_token" : { - "name" : "X-Auth-Token", - "in" : "header", - "description" : "**参数解释:**", - "required" : true, - "schema" : { - "description" : "**参数解释:**", - "type" : "string", - "maxLength" : 16384, - "minLength" : 1 - }, - "type" : "object" - }, - "CreateImageCacheParam_header_content_type" : { - "name" : "Content-Type", - "in" : "header", - "description" : "**参数解释:**", - "required" : true, - "schema" : { - "description" : "**参数解释:**", - "type" : "string", - "default" : "application/json", - "enum" : [ "application/json", "application/json;charset=utf-8", "application/x-pem-file", "multipart/form-data" ] - }, - "type" : "object" - }, - "param_path_taskid" : { - "name" : "task_id", - "in" : "path", - "description" : "升级任务ID,调用集群升级API后从响应体中uid字段获取。", - "required" : true, - "schema" : { - "description" : "升级任务ID,调用集群升级API后从响应体中uid字段获取。", - "type" : "string", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - }, - "type" : "object" - }, - "param_path_upgrade_plan_id" : { - "name" : "upgrade_plan_id", - "in" : "path", - "description" : "集群自动升级计划ID", - "required" : true, - "schema" : { - "description" : "集群自动升级计划ID", - "type" : "string", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - }, - "type" : "object" - }, - "DeleteImageCacheParam_header_x_auth_token" : { - "name" : "X-Auth-Token", - "in" : "header", - "description" : "**参数解释:**", - "required" : true, - "schema" : { - "description" : "**参数解释:**", - "type" : "string", - "maxLength" : 16384, - "minLength" : 1 - }, - "type" : "object" - }, - "DeleteImageCacheParam_header_content_type" : { - "name" : "Content-Type", - "in" : "header", - "description" : "**参数解释:**", - "required" : true, - "schema" : { - "description" : "**参数解释:**", - "type" : "string", - "default" : "application/json", - "enum" : [ "application/json", "application/json;charset=utf-8", "application/x-pem-file", "multipart/form-data" ] - }, - "type" : "object" - }, - "param_path_target_cluster_id" : { - "name" : "target_cluster_id", - "in" : "path", - "description" : "集群ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", - "required" : true, - "schema" : { - "description" : "集群ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", - "type" : "string", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - }, - "type" : "object" + "servers": [ + { + "url": "/" + } + ], + "components": { + "parameters": { + "param_path_clusterid": { + "name": "cluster_id", + "in": "path", + "description": "集群ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", + "required": true, + "schema": { + "description": "集群ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", + "type": "string", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + }, + "type": "object" + }, + "param_path_projectid": { + "name": "project_id", + "in": "path", + "description": "项目ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", + "required": true, + "schema": { + "description": "项目ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", + "type": "string" + }, + "type": "object" + }, + "param_header_x_auth_token": { + "name": "X-Auth-Token", + "in": "header", + "description": "调用接口的认证方式分为Token和AK/SK两种,如果您使用的Token方式,此参数为必填,请填写Token的值,获取方式请参见[获取token](cce_02_0004.xml)。", + "required": true, + "schema": { + "description": "调用接口的认证方式分为Token和AK/SK两种,如果您使用的Token方式,此参数为必填,请填写Token的值,获取方式请参见[获取token](cce_02_0004.xml)。", + "type": "string", + "maxLength": 16384 + }, + "type": "object" + }, + "param_header_content_type": { + "name": "Content-Type", + "in": "header", + "description": "消息体的类型(格式)", + "required": true, + "schema": { + "description": "消息体的类型(格式)", + "type": "string", + "default": "application/json" + }, + "type": "object" + }, + "param_path_chart_id": { + "name": "chart_id", + "in": "path", + "description": "模板的ID", + "required": true, + "schema": { + "description": "模板的ID", + "type": "string", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + }, + "type": "object" + }, + "param_path_upgradeworkflowid": { + "name": "upgrade_workflow_id", + "in": "path", + "description": "集群升级任务引导流程ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", + "required": true, + "schema": { + "description": "集群升级任务引导流程ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", + "type": "string", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + }, + "type": "object" + }, + "param_path_nodeid": { + "name": "node_id", + "in": "path", + "description": "节点ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", + "required": true, + "schema": { + "description": "节点ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", + "type": "string", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + }, + "type": "object" + }, + "param_path_nodepool_id": { + "name": "nodepool_id", + "in": "path", + "description": "节点池ID", + "required": true, + "schema": { + "description": "节点池ID", + "type": "string", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + }, + "type": "object" + }, + "param_query_cluster_type": { + "name": "cluster_type", + "in": "query", + "description": "集群类型,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", + "required": false, + "schema": { + "description": "集群类型,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", + "type": "string" + }, + "type": "object" + }, + "param_query_network_mode": { + "name": "network_mode", + "in": "query", + "description": "集群网络类型,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", + "required": false, + "schema": { + "description": "集群网络类型,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", + "type": "string" + }, + "type": "object" + }, + "param_query_cluster_version": { + "name": "cluster_version", + "in": "query", + "description": "集群版本,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", + "required": false, + "schema": { + "description": "集群版本,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", + "type": "string" + }, + "type": "object" + }, + "param_query_clusterid": { + "name": "cluster_id", + "in": "query", + "description": "集群ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", + "required": false, + "schema": { + "description": "集群ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", + "type": "string", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + }, + "type": "object" + }, + "ListImageCachesParam_header_x_auth_token": { + "name": "X-Auth-Token", + "in": "header", + "description": "**参数解释:**", + "required": true, + "schema": { + "description": "**参数解释:**", + "type": "string", + "maxLength": 16384, + "minLength": 1 + }, + "type": "object" + }, + "ListImageCachesParam_header_content_type": { + "name": "Content-Type", + "in": "header", + "description": "**参数解释:**", + "required": true, + "schema": { + "description": "**参数解释:**", + "type": "string", + "default": "application/json", + "enum": [ + "application/json", + "application/json;charset=utf-8", + "application/x-pem-file", + "multipart/form-data" + ] + }, + "type": "object" + }, + "ShowImageCacheParam_header_x_auth_token": { + "name": "X-Auth-Token", + "in": "header", + "description": "**参数解释:**", + "required": true, + "schema": { + "description": "**参数解释:**", + "type": "string", + "maxLength": 16384, + "minLength": 1 + }, + "type": "object" + }, + "ShowImageCacheParam_header_content_type": { + "name": "Content-Type", + "in": "header", + "description": "**参数解释:**", + "required": true, + "schema": { + "description": "**参数解释:**", + "type": "string", + "default": "application/json", + "enum": [ + "application/json", + "application/json;charset=utf-8", + "application/x-pem-file", + "multipart/form-data" + ] + }, + "type": "object" + }, + "param_path_jobid": { + "name": "job_id", + "in": "path", + "description": "任务ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", + "required": true, + "schema": { + "description": "任务ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", + "type": "string", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + }, + "type": "object" + }, + "param_header_x_cluster_id": { + "name": "X-Cluster-ID", + "in": "header", + "description": "集群ID,使用**https://Endpoint/uri**这种URL格式时必须指定此参数。获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", + "required": false, + "schema": { + "description": "集群ID,使用**https://Endpoint/uri**这种URL格式时必须指定此参数。获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", + "type": "string", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + }, + "type": "object" + }, + "CreateImageCacheParam_header_x_auth_token": { + "name": "X-Auth-Token", + "in": "header", + "description": "**参数解释:**", + "required": true, + "schema": { + "description": "**参数解释:**", + "type": "string", + "maxLength": 16384, + "minLength": 1 + }, + "type": "object" + }, + "CreateImageCacheParam_header_content_type": { + "name": "Content-Type", + "in": "header", + "description": "**参数解释:**", + "required": true, + "schema": { + "description": "**参数解释:**", + "type": "string", + "default": "application/json", + "enum": [ + "application/json", + "application/json;charset=utf-8", + "application/x-pem-file", + "multipart/form-data" + ] + }, + "type": "object" + }, + "param_path_taskid": { + "name": "task_id", + "in": "path", + "description": "升级任务ID,调用集群升级API后从响应体中uid字段获取。", + "required": true, + "schema": { + "description": "升级任务ID,调用集群升级API后从响应体中uid字段获取。", + "type": "string", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + }, + "type": "object" + }, + "param_path_upgrade_plan_id": { + "name": "upgrade_plan_id", + "in": "path", + "description": "集群自动升级计划ID", + "required": true, + "schema": { + "description": "集群自动升级计划ID", + "type": "string", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + }, + "type": "object" + }, + "DeleteImageCacheParam_header_x_auth_token": { + "name": "X-Auth-Token", + "in": "header", + "description": "**参数解释:**", + "required": true, + "schema": { + "description": "**参数解释:**", + "type": "string", + "maxLength": 16384, + "minLength": 1 + }, + "type": "object" + }, + "DeleteImageCacheParam_header_content_type": { + "name": "Content-Type", + "in": "header", + "description": "**参数解释:**", + "required": true, + "schema": { + "description": "**参数解释:**", + "type": "string", + "default": "application/json", + "enum": [ + "application/json", + "application/json;charset=utf-8", + "application/x-pem-file", + "multipart/form-data" + ] + }, + "type": "object" + }, + "param_path_target_cluster_id": { + "name": "target_cluster_id", + "in": "path", + "description": "集群ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", + "required": true, + "schema": { + "description": "集群ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。", + "type": "string", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + }, + "type": "object" } }, - "schemas" : { - "ResourceDeleteTag" : { - "properties" : { - "key" : { - "type" : "string", - "description" : "Key值。", - "minLength" : 1, - "maxLength" : 128 - } - }, - "description" : "CCE资源标签,用于唯一标识待删除的资源标签", - "type" : "object" - }, - "BatchDeleteClusterTagsRequestBody" : { - "description" : "批量删除指定集群资源标签的请求体", - "required" : [ "tags" ], - "properties" : { - "tags" : { - "type" : "array", - "description" : "待删除的集群资源标签列表。", - "items" : { - "$ref" : "#/components/schemas/ResourceDeleteTag" + "schemas": { + "ResourceDeleteTag": { + "properties": { + "key": { + "type": "string", + "description": "Key值。", + "minLength": 1, + "maxLength": 128 + } + }, + "description": "CCE资源标签,用于唯一标识待删除的资源标签", + "type": "object" + }, + "BatchDeleteClusterTagsRequestBody": { + "description": "批量删除指定集群资源标签的请求体", + "required": [ + "tags" + ], + "properties": { + "tags": { + "type": "array", + "description": "待删除的集群资源标签列表。", + "items": { + "$ref": "#/components/schemas/ResourceDeleteTag" }, - "maxItems" : 20, - "minItems" : 1 + "maxItems": 20, + "minItems": 1 } }, - "type" : "object" + "type": "object" }, - "ChartValue" : { - "required" : [ "values" ], - "properties" : { - "values" : { - "type" : "object", - "description" : "values.yaml中的数据,数据结构以具体的模板为准", - "properties" : { - "basic" : { - "type" : "object", - "default" : "模板的一些基础值" + "ChartValue": { + "required": [ + "values" + ], + "properties": { + "values": { + "type": "object", + "description": "values.yaml中的数据,数据结构以具体的模板为准", + "properties": { + "basic": { + "type": "object", + "default": "模板的一些基础值" } }, - "additionalProperties" : true, - "example" : { - "basic" : { - "admin_password" : "******", - "admin_username" : "admin" + "additionalProperties": true, + "example": { + "basic": { + "admin_password": "******", + "admin_username": "admin" }, - "global" : { - "magento_EIP" : "100.95.154.255", - "magento_EPORT" : 32080, - "namespace" : "default" + "global": { + "magento_EIP": "100.95.154.255", + "magento_EPORT": 32080, + "namespace": "default" }, - "image" : { - "magento_image" : "swr.cn-north-7.myhuaweicloud.com/everest/magento:latest", - "mysql_image" : "swr.cn-north-7.myhuaweicloud.com/everest/mysql:5.7.14" + "image": { + "magento_image": "swr.cn-north-7.myhuaweicloud.com/everest/magento:latest", + "mysql_image": "swr.cn-north-7.myhuaweicloud.com/everest/mysql:5.7.14" } } } }, - "type" : "object" + "type": "object" }, - "LineStatus" : { - "properties" : { - "startPoint" : { - "description" : "线路起点", - "$ref" : "#/components/schemas/Point" + "LineStatus": { + "properties": { + "startPoint": { + "description": "线路起点", + "$ref": "#/components/schemas/Point" }, - "endPoint" : { - "description" : "线路终点", - "$ref" : "#/components/schemas/Point" + "endPoint": { + "description": "线路终点", + "$ref": "#/components/schemas/Point" }, - "critical" : { - "type" : "string", - "description" : "表示是否为关键线路(关键线路未执行无法取消升级流程)" + "critical": { + "type": "string", + "description": "表示是否为关键线路(关键线路未执行无法取消升级流程)" } }, - "type" : "object" + "type": "object" }, - "PointStatus" : { - "properties" : { - "taskType" : { - "$ref" : "#/components/schemas/TaskType" + "PointStatus": { + "properties": { + "taskType": { + "$ref": "#/components/schemas/TaskType" }, - "taskID" : { - "type" : "string", - "description" : "升级任务项ID" + "taskID": { + "type": "string", + "description": "升级任务项ID" }, - "status" : { - "$ref" : "#/components/schemas/UpgradeWorkflowTaskStatus" + "status": { + "$ref": "#/components/schemas/UpgradeWorkflowTaskStatus" }, - "startTimeStamp" : { - "type" : "string", - "description" : "升级任务开始时间" + "startTimeStamp": { + "type": "string", + "description": "升级任务开始时间" }, - "endTimeStamp" : { - "type" : "string", - "description" : "升级任务结束时间" + "endTimeStamp": { + "type": "string", + "description": "升级任务结束时间" }, - "expireTimeStamp" : { - "type" : "string", - "description" : "升级任务过期时间(当前仅升级前检查任务适用)" + "expireTimeStamp": { + "type": "string", + "description": "升级任务过期时间(当前仅升级前检查任务适用)" } }, - "type" : "object" + "type": "object" }, - "Point" : { - "properties" : { - "taskType" : { - "description" : "集群升级任务类型", - "$ref" : "#/components/schemas/TaskType" + "Point": { + "properties": { + "taskType": { + "description": "集群升级任务类型", + "$ref": "#/components/schemas/TaskType" } }, - "type" : "object" + "type": "object" }, - "UpgradeWorkFlow" : { - "properties" : { - "kind" : { - "type" : "string", - "pattern" : "WorkFlowTask", - "description" : "API类型,固定值“WorkFlowTask”,该值不可修改。", - "default" : "WorkFlowTask" + "UpgradeWorkFlow": { + "properties": { + "kind": { + "type": "string", + "pattern": "WorkFlowTask", + "description": "API类型,固定值“WorkFlowTask”,该值不可修改。", + "default": "WorkFlowTask" }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”,该值不可修改。", - "pattern" : "v3", - "default" : "v3" + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”,该值不可修改。", + "pattern": "v3", + "default": "v3" }, - "metadata" : { - "description" : "升级流程的元数据信息", - "$ref" : "#/components/schemas/Metadata" + "metadata": { + "description": "升级流程的元数据信息", + "$ref": "#/components/schemas/Metadata" }, - "spec" : { - "description" : "集合类的元素类型,您对集群升级流程主体都在spec中给出。CCE通过spec的描述来创建或更新对象。", - "$ref" : "#/components/schemas/WorkFlowSpec" + "spec": { + "description": "集合类的元素类型,您对集群升级流程主体都在spec中给出。CCE通过spec的描述来创建或更新对象。", + "$ref": "#/components/schemas/WorkFlowSpec" }, - "status" : { - "description" : "集合类的元素类型,用于记录本次集群升级流程的当前状态信息,包含了集群升级流程的各个流程的执行状态", - "$ref" : "#/components/schemas/WorkFlowStatus" + "status": { + "description": "集合类的元素类型,用于记录本次集群升级流程的当前状态信息,包含了集群升级流程的各个流程的执行状态", + "$ref": "#/components/schemas/WorkFlowStatus" } }, - "type" : "object" + "type": "object" }, - "WorkFlowStatus" : { - "properties" : { - "phase" : { - "$ref" : "#/components/schemas/WorkFlowPhase" + "WorkFlowStatus": { + "properties": { + "phase": { + "$ref": "#/components/schemas/WorkFlowPhase" }, - "pointStatuses" : { - "type" : "array", - "description" : "升级流程中的各个任务项的执行状态", - "items" : { - "$ref" : "#/components/schemas/PointStatus" + "pointStatuses": { + "type": "array", + "description": "升级流程中的各个任务项的执行状态", + "items": { + "$ref": "#/components/schemas/PointStatus" }, - "minItems" : 0, - "maxItems" : 100 - }, - "lineStatuses" : { - "type" : "array", - "description" : "表示该升级流程的任务执行线路", - "items" : { - "$ref" : "#/components/schemas/LineStatus" + "minItems": 0, + "maxItems": 100 + }, + "lineStatuses": { + "type": "array", + "description": "表示该升级流程的任务执行线路", + "items": { + "$ref": "#/components/schemas/LineStatus" }, - "minItems" : 0, - "maxItems" : 100 + "minItems": 0, + "maxItems": 100 + } + }, + "type": "object" + }, + "WorkFlowSpec": { + "required": [ + "targetVersion" + ], + "properties": { + "clusterID": { + "type": "string", + "description": "集群ID,资源唯一标识,创建成功后自动生成,填写无效", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + }, + "clusterVersion": { + "type": "string", + "description": "本次集群升级的当前版本", + "pattern": "^v\\d\\.\\d\\.\\d-r\\d$", + "example": "v1.23.4-r0" + }, + "targetVersion": { + "type": "string", + "description": "本次集群升级的目标版本", + "pattern": "^v\\d\\.\\d\\.\\d-r\\d$", + "example": "v1.25.2-r0" + } + }, + "type": "object" + }, + "UpgradeWorkflowTaskStatus": { + "type": "object", + "description": "集群升级状态:", + "enum": [ + "Init", + "Queuing", + "Running", + "Success", + "Failed" + ] + }, + "Metadata": { + "properties": { + "uid": { + "type": "string", + "description": "唯一id标识" + }, + "name": { + "type": "string", + "description": "资源名称" + }, + "labels": { + "type": "object", + "description": "资源标签,key/value对格式,接口保留字段,填写不会生效", + "additionalProperties": { + "type": "string" + } + }, + "annotations": { + "type": "object", + "description": "资源注解,由key/value组成", + "additionalProperties": { + "type": "string" + } + }, + "updateTimestamp": { + "type": "string", + "format": "date", + "description": "更新时间" + }, + "creationTimestamp": { + "type": "string", + "format": "date", + "description": "创建时间" + } + }, + "description": "资源描述基本信息,集合类的元素类型,包含一组由不同名称定义的属性。", + "type": "object" + }, + "UpgradeWorkFlowUpdateRequestBody": { + "properties": { + "status": { + "description": "更新后workflow的状态(当前仅支持Cancel)", + "properties": { + "phase": { + "$ref": "#/components/schemas/WorkFlowPhase" + } + } + } + }, + "type": "object" + }, + "WorkFlowPhase": { + "type": "object", + "description": "集群升级流程的执行状态:", + "enum": [ + "Init", + "Running", + "Pending", + "Success", + "Cancel" + ] + }, + "TaskType": { + "type": "object", + "description": "集群升级任务类型:", + "enum": [ + "Cluster", + "PreCheck", + "Rollback", + "Snapshot", + "PostCheck" + ] + }, + "AddonInstanceStatus": { + "required": [ + "currentVersion", + "message", + "Reason", + "status" + ], + "properties": { + "status": { + "type": "string", + "description": "插件实例状态, 取值如下", + "enum": [ + "running", + "abnormal", + "installing", + "installFailed", + "upgrading", + "upgradeFailed", + "deleting", + "deleteSuccess", + "deleteFailed", + "available", + "rollbacking", + "rollbackFailed" + ] + }, + "Reason": { + "type": "string", + "description": "插件安装失败原因" + }, + "message": { + "type": "string", + "description": "安装错误详情" + }, + "targetVersions": { + "type": "array", + "description": "此插件版本,支持升级的集群版本", + "items": { + "type": "string", + "description": "" + } + }, + "currentVersion": { + "description": "当前插件实例使用的具体插件版本信息", + "$ref": "#/components/schemas/Versions" + }, + "isRollbackable": { + "type": "boolean", + "description": "是否支持回滚到插件升级前的插件版本" + }, + "previousVersion": { + "type": "string", + "description": "插件升级或回滚前的版本" + } + }, + "description": "插件状态信息", + "type": "object" + }, + "Versions": { + "required": [ + "input", + "stable", + "supportVersions", + "translate", + "updateTimestamp", + "version" + ], + "properties": { + "version": { + "type": "string", + "description": "插件版本号" + }, + "input": { + "type": "object", + "description": "插件安装参数" + }, + "stable": { + "type": "boolean", + "description": "是否为稳定版本" + }, + "translate": { + "type": "object", + "description": "供界面使用的翻译信息" + }, + "supportVersions": { + "type": "array", + "description": "支持集群版本号", + "items": { + "$ref": "#/components/schemas/SupportVersions" + } + }, + "creationTimestamp": { + "type": "string", + "format": "date", + "description": "创建时间" + }, + "updateTimestamp": { + "type": "string", + "format": "date", + "description": "更新时间" + } + }, + "description": "具体插件版本信息", + "type": "object" + }, + "InstanceRequest": { + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ], + "properties": { + "kind": { + "type": "string", + "description": "API类型,固定值“Addon”,该值不可修改,该字段传入无效。", + "default": "Addon" + }, + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”,该值不可修改,该字段传入无效。", + "default": "v3" + }, + "metadata": { + "$ref": "#/components/schemas/AddonMetadata", + "description": "基本信息,为集合类的元素类型,包含一组由不同名称定义的属性" + }, + "spec": { + "description": "spec是集合类的元素类型,内容为插件实例安装/升级的具体请求信息", + "$ref": "#/components/schemas/InstanceRequestSpec" + } + }, + "description": "插件安装/升级-request结构体", + "type": "object" + }, + "SupportVersions": { + "required": [ + "clusterType", + "clusterVersion" + ], + "properties": { + "clusterType": { + "type": "string", + "description": "支持的集群类型" + }, + "clusterVersion": { + "type": "array", + "description": "支持的集群版本(正则表达式)", + "items": { + "type": "string" + } + }, + "category": { + "type": "array", + "description": "作用的集群类型", + "items": { + "type": "string" + } + } + }, + "description": "插件支持升级的集群版本", + "type": "object" + }, + "AddonMetadata": { + "properties": { + "uid": { + "type": "string", + "description": "唯一id标识" + }, + "name": { + "type": "string", + "description": "插件名称" + }, + "alias": { + "type": "string", + "description": "插件别名" + }, + "labels": { + "type": "object", + "description": "插件标签,key/value对格式,接口保留字段,填写不会生效", + "additionalProperties": { + "type": "string" + } + }, + "annotations": { + "type": "object", + "description": "插件注解,由key/value组成", + "additionalProperties": { + "type": "string" + } + }, + "updateTimestamp": { + "type": "string", + "format": "date", + "description": "更新时间" + }, + "creationTimestamp": { + "type": "string", + "format": "date", + "description": "创建时间" + } + }, + "description": "插件基本信息,集合类的元素类型,包含一组由不同名称定义的属性。", + "type": "object" + }, + "InstanceSpec": { + "required": [ + "addonTemplateName", + "addonTemplateType", + "clusterID", + "description", + "values", + "version" + ], + "properties": { + "clusterID": { + "type": "string", + "description": "集群id" + }, + "version": { + "type": "string", + "description": "插件模板版本号,如1.0.0" + }, + "addonTemplateName": { + "type": "string", + "description": "插件模板名称,如coredns" + }, + "addonTemplateType": { + "type": "string", + "description": "插件模板类型" + }, + "addonTemplateLogo": { + "type": "string", + "description": "插件模板logo图片的地址", + "maxLength": 200 + }, + "addonTemplateLabels": { + "type": "array", + "description": "插件模板所属类型", + "items": { + "type": "string" + } + }, + "description": { + "type": "string", + "description": "插件模板描述" + }, + "values": { + "type": "object", + "description": "插件模板安装参数(各插件不同),请根据具体插件模板信息填写安装参数。", + "additionalProperties": { + "type": "object" + } + } + }, + "description": "spec是集合类的元素类型,内容为插件实例具体信息", + "type": "object" + }, + "InstanceRequestSpec": { + "required": [ + "addonTemplateName", + "clusterID", + "values" + ], + "properties": { + "version": { + "type": "string", + "description": "待安装、升级插件的版本号,例如1.0.0" + }, + "clusterID": { + "type": "string", + "description": "集群id" + }, + "values": { + "type": "object", + "description": "插件模板安装参数(各插件不同),升级插件时需要填写全量安装参数,未填写参数将使用插件模板中的默认值,当前插件安装参数可通过查询插件实例接口获取。", + "additionalProperties": { + "type": "object" + } + }, + "addonTemplateName": { + "type": "string", + "description": "待安装插件模板名称,如coredns" + } + }, + "description": "spec是集合类的元素类型,内容为插件实例安装/升级的具体请求信息", + "type": "object" + }, + "AddonInstance": { + "required": [ + "apiVersion", + "kind", + "spec", + "status" + ], + "properties": { + "kind": { + "type": "string", + "description": "API类型,固定值“Addon”,该值不可修改。", + "default": "Addon" + }, + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”,该值不可修改。", + "default": "v3" + }, + "metadata": { + "description": "基本信息,为集合类的元素类型,包含一组由不同名称定义的属性", + "$ref": "#/components/schemas/AddonMetadata" + }, + "spec": { + "description": "spec是集合类的元素类型,内容为插件实例具体信息,实例的详细描述主体部分都在spec中给出", + "$ref": "#/components/schemas/InstanceSpec" + }, + "status": { + "description": "插件实例状态", + "$ref": "#/components/schemas/AddonInstanceStatus" + } + }, + "description": "插件实例详细信息-response结构体", + "type": "object" + }, + "StorageSelectors": { + "required": [ + "name", + "storageType" + ], + "properties": { + "name": { + "type": "string", + "description": "selector的名字,作为storageGroup中selectorNames的索引,因此各个selector间的名字不能重复。" + }, + "storageType": { + "type": "string", + "description": "存储类型,当前仅支持evs(云硬盘)或local(本地盘);local存储类型不支持磁盘选择,所有本地盘将被组成一个VG,因此也仅允许只有一个local类型的storageSelector。" + }, + "matchLabels": { + "description": "evs盘的匹配字段,支持DataVolume中的size、volumeType、iops、throughput、metadataEncrypted、metadataCmkid、count字段。", + "properties": { + "size": { + "type": "string", + "description": "匹配的磁盘大小,不填则无磁盘大小限制。例如:100." + }, + "volumeType": { + "type": "string", + "description": "云硬盘类型,目前支持SSD\\GPSSD\\SAS\\ESSD\\SATA等。" + }, + "iops": { + "type": "string", + "description": "匹配的磁盘iops大小,不填则无磁盘iops大小限制。当需要选择GPSSD2或ESSD2类型磁盘时,配置iops来准确选择磁盘。例如:3000." + }, + "throughput": { + "type": "string", + "description": "匹配的磁盘吞吐量大小,不填则无磁盘吞吐量大小限制。当需要选择GPSSD2类型磁盘时,配置throughput来准确选择磁盘。例如:125." + }, + "metadataEncrypted": { + "type": "string", + "description": "磁盘加密标识符,0代表不加密,1代表加密。" + }, + "metadataCmkid": { + "type": "string", + "description": "加密磁盘的用户主密钥ID,长度为36字节的字符串。" + }, + "count": { + "type": "string", + "description": "磁盘选择个数,不填则选择所有此类磁盘。" + } + } } }, - "type" : "object" + "type": "object" }, - "WorkFlowSpec" : { - "required" : [ "targetVersion" ], - "properties" : { - "clusterID" : { - "type" : "string", - "description" : "集群ID,资源唯一标识,创建成功后自动生成,填写无效", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - }, - "clusterVersion" : { - "type" : "string", - "description" : "本次集群升级的当前版本", - "pattern" : "^v\\d\\.\\d\\.\\d-r\\d$", - "example" : "v1.23.4-r0" - }, - "targetVersion" : { - "type" : "string", - "description" : "本次集群升级的目标版本", - "pattern" : "^v\\d\\.\\d\\.\\d-r\\d$", - "example" : "v1.25.2-r0" + "ClusterNodeInformationMetadata": { + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "节点名称" } }, - "type" : "object" - }, - "UpgradeWorkflowTaskStatus" : { - "type" : "object", - "description" : "集群升级状态:", - "enum" : [ "Init", "Queuing", "Running", "Success", "Failed" ] + "description": "", + "type": "object" }, - "Metadata" : { - "properties" : { - "uid" : { - "type" : "string", - "description" : "唯一id标识" + "NodeNicSpec": { + "properties": { + "primaryNic": { + "description": "主网卡的描述信息。", + "$ref": "#/components/schemas/NicSpec" }, - "name" : { - "type" : "string", - "description" : "资源名称" - }, - "labels" : { - "type" : "object", - "description" : "资源标签,key/value对格式,接口保留字段,填写不会生效", - "additionalProperties" : { - "type" : "string" - } - }, - "annotations" : { - "type" : "object", - "description" : "资源注解,由key/value组成", - "additionalProperties" : { - "type" : "string" + "extNics": { + "type": "array", + "description": "扩展网卡", + "items": { + "description": "", + "$ref": "#/components/schemas/NicSpec" } - }, - "updateTimestamp" : { - "type" : "string", - "format" : "date", - "description" : "更新时间" - }, - "creationTimestamp" : { - "type" : "string", - "format" : "date", - "description" : "创建时间" } }, - "description" : "资源描述基本信息,集合类的元素类型,包含一组由不同名称定义的属性。", - "type" : "object" - }, - "UpgradeWorkFlowUpdateRequestBody" : { - "properties" : { - "status" : { - "description" : "更新后workflow的状态(当前仅支持Cancel)", - "properties" : { - "phase" : { - "$ref" : "#/components/schemas/WorkFlowPhase" - } - } + "description": "节点网卡的描述信息。", + "type": "object" + }, + "VolumeMetadata": { + "properties": { + "__system__encrypted": { + "type": "string", + "description": "表示云硬盘加密功能的字段,'0'代表不加密,'1'代表加密。" + }, + "__system__cmkid": { + "type": "string", + "description": "用户主密钥ID,是metadata中的表示加密功能的字段,与__system__encrypted配合使用。" + } + }, + "description": "云硬盘加密信息,仅在创建节点系统盘或数据盘需加密时须填写。", + "type": "object" + }, + "NodeEIPSpec": { + "required": [ + "iptype" + ], + "properties": { + "iptype": { + "type": "string", + "description": "弹性IP类型,取值请参见申请EIP接口中publicip.type说明。" + }, + "bandwidth": { + "description": "弹性IP的带宽参数", + "$ref": "#/components/schemas/NodeBandwidth" + } + }, + "description": "", + "type": "object" + }, + "Runtime": { + "properties": { + "name": { + "type": "string", + "description": "容器运行时,默认场景:", + "enum": [ + "docker", + "containerd" + ] } }, - "type" : "object" + "type": "object" }, - "WorkFlowPhase" : { - "type" : "object", - "description" : "集群升级流程的执行状态:", - "enum" : [ "Init", "Running", "Pending", "Success", "Cancel" ] + "NodeStatus": { + "properties": { + "phase": { + "type": "string", + "description": "节点状态:节点资源生命周期管理(如安装卸载等)状态和集群内k8s node状态的综合体现,取值如下", + "enum": [ + "Build", + "Installing", + "Upgrading", + "Active", + "Abnormal", + "Deleting", + "Error" + ] + }, + "lastProbeTime": { + "type": "string", + "description": "节点最近一次状态检查时间。集群处于异常、冻结或者中间态(例如创建中)时,节点的状态检查动作可能受影响。检查时间超过5分的节点状态不具有参考意义。" + }, + "jobID": { + "type": "string", + "description": "创建或删除时的任务ID。" + }, + "serverId": { + "type": "string", + "description": "底层云服务器或裸金属节点ID。" + }, + "privateIP": { + "type": "string", + "description": "节点主网卡私有网段IP地址。" + }, + "privateIPv6IP": { + "type": "string", + "description": "节点主网卡私有网段IPv6地址。" + }, + "publicIP": { + "type": "string", + "description": "节点弹性公网IP地址。如果ECS的数据没有实时同步,可在界面上通过“同步节点信息”手动进行更新。" + }, + "deleteStatus": { + "description": "删除资源时表示资源删除状态", + "$ref": "#/components/schemas/DeleteStatus" + } + }, + "description": "", + "type": "object" + }, + "Volume": { + "required": [ + "size", + "volumetype" + ], + "properties": { + "size": { + "type": "integer", + "format": "int32", + "description": "磁盘大小,单位为GB" + }, + "volumetype": { + "type": "string", + "description": "磁盘类型,取值请参见创建云服务器 中“root_volume字段数据结构说明”。" + }, + "iops": { + "type": "integer", + "format": "int32", + "description": "给云硬盘配置iops,购买GPSSD2、ESSD2类型的云硬盘时必填,其他类型不能设置。" + }, + "throughput": { + "type": "integer", + "format": "int32", + "description": "给云硬盘配置吞吐量,单位是MiB/s,购买GPSSD2类型云硬盘时必填,其他类型不能设置。" + }, + "extendParam": { + "type": "object", + "description": "磁盘扩展参数,取值请参见创建云服务器中“extendparam”参数的描述。", + "additionalProperties": { + "type": "object", + "description": "" + } + }, + "cluster_id": { + "type": "string", + "description": "云服务器系统盘对应的存储池的ID。仅用作专属云集群,专属分布式存储DSS的存储池ID,即dssPoolID。" + }, + "cluster_type": { + "type": "string", + "description": "云服务器系统盘对应的磁盘存储类型。仅用作专属云集群,固定取值为dss。" + }, + "hw:passthrough": { + "type": "boolean", + "description": "- 使用SDI规格创建虚拟机时请关注该参数,如果该参数值为true,说明创建的为SCSI类型的卷" + }, + "metadata": { + "description": "云硬盘加密信息,仅在创建节点系统盘或数据盘需加密时须填写。", + "$ref": "#/components/schemas/VolumeMetadata" + } + }, + "description": "", + "type": "object" + }, + "UserTag": { + "properties": { + "key": { + "type": "string", + "description": "云服务器标签的键。不得以\"CCE-\"或\"__type_baremetal\"开头", + "minLength": 1, + "maxLength": 36, + "pattern": "^[a-zA-Z0-9_\\u4e00-\\u9fa5-]{1,36}$" + }, + "value": { + "type": "string", + "description": "云服务器标签的值", + "minLength": 0, + "maxLength": 43, + "pattern": "^[a-zA-Z0-9_\\u4e00-\\u9fa5.-]{0,43}$" + } + }, + "description": "", + "type": "object" + }, + "Storage": { + "description": "磁盘初始化配置管理参数。", + "required": [ + "storageSelectors", + "storageGroups" + ], + "properties": { + "storageSelectors": { + "type": "array", + "description": "磁盘选择,根据matchLabels和storageType对匹配的磁盘进行管理。磁盘匹配存在先后顺序,靠前的匹配规则优先匹配。", + "items": { + "$ref": "#/components/schemas/StorageSelectors" + } + }, + "storageGroups": { + "type": "array", + "description": "由多个存储设备组成的存储组,用于各个存储空间的划分。", + "items": { + "$ref": "#/components/schemas/StorageGroups" + } + } + }, + "type": "object" + }, + "HostnameConfig": { + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "description": "K8S节点名称配置类型, 默认为“privateIp”。", + "enum": [ + "privateIp", + "cceNodeName" + ] + } + }, + "type": "object" + }, + "DeleteStatus": { + "properties": { + "previous_total": { + "type": "integer", + "description": "集群删除时已经存在的集群资源记录总数" + }, + "current_total": { + "type": "integer", + "description": "基于当前集群资源记录信息,生成实际最新资源记录总数" + }, + "updated": { + "type": "integer", + "description": "集群删除时更新的资源记录总数" + }, + "added": { + "type": "integer", + "description": "集群删除时更新的资源记录总数" + }, + "deleted": { + "type": "integer", + "description": "集群删除时删除的资源记录总数" + } + }, + "description": "", + "type": "object" + }, + "NodeOwnerReference": { + "properties": { + "nodepoolName": { + "type": "string", + "description": "节点池名称" + }, + "nodepoolID": { + "type": "string", + "description": "节点池UID" + } + }, + "description": "节点的属主对象信息", + "type": "object" + }, + "Taint": { + "required": [ + "key", + "effect" + ], + "properties": { + "key": { + "type": "string", + "description": "键" + }, + "value": { + "type": "string", + "description": "值", + "maxLength": 63 + }, + "effect": { + "type": "string", + "description": "作用效果", + "enum": [ + "NoSchedule", + "PreferNoSchedule", + "NoExecute" + ] + } + }, + "description": "如下字段不可使用:", + "type": "object" + }, + "NodeExtendParam": { + "description": "创建节点时的扩展参数。", + "properties": { + "ecs:performancetype": { + "type": "string", + "description": "云服务器规格的分类。响应中会返回此字段。" + }, + "orderID": { + "type": "string", + "description": "订单ID,节点付费类型为自动付费包周期类型时,响应中会返回此字段(仅创建场景涉及)。" + }, + "productID": { + "type": "string", + "description": "产品ID,节点付费类型为自动付费包周期类型时,响应中会返回此字段。" + }, + "maxPods": { + "type": "integer", + "description": "节点最大允许创建的实例数(Pod),该数量包含系统默认实例,取值范围为16~256。" + }, + "periodType": { + "type": "string", + "description": "- month:月" + }, + "periodNum": { + "type": "integer", + "description": "订购周期数,取值范围:" + }, + "isAutoRenew": { + "type": "string", + "description": "是否自动续订" + }, + "isAutoPay": { + "type": "string", + "description": "是否自动扣款" + }, + "DockerLVMConfigOverride": { + "type": "string", + "description": "Docker数据盘配置项(已废弃,请使用storage字段)。默认配置示例如下:" + }, + "dockerBaseSize": { + "type": "integer", + "minimum": 10, + "maximum": 500, + "description": "节点上单容器的可用磁盘空间大小,单位G。" + }, + "publicKey": { + "type": "string", + "description": "节点的公钥。" + }, + "alpha.cce/preInstall": { + "type": "string", + "description": "安装前执行脚本" + }, + "alpha.cce/postInstall": { + "type": "string", + "description": "安装后执行脚本" + }, + "alpha.cce/NodeImageID": { + "type": "string", + "description": "如果创建裸金属节点,需要使用自定义镜像时用此参数。" + }, + "chargingMode": { + "type": "integer", + "format": "int32", + "description": "节点的计费模式。已废弃,请使用NodeSpec中的billingMode字段。" + }, + "agency_name": { + "type": "string", + "description": "委托的名称。" + }, + "kubeReservedMem": { + "type": "integer", + "format": "int32", + "description": "节点内存预留,Kubernetes相关组件预留值。随节点规格变动,具体请参见[节点预留资源策略说明](https://support.huaweicloud.com/usermanual-cce/cce_10_0178.html)。" + }, + "systemReservedMem": { + "type": "integer", + "format": "int32", + "description": "节点内存预留,系统组件预留值。随节点规格变动,具体请参见[节点预留资源策略说明](https://support.huaweicloud.com/usermanual-cce/cce_10_0178.html)。" + }, + "init-node-password": { + "type": "string", + "description": "节点密码,作为响应参数时,固定展示星号。", + "example": "******" + }, + "securityReinforcementType": { + "type": "string", + "description": "**参数解释**:", + "enum": [ + "null", + "cybersecurity" + ] + } + }, + "type": "object" + }, + "NodeBandwidth": { + "properties": { + "chargemode": { + "type": "string", + "description": "带宽的计费类型:" + }, + "size": { + "type": "integer", + "description": "带宽大小,取值请参见取值请参见申请EIP接口中bandwidth.size说明。" + }, + "sharetype": { + "type": "string", + "description": "带宽的共享类型,共享类型枚举:PER,表示独享,目前仅支持独享。" + } + }, + "description": "", + "type": "object" + }, + "RuntimeConfig": { + "required": [ + "lvType" + ], + "properties": { + "lvType": { + "type": "string", + "description": "LVM写入模式:linear、striped。linear:线性模式;striped:条带模式,使用多块磁盘组成条带模式,能够提升磁盘性能。" + } + }, + "type": "object" }, - "TaskType" : { - "type" : "object", - "description" : "集群升级任务类型:", - "enum" : [ "Cluster", "PreCheck", "Rollback", "Snapshot", "PostCheck" ] - }, - "AddonInstanceStatus" : { - "required" : [ "currentVersion", "message", "Reason", "status" ], - "properties" : { - "status" : { - "type" : "string", - "description" : "插件实例状态, 取值如下", - "enum" : [ "running", "abnormal", "installing", "installFailed", "upgrading", "upgradeFailed", "deleting", "deleteSuccess", "deleteFailed", "available", "rollbacking", "rollbackFailed" ] - }, - "Reason" : { - "type" : "string", - "description" : "插件安装失败原因" - }, - "message" : { - "type" : "string", - "description" : "安装错误详情" - }, - "targetVersions" : { - "type" : "array", - "description" : "此插件版本,支持升级的集群版本", - "items" : { - "type" : "string", - "description" : "" - } - }, - "currentVersion" : { - "description" : "当前插件实例使用的具体插件版本信息", - "$ref" : "#/components/schemas/Versions" - }, - "isRollbackable" : { - "type" : "boolean", - "description" : "是否支持回滚到插件升级前的插件版本" - }, - "previousVersion" : { - "type" : "string", - "description" : "插件升级或回滚前的版本" + "ClusterNodeInformation": { + "required": [ + "metadata" + ], + "properties": { + "metadata": { + "description": "metadata是节点对象的元数据定义,是集合类的元素类型,包含一组由不同名称定义的属性。", + "$ref": "#/components/schemas/ClusterNodeInformationMetadata" + } + }, + "description": "", + "type": "object" + }, + "VirtualSpace": { + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string", + "description": "virtualSpace的名称,当前仅支持四种类型:share、kubernetes、runtime、user。" + }, + "size": { + "type": "string", + "description": "virtualSpace的大小,仅支持整数百分比。例如:90%。" + }, + "lvmConfig": { + "description": "lvm配置管理,适用于share、kubernetes和user空间配置。 需要注意:一个virtualSpace仅支持一个config配置。", + "$ref": "#/components/schemas/LVMConfig" + }, + "runtimeConfig": { + "description": "runtime配置管理,适用于运行时空间配置。 需要注意:一个virtualSpace仅支持一个config配置。", + "$ref": "#/components/schemas/RuntimeConfig" } }, - "description" : "插件状态信息", - "type" : "object" + "type": "object" }, - "Versions" : { - "required" : [ "input", "stable", "supportVersions", "translate", "updateTimestamp", "version" ], - "properties" : { - "version" : { - "type" : "string", - "description" : "插件版本号" - }, - "input" : { - "type" : "object", - "description" : "插件安装参数" - }, - "stable" : { - "type" : "boolean", - "description" : "是否为稳定版本" + "Node": { + "properties": { + "kind": { + "type": "string", + "description": "API类型,固定值“Node”,该值不可修改。", + "default": "Node" + }, + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”,该值不可修改。", + "default": "v3" }, - "translate" : { - "type" : "object", - "description" : "供界面使用的翻译信息" + "metadata": { + "description": "metadata是节点对象的元数据定义,是集合类的元素类型,包含一组由不同名称定义的属性。", + "$ref": "#/components/schemas/NodeMetadata" }, - "supportVersions" : { - "type" : "array", - "description" : "支持集群版本号", - "items" : { - "$ref" : "#/components/schemas/SupportVersions" - } - }, - "creationTimestamp" : { - "type" : "string", - "format" : "date", - "description" : "创建时间" + "spec": { + "description": "spec是集合类的元素类型,用户对需要管理的节点对象进行详细描述的主体部分都在spec中给出。系统通过spec的描述来创建或更新对象。", + "$ref": "#/components/schemas/NodeSpec" }, - "updateTimestamp" : { - "type" : "string", - "format" : "date", - "description" : "更新时间" + "status": { + "description": "节点状态,动态记录,创建或修改时指定无意义.", + "$ref": "#/components/schemas/NodeStatus" } }, - "description" : "具体插件版本信息", - "type" : "object" + "description": "", + "type": "object" }, - "InstanceRequest" : { - "required" : [ "apiVersion", "kind", "metadata", "spec" ], - "properties" : { - "kind" : { - "type" : "string", - "description" : "API类型,固定值“Addon”,该值不可修改,该字段传入无效。", - "default" : "Addon" - }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”,该值不可修改,该字段传入无效。", - "default" : "v3" - }, - "metadata" : { - "$ref" : "#/components/schemas/AddonMetadata", - "description" : "基本信息,为集合类的元素类型,包含一组由不同名称定义的属性" + "NodePublicIP": { + "properties": { + "ids": { + "type": "array", + "description": "已有的弹性IP的ID列表。数量不得大于待创建节点数", + "items": { + "type": "string", + "description": "" + } }, - "spec" : { - "description" : "spec是集合类的元素类型,内容为插件实例安装/升级的具体请求信息", - "$ref" : "#/components/schemas/InstanceRequestSpec" - } - }, - "description" : "插件安装/升级-request结构体", - "type" : "object" - }, - "SupportVersions" : { - "required" : [ "clusterType", "clusterVersion" ], - "properties" : { - "clusterType" : { - "type" : "string", - "description" : "支持的集群类型" + "count": { + "type": "integer", + "format": "int32", + "description": "要动态创建的弹性IP个数。" + }, + "eip": { + "description": "弹性IP参数", + "$ref": "#/components/schemas/NodeEIPSpec" + } + }, + "description": "", + "type": "object" + }, + "Login": { + "properties": { + "sshKey": { + "type": "string", + "description": "选择密钥对方式登录时的密钥对名称。" }, - "clusterVersion" : { - "type" : "array", - "description" : "支持的集群版本(正则表达式)", - "items" : { - "type" : "string" + "userPassword": { + "description": "选择密码方式登录时的帐号密码信息,之后可通过此帐号密码登录节点。", + "$ref": "#/components/schemas/UserPassword" + } + }, + "type": "object" + }, + "StorageGroups": { + "required": [ + "name", + "selectorNames", + "virtualSpaces" + ], + "properties": { + "name": { + "type": "string", + "description": "storageGroups的名字,作为虚拟存储组的名字,因此各个group名字不能重复。" + }, + "cceManaged": { + "type": "boolean", + "description": "k8s及runtime所属存储空间。有且仅有一个group被设置为true,不填默认false。" + }, + "selectorNames": { + "type": "array", + "description": "对应storageSelectors中的name,一个group可选择多个selector;但一个selector只能被一个group选择。", + "items": { + "type": "string", + "description": "" } }, - "category" : { - "type" : "array", - "description" : "作用的集群类型", - "items" : { - "type" : "string" + "virtualSpaces": { + "description": "group中空间配置的详细管理。", + "type": "array", + "items": { + "$ref": "#/components/schemas/VirtualSpace" } } }, - "description" : "插件支持升级的集群版本", - "type" : "object" + "type": "object" }, - "AddonMetadata" : { - "properties" : { - "uid" : { - "type" : "string", - "description" : "唯一id标识" - }, - "name" : { - "type" : "string", - "description" : "插件名称" + "LVMConfig": { + "required": [ + "lvType" + ], + "properties": { + "lvType": { + "type": "string", + "description": "LVM写入模式:linear、striped。linear:线性模式;striped:条带模式,使用多块磁盘组成条带模式,能够提升磁盘性能。" }, - "alias" : { - "type" : "string", - "description" : "插件别名" - }, - "labels" : { - "type" : "object", - "description" : "插件标签,key/value对格式,接口保留字段,填写不会生效", - "additionalProperties" : { - "type" : "string" - } - }, - "annotations" : { - "type" : "object", - "description" : "插件注解,由key/value组成", - "additionalProperties" : { - "type" : "string" - } - }, - "updateTimestamp" : { - "type" : "string", - "format" : "date", - "description" : "更新时间" - }, - "creationTimestamp" : { - "type" : "string", - "format" : "date", - "description" : "创建时间" + "path": { + "type": "string", + "description": "磁盘挂载路径。仅在用户配置中生效。支持包含:数字、大小写字母、点、中划线、下划线的绝对路径。" } }, - "description" : "插件基本信息,集合类的元素类型,包含一组由不同名称定义的属性。", - "type" : "object" + "type": "object" }, - "InstanceSpec" : { - "required" : [ "addonTemplateName", "addonTemplateType", "clusterID", "description", "values", "version" ], - "properties" : { - "clusterID" : { - "type" : "string", - "description" : "集群id" + "NicSpec": { + "properties": { + "subnetId": { + "type": "string", + "description": "网卡所在子网的网络ID。主网卡创建时若未指定subnetId,将使用集群子网。若节点池同时配置了subnetList,则节点池扩容子网以subnetList字段为准。扩展网卡创建时必须指定subnetId。", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$", + "example": "ca964acf-8468-4735-8229-97940ef6c881" }, - "version" : { - "type" : "string", - "description" : "插件模板版本号,如1.0.0" + "fixedIps": { + "type": "array", + "description": "主网卡的IP将通过fixedIps指定,数量不得大于创建的节点数。fixedIps或ipBlock同时只能指定一个。扩展网卡不支持指定fiexdIps。", + "items": { + "type": "string", + "description": "" + } + }, + "ipBlock": { + "type": "string", + "description": "主网卡的IP段的CIDR格式,创建的节点IP将属于该IP段内。fixedIps或ipBlock同时只能指定一个。" }, - "addonTemplateName" : { - "type" : "string", - "description" : "插件模板名称,如coredns" - }, - "addonTemplateType" : { - "type" : "string", - "description" : "插件模板类型" + "subnetList": { + "type": "array", + "description": "网卡所在子网的网络ID列表,支持节点池配置多个子网,最多支持配置20个子网。", + "items": { + "type": "string", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + }, + "example": [ + "7e767d10-7548-4df5-ad72-aeac1d08bd8a" + ] + } + }, + "description": "主网卡的描述信息。", + "type": "object" + }, + "NodeMetadata": { + "properties": { + "name": { + "type": "string", + "description": "节点名称", + "minLength": 1, + "maxLength": 56 + }, + "uid": { + "type": "string", + "description": "节点ID,资源唯一标识,创建成功后自动生成,填写无效", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + }, + "labels": { + "type": "object", + "description": "CCE自有节点标签,非Kubernetes原生labels。", + "additionalProperties": { + "type": "string", + "description": "" + } + }, + "annotations": { + "type": "object", + "description": "CCE自有节点注解,非Kubernetes原生annotations,格式为key/value键值对。", + "additionalProperties": { + "type": "string", + "description": "" + } + }, + "creationTimestamp": { + "type": "string", + "description": "创建时间,创建成功后自动生成,填写无效" + }, + "updateTimestamp": { + "type": "string", + "description": "更新时间,创建成功后自动生成,填写无效" + }, + "ownerReference": { + "description": "节点的属主对象信息", + "$ref": "#/components/schemas/NodeOwnerReference" + } + }, + "description": "", + "type": "object" + }, + "UserPassword": { + "required": [ + "password" + ], + "properties": { + "username": { + "type": "string", + "description": "登录帐号,默认为“root”", + "default": "root" + }, + "password": { + "type": "string", + "description": "登录密码,若创建节点通过用户名密码方式,即使用该字段,则响应体中该字段作屏蔽展示。" + } + }, + "type": "object" + }, + "NodeSpec": { + "required": [ + "flavor", + "az", + "login", + "rootVolume", + "dataVolumes" + ], + "properties": { + "flavor": { + "type": "string", + "description": "节点的规格,CCE支持的节点规格请参考[节点规格说明](https://support.huaweicloud.com/api-cce/cce_02_0368.html)获取。", + "minLength": 1, + "maxLength": 50, + "pattern": "^[A-Za-z0-9-_.]+$" + }, + "az": { + "type": "string", + "description": "待创建节点所在的可用区,需要指定可用区(AZ)的名称,不填或者填random选择随机可用区。", + "maxLength": 200 + }, + "os": { + "type": "string", + "description": "节点的操作系统类型。具体支持的操作系统请参见[节点操作系统说明](https://support.huaweicloud.com/api-cce/node-os.html)。" + }, + "login": { + "description": "节点的登录方式。密钥对和密码登录方式二者必选其一。", + "$ref": "#/components/schemas/Login" + }, + "rootVolume": { + "description": "节点的磁盘信息", + "$ref": "#/components/schemas/Volume" + }, + "dataVolumes": { + "type": "array", + "description": "节点的数据盘参数(目前已支持通过控制台为CCE节点添加第二块数据盘)。", + "items": { + "$ref": "#/components/schemas/Volume" + } + }, + "storage": { + "$ref": "#/components/schemas/Storage" + }, + "publicIP": { + "description": "节点的弹性公网IP", + "$ref": "#/components/schemas/NodePublicIP" + }, + "nodeNicSpec": { + "description": "节点的网卡信息", + "$ref": "#/components/schemas/NodeNicSpec" + }, + "count": { + "type": "integer", + "format": "int32", + "description": "批量创建时节点的个数,必须为大于等于1,小于等于最大限额的正整数。作用于节点池时该项可以不填写。" + }, + "billingMode": { + "type": "integer", + "format": "int32", + "description": "节点的计费模式:" + }, + "taints": { + "type": "array", + "description": "支持给创建出来的节点加Taints来设置反亲和性,taints配置不超过20条。每条Taints包含以下3个参数:", + "items": { + "$ref": "#/components/schemas/Taint" + }, + "maxItems": 20 }, - "addonTemplateLogo" : { - "type" : "string", - "description" : "插件模板logo图片的地址", - "maxLength" : 200 + "k8sTags": { + "type": "object", + "description": "格式为key/value键值对。键值对个数不超过20条。", + "additionalProperties": { + "type": "string", + "maxLength": 63 + } }, - "addonTemplateLabels" : { - "type" : "array", - "description" : "插件模板所属类型", - "items" : { - "type" : "string" + "ecsGroupId": { + "type": "string", + "description": "云服务器组ID,若指定,将节点创建在该云服务器组下", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + }, + "dedicatedHostId": { + "type": "string", + "description": "指定DeH主机的ID,将节点调度到自己的DeH上。" + }, + "userTags": { + "type": "array", + "description": "云服务器标签,键必须唯一,CCE支持的最大用户自定义标签数量依region而定,自定义标签数上限为8个。", + "items": { + "$ref": "#/components/schemas/UserTag" + } + }, + "runtime": { + "$ref": "#/components/schemas/Runtime", + "description": "容器运行时, 默认场景:" + }, + "initializedConditions": { + "type": "array", + "description": "自定义初始化标记。", + "maxItems": 2, + "items": { + "pattern": "^[A-Za-z0-9]+$", + "minLength": 1, + "maxLength": 20, + "type": "string" + } + }, + "extendParam": { + "$ref": "#/components/schemas/NodeExtendParam", + "description": "创建节点时的扩展参数。" + }, + "hostnameConfig": { + "$ref": "#/components/schemas/HostnameConfig", + "description": "K8S节点名称配置参数,支持的集群版本为v1.23.6-r0到v1.25或者v1.25.2-r0及以上。" + }, + "serverEnterpriseProjectID": { + "type": "string", + "description": "服务器企业项目ID。CCE服务不实现EPS相关特性,该字段仅用于同步服务器企业项目ID。" + }, + "partition": { + "type": "string", + "description": "**参数解释**:" + } + }, + "type": "object" + }, + "UpgradeNodepoolJobResult": { + "required": [ + "jobid" + ], + "properties": { + "jobid": { + "type": "string", + "format": "uuid", + "example": "7b9a1695-ab29-11ef-a522-0255ac101231", + "description": "Job ID returned after the job is delivered. The job ID can be used to query the job execution status." + } + }, + "description": "Return body of the job to upgrade a nodepool.", + "type": "object" + }, + "UpgradeNodePool": { + "required": [ + "spec" + ], + "properties": { + "kind": { + "type": "string", + "description": "API类型,固定值“NodePool”。", + "default": "NodePool" + }, + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”。", + "default": "v3" + }, + "metadata": { + "description": "节点池的元数据信息", + "$ref": "#/components/schemas/NodePoolMetadata" + }, + "spec": { + "description": "节点池的规格描述", + "$ref": "#/components/schemas/NodePoolUpgradeSpec" + } + }, + "description": "", + "type": "object" + }, + "NodeTemplate": { + "properties": { + "os": { + "type": "string" + }, + "imageID": { + "type": "string" + }, + "login": { + "properties": { + "sshKey": { + "type": "string" + }, + "userPassword": { + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + } + } } }, - "description" : { - "type" : "string", - "description" : "插件模板描述" - }, - "values" : { - "type" : "object", - "description" : "插件模板安装参数(各插件不同),请根据具体插件模板信息填写安装参数。", - "additionalProperties" : { - "type" : "object" + "lifeCycle": { + "properties": { + "preInstall": { + "type": "string" + }, + "postInstall": { + "type": "string" + } } - } - }, - "description" : "spec是集合类的元素类型,内容为插件实例具体信息", - "type" : "object" - }, - "InstanceRequestSpec" : { - "required" : [ "addonTemplateName", "clusterID", "values" ], - "properties" : { - "version" : { - "type" : "string", - "description" : "待安装、升级插件的版本号,例如1.0.0" }, - "clusterID" : { - "type" : "string", - "description" : "集群id" - }, - "values" : { - "type" : "object", - "description" : "插件模板安装参数(各插件不同),升级插件时需要填写全量安装参数,未填写参数将使用插件模板中的默认值,当前插件安装参数可通过查询插件实例接口获取。", - "additionalProperties" : { - "type" : "object" + "runtimeConfig": { + "properties": { + "runtime": { + "properties": { + "name": { + "type": "string" + } + } + } } }, - "addonTemplateName" : { - "type" : "string", - "description" : "待安装插件模板名称,如coredns" + "extendParam": { + "properties": { + "userID": { + "type": "string" + } + } } }, - "description" : "spec是集合类的元素类型,内容为插件实例安装/升级的具体请求信息", - "type" : "object" + "type": "object" }, - "AddonInstance" : { - "required" : [ "apiVersion", "kind", "spec", "status" ], - "properties" : { - "kind" : { - "type" : "string", - "description" : "API类型,固定值“Addon”,该值不可修改。", - "default" : "Addon" + "NodePoolUpgradeSpec": { + "required": [ + "nodePoolID" + ], + "properties": { + "nodePoolID": { + "type": "string", + "description": "节点池id。" }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”,该值不可修改。", - "default" : "v3" + "nodeIDs": { + "type": "array", + "items": { + "type": "string", + "description": "节点id。" + } }, - "metadata" : { - "description" : "基本信息,为集合类的元素类型,包含一组由不同名称定义的属性", - "$ref" : "#/components/schemas/AddonMetadata" + "force": { + "type": "boolean", + "description": "Pod无法驱逐时,是否强制重置。" }, - "spec" : { - "description" : "spec是集合类的元素类型,内容为插件实例具体信息,实例的详细描述主体部分都在spec中给出", - "$ref" : "#/components/schemas/InstanceSpec" + "nodeTemplate": { + "$ref": "#/components/schemas/NodeTemplate" }, - "status" : { - "description" : "插件实例状态", - "$ref" : "#/components/schemas/AddonInstanceStatus" - } - }, - "description" : "插件实例详细信息-response结构体", - "type" : "object" - }, - "StorageSelectors" : { - "required" : [ "name", "storageType" ], - "properties" : { - "name" : { - "type" : "string", - "description" : "selector的名字,作为storageGroup中selectorNames的索引,因此各个selector间的名字不能重复。" + "maxUnavailable": { + "type": "integer" }, - "storageType" : { - "type" : "string", - "description" : "存储类型,当前仅支持evs(云硬盘)或local(本地盘);local存储类型不支持磁盘选择,所有本地盘将被组成一个VG,因此也仅允许只有一个local类型的storageSelector。" + "retryTimes": { + "type": "integer" }, - "matchLabels" : { - "description" : "evs盘的匹配字段,支持DataVolume中的size、volumeType、iops、throughput、metadataEncrypted、metadataCmkid、count字段。", - "properties" : { - "size" : { - "type" : "string", - "description" : "匹配的磁盘大小,不填则无磁盘大小限制。例如:100." - }, - "volumeType" : { - "type" : "string", - "description" : "云硬盘类型,目前支持SSD\\GPSSD\\SAS\\ESSD\\SATA等。" - }, - "iops" : { - "type" : "string", - "description" : "匹配的磁盘iops大小,不填则无磁盘iops大小限制。当需要选择GPSSD2或ESSD2类型磁盘时,配置iops来准确选择磁盘。例如:3000." - }, - "throughput" : { - "type" : "string", - "description" : "匹配的磁盘吞吐量大小,不填则无磁盘吞吐量大小限制。当需要选择GPSSD2类型磁盘时,配置throughput来准确选择磁盘。例如:125." - }, - "metadataEncrypted" : { - "type" : "string", - "description" : "磁盘加密标识符,0代表不加密,1代表加密。" - }, - "metadataCmkid" : { - "type" : "string", - "description" : "加密磁盘的用户主密钥ID,长度为36字节的字符串。" - }, - "count" : { - "type" : "string", - "description" : "磁盘选择个数,不填则选择所有此类磁盘。" - } + "skippedNodes": { + "type": "array", + "items": { + "type": "string" } } }, - "type" : "object" - }, - "ClusterNodeInformationMetadata" : { - "required" : [ "name" ], - "properties" : { - "name" : { - "type" : "string", - "description" : "节点名称" - } - }, - "description" : "", - "type" : "object" + "type": "object" }, - "NodeNicSpec" : { - "properties" : { - "primaryNic" : { - "description" : "主网卡的描述信息。", - "$ref" : "#/components/schemas/NicSpec" + "NodePoolMetadata": { + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "节点名池名称。", + "minLength": 1, + "maxLength": 50 }, - "extNics" : { - "type" : "array", - "description" : "扩展网卡", - "items" : { - "description" : "", - "$ref" : "#/components/schemas/NicSpec" + "uid": { + "type": "string", + "description": "节点池的uid。创建成功后自动生成,填写无效", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + }, + "annotations": { + "type": "object", + "description": "节点池的注解,以key value对表示。仅用于查询,不支持请求时传入,填写无效。", + "additionalProperties": { + "type": "string" } + }, + "updateTimestamp": { + "type": "string", + "description": "更新时间" + }, + "creationTimestamp": { + "type": "string", + "description": "创建时间" } }, - "description" : "节点网卡的描述信息。", - "type" : "object" + "description": "", + "type": "object" }, - "VolumeMetadata" : { - "properties" : { - "__system__encrypted" : { - "type" : "string", - "description" : "表示云硬盘加密功能的字段,'0'代表不加密,'1'代表加密。" - }, - "__system__cmkid" : { - "type" : "string", - "description" : "用户主密钥ID,是metadata中的表示加密功能的字段,与__system__encrypted配合使用。" + "NodeManagement": { + "properties": { + "serverGroupReference": { + "type": "string", + "description": "**参数解释**:" } }, - "description" : "云硬盘加密信息,仅在创建节点系统盘或数据盘需加密时须填写。", - "type" : "object" + "type": "object" }, - "NodeEIPSpec" : { - "required" : [ "iptype" ], - "properties" : { - "iptype" : { - "type" : "string", - "description" : "弹性IP类型,取值请参见申请EIP接口中publicip.type说明。" + "CapacityReservationSpecification": { + "description": "扩展伸缩组容量预留配置", + "properties": { + "id": { + "type": "string", + "description": "私有池id,preference为none时忽略该值" }, - "bandwidth" : { - "description" : "弹性IP的带宽参数", - "$ref" : "#/components/schemas/NodeBandwidth" + "preference": { + "type": "string", + "description": "私有池容量选项,为 none 时表示不指定容量预留,为 targeted 时表示指定容量预留,此时 id 不能为空", + "default": "none" } }, - "description" : "", - "type" : "object" + "type": "object" }, - "Runtime" : { - "properties" : { - "name" : { - "type" : "string", - "description" : "容器运行时,默认场景:", - "enum" : [ "docker", "containerd" ] + "ExtensionScaleGroup": { + "description": "节点池扩展伸缩组配置", + "properties": { + "metadata": { + "description": "扩容伸缩组的基本信息", + "$ref": "#/components/schemas/ExtensionScaleGroupMetadata" + }, + "spec": { + "description": "扩展伸缩组配置,承载区别于默认伸缩组的差异化配置", + "$ref": "#/components/schemas/ExtensionScaleGroupSpec" } }, - "type" : "object" + "type": "object" }, - "NodeStatus" : { - "properties" : { - "phase" : { - "type" : "string", - "description" : "节点状态:节点资源生命周期管理(如安装卸载等)状态和集群内k8s node状态的综合体现,取值如下", - "enum" : [ "Build", "Installing", "Upgrading", "Active", "Abnormal", "Deleting", "Error" ] - }, - "lastProbeTime" : { - "type" : "string", - "description" : "节点最近一次状态检查时间。集群处于异常、冻结或者中间态(例如创建中)时,节点的状态检查动作可能受影响。检查时间超过5分的节点状态不具有参考意义。" - }, - "jobID" : { - "type" : "string", - "description" : "创建或删除时的任务ID。" - }, - "serverId" : { - "type" : "string", - "description" : "底层云服务器或裸金属节点ID。" - }, - "privateIP" : { - "type" : "string", - "description" : "节点主网卡私有网段IP地址。" - }, - "privateIPv6IP" : { - "type" : "string", - "description" : "节点主网卡私有网段IPv6地址。" - }, - "publicIP" : { - "type" : "string", - "description" : "节点弹性公网IP地址。如果ECS的数据没有实时同步,可在界面上通过“同步节点信息”手动进行更新。" - }, - "deleteStatus" : { - "description" : "删除资源时表示资源删除状态", - "$ref" : "#/components/schemas/DeleteStatus" + "SecurityID": { + "properties": { + "id": { + "type": "string", + "description": "安全组ID。" } }, - "description" : "", - "type" : "object" + "type": "object" }, - "Volume" : { - "required" : [ "size", "volumetype" ], - "properties" : { - "size" : { - "type" : "integer", - "format" : "int32", - "description" : "磁盘大小,单位为GB" + "NodePoolSpec": { + "required": [ + "nodeTemplate" + ], + "properties": { + "type": { + "type": "string", + "description": "节点池类型。不填写时默认为vm。", + "enum": [ + "vm", + "ElasticBMS", + "pm" + ] }, - "volumetype" : { - "type" : "string", - "description" : "磁盘类型,取值请参见创建云服务器 中“root_volume字段数据结构说明”。" + "nodeTemplate": { + "description": "节点池模板详细参数。", + "$ref": "#/components/schemas/NodeSpec" + }, + "initialNodeCount": { + "type": "integer", + "format": "int32", + "description": "节点池初始化节点个数。查询时为节点池目标节点数量。" + }, + "autoscaling": { + "description": "弹性伸缩参数。", + "$ref": "#/components/schemas/NodePoolNodeAutoscaling" }, - "iops" : { - "type" : "integer", - "format" : "int32", - "description" : "给云硬盘配置iops,购买GPSSD2、ESSD2类型的云硬盘时必填,其他类型不能设置。" + "nodeManagement": { + "description": "节点管理相关配置", + "$ref": "#/components/schemas/NodeManagement" }, - "throughput" : { - "type" : "integer", - "format" : "int32", - "description" : "给云硬盘配置吞吐量,单位是MiB/s,购买GPSSD2类型云硬盘时必填,其他类型不能设置。" + "podSecurityGroups": { + "description": "安全组相关配置, 仅turbo集群支持配置该参数。", + "$ref": "#/components/schemas/PodSecurityGroups" }, - "extendParam" : { - "type" : "object", - "description" : "磁盘扩展参数,取值请参见创建云服务器中“extendparam”参数的描述。", - "additionalProperties" : { - "type" : "object", - "description" : "" + "extensionScaleGroups": { + "description": "节点池扩展伸缩组配置列表,详情参见ExtensionScaleGroup类型定义", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtensionScaleGroup" } }, - "cluster_id" : { - "type" : "string", - "description" : "云服务器系统盘对应的存储池的ID。仅用作专属云集群,专属分布式存储DSS的存储池ID,即dssPoolID。" - }, - "cluster_type" : { - "type" : "string", - "description" : "云服务器系统盘对应的磁盘存储类型。仅用作专属云集群,固定取值为dss。" - }, - "hw:passthrough" : { - "type" : "boolean", - "description" : "- 使用SDI规格创建虚拟机时请关注该参数,如果该参数值为true,说明创建的为SCSI类型的卷" - }, - "metadata" : { - "description" : "云硬盘加密信息,仅在创建节点系统盘或数据盘需加密时须填写。", - "$ref" : "#/components/schemas/VolumeMetadata" - } - }, - "description" : "", - "type" : "object" - }, - "UserTag" : { - "properties" : { - "key" : { - "type" : "string", - "description" : "云服务器标签的键。不得以\"CCE-\"或\"__type_baremetal\"开头", - "minLength" : 1, - "maxLength" : 36, - "pattern" : "^[a-zA-Z0-9_\\u4e00-\\u9fa5-]{1,36}$" + "customSecurityGroups": { + "type": "array", + "items": { + "type": "string" + }, + "description": "节点池自定义安全组相关配置。支持节点池新扩容节点绑定指定的安全组。" + } + }, + "description": "", + "type": "object" + }, + "ScaleGroupStatus": { + "description": "伸缩组当前详细状态信息", + "properties": { + "name": { + "type": "string", + "description": "伸缩组名称" + }, + "uid": { + "type": "string", + "description": "伸缩组uuid" + }, + "creationTimestamp": { + "type": "string", + "description": "伸缩组创建时间" + }, + "updateTimestamp": { + "type": "string", + "description": "伸缩组更新时间" + }, + "phase": { + "type": "string", + "description": "伸缩组状态。", + "enum": [ + "Synchronizing", + "Synchronized", + "SoldOut", + "Deleting", + "Error" + ] + }, + "desiredNodeCount": { + "type": "integer", + "format": "int32", + "description": "伸缩组期望节点数" + }, + "unpaidScaleNodeCount": { + "type": "integer", + "format": "int32", + "description": "订单未支付节点个数" + }, + "existingNodeCount": { + "type": "object", + "description": "伸缩组存量节点统计信息", + "properties": { + "postPaid": { + "type": "integer", + "format": "int32", + "description": "按需计费节点个数" + }, + "prePaid": { + "type": "integer", + "format": "int32", + "description": "包年包月节点个数" + }, + "total": { + "type": "integer", + "format": "int32", + "description": "按需计费和包年包月节点总数" + } + } }, - "value" : { - "type" : "string", - "description" : "云服务器标签的值", - "minLength" : 0, - "maxLength" : 43, - "pattern" : "^[a-zA-Z0-9_\\u4e00-\\u9fa5.-]{0,43}$" - } - }, - "description" : "", - "type" : "object" - }, - "Storage" : { - "description" : "磁盘初始化配置管理参数。", - "required" : [ "storageSelectors", "storageGroups" ], - "properties" : { - "storageSelectors" : { - "type" : "array", - "description" : "磁盘选择,根据matchLabels和storageType对匹配的磁盘进行管理。磁盘匹配存在先后顺序,靠前的匹配规则优先匹配。", - "items" : { - "$ref" : "#/components/schemas/StorageSelectors" + "upcomingNodeCount": { + "type": "object", + "description": "伸缩组将要创建的节点统计信息", + "properties": { + "postPaid": { + "type": "integer", + "format": "int32", + "description": "按需计费节点个数" + }, + "prePaid": { + "type": "integer", + "format": "int32", + "description": "包年包月节点个数" + }, + "total": { + "type": "integer", + "format": "int32", + "description": "按需计费和包年包月节点总数" + } } }, - "storageGroups" : { - "type" : "array", - "description" : "由多个存储设备组成的存储组,用于各个存储空间的划分。", - "items" : { - "$ref" : "#/components/schemas/StorageGroups" + "scaleDownDisabledNodeCount": { + "type": "integer", + "format": "int32", + "description": "伸缩组禁止缩容的节点数" + }, + "conditions": { + "description": "伸缩组当前详细状态列表,详情参见Condition类型定义。", + "type": "array", + "items": { + "$ref": "#/components/schemas/NodePoolCondition" } } - }, - "type" : "object" + }, + "type": "object" }, - "HostnameConfig" : { - "required" : [ "type" ], - "properties" : { - "type" : { - "type" : "string", - "description" : "K8S节点名称配置类型, 默认为“privateIp”。", - "enum" : [ "privateIp", "cceNodeName" ] - } - }, - "type" : "object" + "PodSecurityGroups": { + "type": "object", + "items": { + "description": "安全组信息,仅turbo集群支持配置该参数。", + "$ref": "#/components/schemas/SecurityID" + }, + "maxItems": 5, + "description": "1.21版本集群节点池支持绑定安全组,最多五个。" }, - "DeleteStatus" : { - "properties" : { - "previous_total" : { - "type" : "integer", - "description" : "集群删除时已经存在的集群资源记录总数" - }, - "current_total" : { - "type" : "integer", - "description" : "基于当前集群资源记录信息,生成实际最新资源记录总数" + "NodePoolCondition": { + "description": "节点池详细状态。", + "properties": { + "type": { + "type": "string", + "description": "Condition类型,当前支持类型如下" + }, + "status": { + "type": "string", + "description": "Condition当前状态,取值如下" }, - "updated" : { - "type" : "integer", - "description" : "集群删除时更新的资源记录总数" + "lastProbeTime": { + "type": "string", + "description": "上次状态检查时间。" }, - "added" : { - "type" : "integer", - "description" : "集群删除时更新的资源记录总数" + "lastTransitTime": { + "type": "string", + "description": "上次状态变更时间。" }, - "deleted" : { - "type" : "integer", - "description" : "集群删除时删除的资源记录总数" + "reason": { + "type": "string", + "description": "上次状态变更原因。" + }, + "message": { + "type": "string", + "description": "Condition详细描述。" + } + }, + "type": "object" + }, + "NodePool": { + "required": [ + "kind", + "apiVersion", + "metadata", + "spec" + ], + "properties": { + "kind": { + "type": "string", + "description": "API类型,固定值“NodePool”。", + "default": "NodePool" + }, + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”。", + "default": "v3" + }, + "metadata": { + "description": "节点池的元数据信息", + "$ref": "#/components/schemas/NodePoolMetadata" + }, + "spec": { + "description": "节点池的规格描述", + "$ref": "#/components/schemas/NodePoolSpec" + }, + "status": { + "description": "节点池状态", + "$ref": "#/components/schemas/NodePoolStatus" + } + }, + "description": "", + "type": "object" + }, + "ExtensionScaleGroupMetadata": { + "description": "扩容伸缩组的基本信息", + "properties": { + "uid": { + "type": "string", + "description": "扩展伸缩组的uuid,由系统自动生成" + }, + "name": { + "type": "string", + "description": "扩展伸缩组的名称,不能为 **default**,长度不能超过55个字符,只能包含数字和小写字母以及**-**" + } + }, + "type": "object" + }, + "CreateNodePoolResp": { + "required": [ + "kind", + "apiVersion", + "metadata", + "spec" + ], + "properties": { + "kind": { + "type": "string", + "description": "API类型,固定值“NodePool”。", + "default": "NodePool" + }, + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”。", + "default": "v3" + }, + "metadata": { + "description": "节点池的元数据信息", + "$ref": "#/components/schemas/NodePoolMetadata" + }, + "spec": { + "description": "节点池的规格描述", + "$ref": "#/components/schemas/NodePoolSpec" + }, + "status": { + "description": "节点池状态", + "$ref": "#/components/schemas/CreateNodePoolStatus" + } + }, + "description": "", + "type": "object" + }, + "NodePoolStatus": { + "properties": { + "currentNode": { + "type": "integer", + "format": "int32", + "description": "当前节点池中所有节点数量(不含删除中的节点)。" + }, + "creatingNode": { + "type": "integer", + "format": "int32", + "description": "当前节点池中处于创建流程中的节点数量。" + }, + "deletingNode": { + "type": "integer", + "format": "int32", + "description": "当前节点池中删除中的节点数量。" + }, + "phase": { + "type": "string", + "description": "节点池状态。", + "enum": [ + "Synchronizing", + "Synchronized", + "SoldOut", + "Deleting", + "Error" + ] + }, + "jobId": { + "type": "string", + "description": "对节点池执行操作时的 JobID。" + }, + "conditions": { + "description": "节点池当前详细状态列表,详情参见Condition类型定义。", + "type": "array", + "items": { + "$ref": "#/components/schemas/NodePoolCondition", + "description": "节点池详细状态。" + } + }, + "scaleGroupStatuses": { + "description": "伸缩组当前详细状态信息,详情参见ScaleGroupStatus类型定义", + "type": "array", + "items": { + "$ref": "#/components/schemas/ScaleGroupStatus" + } + } + }, + "description": "", + "type": "object" + }, + "ScaleGroupAutoscaling": { + "description": "扩展伸缩组弹性伸缩配置", + "properties": { + "enable": { + "type": "boolean", + "description": "伸缩组弹性扩缩容启用开关,默认不开启", + "default": false + }, + "extensionPriority": { + "type": "integer", + "description": "伸缩组优先级,未设置则默认为0,数值越大优先级越高", + "default": 0 + }, + "minNodeCount": { + "type": "integer", + "description": "弹性伸缩时,伸缩组最少应保持的节点数量,必须大于0" + }, + "maxNodeCount": { + "type": "integer", + "description": "弹性伸缩时,伸缩组最多可保持的节点数量,应大于等于 **minNodeCount**, 不可大于集群规格所允许的节点上限,不可大于节点池节点数量上限" + } + }, + "type": "object" + }, + "ExtensionScaleGroupSpec": { + "description": "扩展伸缩组配置,承载区别于默认伸缩组的差异化配置", + "properties": { + "flavor": { + "type": "string", + "description": "节点规格" + }, + "az": { + "type": "string", + "description": "节点可用区,未指定或者为空则以默认伸缩组中配置为准" + }, + "capacityReservationSpecification": { + "description": "扩展伸缩组容量预留配置", + "$ref": "#/components/schemas/CapacityReservationSpecification" + }, + "autoscaling": { + "description": "扩展伸缩组弹性伸缩配置", + "$ref": "#/components/schemas/ScaleGroupAutoscaling" + } + }, + "type": "object" + }, + "NodePoolNodeAutoscaling": { + "properties": { + "enable": { + "type": "boolean", + "description": "是否开启自动扩缩容", + "default": false + }, + "minNodeCount": { + "type": "integer", + "format": "int32", + "description": "若开启自动扩缩容,最小能缩容的节点个数。不可大于集群规格所允许的节点上限", + "minimum": 0 + }, + "maxNodeCount": { + "type": "integer", + "format": "int32", + "description": "若开启自动扩缩容,最大能扩容的节点个数,应大于等于 minNodeCount,且不超过集群规格对应的节点数量上限。", + "minimum": 0 + }, + "scaleDownCooldownTime": { + "type": "integer", + "format": "int32", + "description": "节点保留时间,单位为分钟,扩容出来的节点在这个时间内不会被缩掉", + "minimum": 0, + "maximum": 2147483647 + }, + "priority": { + "type": "integer", + "format": "int32", + "description": "节点池权重,更高的权重在扩容时拥有更高的优先级" + }, + "scaleDownUnneededTime": { + "type": "integer", + "format": "int32", + "description": "**参数解释**:", + "minimum": 0, + "maximum": 2147483647 + }, + "scaleDownUtilizationThreshold": { + "type": "number", + "format": "float", + "description": "**参数解释**:", + "minimum": 0, + "maximum": 1 + } + }, + "description": "节点池自动伸缩相关配置", + "type": "object" + }, + "CreateNodePoolStatus": { + "properties": { + "currentNode": { + "type": "integer", + "format": "int32", + "description": "当前节点池中所有节点数量(不含删除中的节点)。" + }, + "creatingNode": { + "type": "integer", + "format": "int32", + "description": "当前节点池中处于创建流程中的节点数量。" + }, + "deletingNode": { + "type": "integer", + "format": "int32", + "description": "当前节点池中删除中的节点数量。" + }, + "phase": { + "type": "string", + "description": "节点池状态。", + "enum": [ + "Synchronizing", + "Synchronized", + "SoldOut", + "Deleting", + "Error" + ] + }, + "conditions": { + "description": "节点池当前详细状态列表,详情参见Condition类型定义。", + "type": "array", + "items": { + "$ref": "#/components/schemas/NodePoolCondition", + "description": "节点池详细状态。" + } + }, + "scaleGroupStatuses": { + "description": "伸缩组当前详细状态信息,详情参见ScaleGroupStatus类型定义", + "type": "array", + "items": { + "$ref": "#/components/schemas/ScaleGroupStatus" + } + } + }, + "description": "", + "type": "object" + }, + "ReleaseResp": { + "properties": { + "chart_name": { + "type": "string", + "description": "模板名称", + "example": "magento-mysql" + }, + "chart_public": { + "type": "boolean", + "description": "是否公开模板", + "example": false + }, + "chart_version": { + "type": "string", + "description": "模板版本", + "example": "1.0.0" + }, + "cluster_id": { + "type": "string", + "description": "集群ID", + "example": "a870253f-5dc7-11ee-bf71-0255ac100b03" + }, + "cluster_name": { + "type": "string", + "description": "集群名称", + "example": "sfs-turbo-test" + }, + "create_at": { + "type": "string", + "description": "创建时间", + "example": "2023-11-14T20:30:57+08:00" + }, + "description": { + "type": "string", + "description": "模板实例描述", + "example": "Initial install underway" + }, + "name": { + "type": "string", + "description": "模板实例名称", + "example": "testwww" + }, + "namespace": { + "type": "string", + "description": "模板实例所在的命名空间", + "example": "monitoring" + }, + "parameters": { + "type": "string", + "description": "模板实例参数", + "example": "" + }, + "resources": { + "type": "string", + "description": "模板实例需要的资源", + "example": "" + }, + "status": { + "type": "string", + "description": "模板实例状态", + "example": "PENDING_INSTALL" + }, + "status_description": { + "type": "string", + "description": "模板实例状态描述", + "example": "Initial install underway" + }, + "update_at": { + "type": "string", + "description": "更新时间", + "example": "2023-11-14T20:30:57+08:00" + }, + "values": { + "type": "string", + "description": "模板实例的值", + "example": "{\"basic\":{\"admin_password\":\"magentorocks1\",\"admin_username\":\"admin\",\"app_name\":\"magento\",\"mysql_database\":\"magento\",\"mysql_name\":\"mysql\",\"mysql_password\":\"magento\",\"mysql_port\":3306,\"mysql_root_password\":\"changeme\",\"mysql_user\":\"magento\",\"storage_class\":\"csi-nas\",\"storage_mode\":\"ReadWriteMany\",\"storage_size\":\"10G\"},\"global\":{\"magento_EIP\":\"100.95.154.255\",\"magento_EPORT\":32080,\"namespace\":\"default\"},\"image\":{\"magento_image\":\"swr.cn-north-7.myhuaweicloud.com/everest/magento:latest\",\"mysql_image\":\"swr.cn-north-7.myhuaweicloud.com/everest/mysql:5.7.14\"}}" + }, + "version": { + "type": "integer", + "format": "int32", + "description": "模板实例版本", + "example": 1 + } + }, + "type": "object" + }, + "SnapshotCluserResponseMetadata": { + "description": "备份任务数据", + "properties": { + "apiVersion": { + "description": "API版本,默认为v3.1", + "type": "string" + }, + "kind": { + "description": "任务类型", + "type": "string" + } + }, + "type": "object" + }, + "SnapshotClusterResponseBody": { + "description": "备份返回体", + "properties": { + "uid": { + "type": "string", + "description": "任务ID" + }, + "metadata": { + "description": "备份任务元数据", + "$ref": "#/components/schemas/SnapshotCluserResponseMetadata" + } + }, + "type": "object" + }, + "ChartResp": { + "properties": { + "id": { + "type": "string", + "description": "模板ID", + "example": "1abd3bd6-0258-11ec-b8b0-0255ac100b05" + }, + "name": { + "type": "string", + "description": "模板名称", + "example": "magento-mysql" + }, + "values": { + "type": "string", + "description": "模板值", + "example": "{\"basic\":{\"admin_password\":\"magentorocks1\",\"admin_username\":\"admin\",\"app_name\":\"magento\",\"mysql_database\":\"magento\",\"mysql_name\":\"mysql\",\"mysql_password\":\"magento\",\"mysql_port\":3306,\"mysql_root_password\":\"changeme\",\"mysql_user\":\"magento\",\"storage_class\":\"csi-nas\",\"storage_mode\":\"ReadWriteMany\",\"storage_size\":\"10G\"},\"global\":{\"magento_EIP\":\"100.95.154.255\",\"magento_EPORT\":32080,\"namespace\":\"default\"},\"image\":{\"magento_image\":\"swr.cn-north-7.myhuaweicloud.com/everest/magento:latest\",\"mysql_image\":\"swr.cn-north-7.myhuaweicloud.com/everest/mysql:5.7.14\"}}" + }, + "translate": { + "type": "string", + "description": "模板翻译资源", + "example": "" + }, + "instruction": { + "type": "string", + "description": "模板介绍", + "example": "" + }, + "version": { + "type": "string", + "description": "模板版本", + "example": "1.0.0" + }, + "description": { + "type": "string", + "description": "模板描述", + "example": "chart description" + }, + "source": { + "type": "string", + "description": "模板的来源", + "example": "" + }, + "icon_url": { + "type": "string", + "description": "模板的图标链接", + "example": "https://example.com/magento-stack-110x117.png" + }, + "public": { + "type": "boolean", + "description": "是否公开模板", + "example": false + }, + "chart_url": { + "type": "string", + "description": "模板的链接", + "example": "magento-mysql-1.0.0.tgz" + }, + "create_at": { + "type": "string", + "description": "创建时间", + "example": "2021-08-20T08:00:29Z" + }, + "update_at": { + "type": "string", + "description": "更新时间", + "example": "2021-08-20T08:00:29Z" + } + }, + "description": "模板返回体", + "type": "object" + }, + "PackageOptions": { + "description": "配置参数结构", + "required": [ + "name", + "type", + "default", + "validAt", + "empty", + "schema" + ], + "properties": { + "name": { + "type": "string", + "description": "参数名称" + }, + "default": { + "type": "object", + "description": "参数默认值,不指定时按默认值生效, 参数类型以实际返回为准,可能为integer,string或者boolean" + }, + "validAt": { + "type": "string", + "description": "参数生效方式", + "enum": [ + "static", + "immediately" + ] + }, + "empty": { + "type": "boolean", + "description": "配置项是否可以为空" + }, + "schema": { + "type": "string", + "description": "参数分类" + }, + "type": { + "type": "string", + "description": "参数类型" + } + }, + "type": "object" + }, + "ClusterConfigDetailRespBody": { + "type": "object", + "description": "获取指定集群配置项列表返回体", + "additionalProperties": { + "type": "array", + "description": "配置参数,由key/value组成。", + "items": { + "$ref": "#/components/schemas/PackageOptions" } - }, - "description" : "", - "type" : "object" + } }, - "NodeOwnerReference" : { - "properties" : { - "nodepoolName" : { - "type" : "string", - "description" : "节点池名称" - }, - "nodepoolID" : { - "type" : "string", - "description" : "节点池UID" - } - }, - "description" : "节点的属主对象信息", - "type" : "object" + "NodePoolResp": { + "required": [ + "kind", + "apiVersion", + "metadata", + "spec" + ], + "properties": { + "kind": { + "type": "string", + "description": "API类型,固定值“NodePool”。", + "default": "NodePool" + }, + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”。", + "default": "v3" + }, + "metadata": { + "description": "节点池的元数据信息", + "$ref": "#/components/schemas/NodePoolMetadata" + }, + "spec": { + "description": "节点池的规格描述", + "$ref": "#/components/schemas/NodePoolSpec" + }, + "status": { + "description": "节点池状态", + "$ref": "#/components/schemas/NodePoolStatus" + } + }, + "description": "", + "type": "object" + }, + "AddNodesToNodePoolList": { + "description": "自定义节点池纳管节点参数,纳管过程将清理节点上系统盘、数据盘数据,并作为新节点接入Kuberntes集群,请提前备份迁移关键数据。", + "required": [ + "apiVersion", + "kind", + "nodeList" + ], + "properties": { + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”。" + }, + "kind": { + "type": "string", + "description": "API类型,固定值“List”。" + }, + "nodeList": { + "type": "array", + "description": "纳管节点列表,当前最多支持同时纳管200个节点。", + "items": { + "$ref": "#/components/schemas/AddNodesToNodePool" + } + } + }, + "type": "object" + }, + "ReinstallJobResult": { + "required": [ + "jobid" + ], + "properties": { + "jobid": { + "type": "string", + "format": "uuid", + "example": "70a599e0-31e7-49b7-b260-868f44166666", + "description": "提交任务成功后返回的任务ID,用户可以使用该ID对任务执行情况进行查询。" + } + }, + "description": "纳管节点或者重置节点任务返回体。", + "type": "object" + }, + "AddNodesToNodePool": { + "description": "自定义节点池纳管节点参数。", + "required": [ + "serverID" + ], + "properties": { + "serverID": { + "type": "string", + "format": "uuid", + "description": "服务器ID,获取方式请参见ECS/BMS相关资料。" + } + }, + "type": "object" + }, + "NodeCreateRequest": { + "required": [ + "kind", + "apiVersion", + "spec" + ], + "properties": { + "kind": { + "type": "string", + "description": "API类型,固定值“Node”,该值不可修改。", + "default": "Node" + }, + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”,该值不可修改。", + "default": "v3" + }, + "metadata": { + "description": "metadata是节点对象的元数据定义,是集合类的元素类型,包含一组由不同名称定义的属性。", + "$ref": "#/components/schemas/NodeMetadata" + }, + "spec": { + "description": "spec是集合类的元素类型,用户对需要管理的节点对象进行详细描述的主体部分都在spec中给出。系统通过spec的描述来创建或更新对象。", + "$ref": "#/components/schemas/NodeSpec" + } + }, + "description": "", + "type": "object" + }, + "AutopilotContainerNetwork": { + "required": [ + "mode" + ], + "properties": { + "mode": { + "type": "string", + "description": "容器网络类型", + "minLength": 0, + "maxLength": 64, + "enum": [ + "eni" + ] + } + }, + "description": "Container network parameters.", + "type": "object" + }, + "AutopilotClusterExtendParam": { + "properties": { + "enterpriseProjectId": { + "type": "string", + "description": "集群所属的企业项目ID。" + }, + "upgradefrom": { + "type": "string", + "description": "记录集群通过何种升级方式升级到当前版本。" + } + }, + "type": "object" + }, + "AutopilotCluster": { + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ], + "properties": { + "kind": { + "type": "string", + "description": "API类型,固定值“Cluster”或“cluster”,该值不可修改。", + "default": "Cluster" + }, + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”,该值不可修改。", + "default": "v3" + }, + "metadata": { + "description": "集群的基本信息,为集合类的元素类型,包含一组由不同名称定义的属性。", + "$ref": "#/components/schemas/AutopilotClusterMetadata" + }, + "spec": { + "description": "spec是集合类的元素类型,您对需要管理的集群对象进行详细描述的主体部分都在spec中给出。CCE通过spec的描述来创建或更新对象。", + "$ref": "#/components/schemas/AutopilotClusterSpec" + }, + "status": { + "description": "集合类的元素类型,用于记录对象在系统中的当前状态信息,包含了集群状态和本次创建集群作业的jobID", + "$ref": "#/components/schemas/AutopilotClusterStatus" + } + }, + "description": "", + "type": "object" + }, + "AutopilotAuthentication": { + "properties": { + "mode": { + "type": "string", + "description": "集群认证模式。默认取值为“rbac”。" + } + }, + "description": "", + "type": "object" + }, + "AutopilotResourceTag": { + "properties": { + "key": { + "type": "string", + "description": "Key值。", + "minLength": 1, + "maxLength": 128 + }, + "value": { + "type": "string", + "description": "Value值。", + "maxLength": 255 + } + }, + "description": "CCE资源标签", + "type": "object" + }, + "AutopilotEniNetwork": { + "required": [ + "subnets" + ], + "properties": { + "subnets": { + "type": "array", + "description": "ENI所在子网的IPv4子网ID列表。获取方法如下:", + "items": { + "description": "IPv4子网ID", + "$ref": "#/components/schemas/AutopilotNetworkSubnet" + } + } + }, + "description": "ENI网络配置。", + "type": "object" }, - "Taint" : { - "required" : [ "key", "effect" ], - "properties" : { - "key" : { - "type" : "string", - "description" : "键" - }, - "value" : { - "type" : "string", - "description" : "值", - "maxLength" : 63 - }, - "effect" : { - "type" : "string", - "description" : "作用效果", - "enum" : [ "NoSchedule", "PreferNoSchedule", "NoExecute" ] + "AutopilotPackageConfiguration": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "组件名称" + }, + "configurations": { + "type": "array", + "description": "组件配置项", + "items": { + "$ref": "#/components/schemas/AutopilotConfigurationItem" + } } - }, - "description" : "如下字段不可使用:", - "type" : "object" + } }, - "NodeExtendParam" : { - "description" : "创建节点时的扩展参数。", - "properties" : { - "ecs:performancetype" : { - "type" : "string", - "description" : "云服务器规格的分类。响应中会返回此字段。" - }, - "orderID" : { - "type" : "string", - "description" : "订单ID,节点付费类型为自动付费包周期类型时,响应中会返回此字段(仅创建场景涉及)。" - }, - "productID" : { - "type" : "string", - "description" : "产品ID,节点付费类型为自动付费包周期类型时,响应中会返回此字段。" - }, - "maxPods" : { - "type" : "integer", - "description" : "节点最大允许创建的实例数(Pod),该数量包含系统默认实例,取值范围为16~256。" - }, - "periodType" : { - "type" : "string", - "description" : "- month:月" - }, - "periodNum" : { - "type" : "integer", - "description" : "订购周期数,取值范围:" - }, - "isAutoRenew" : { - "type" : "string", - "description" : "是否自动续订" - }, - "isAutoPay" : { - "type" : "string", - "description" : "是否自动扣款" + "AutopilotClusterStatus": { + "properties": { + "phase": { + "type": "string", + "description": "集群状态,取值如下" }, - "DockerLVMConfigOverride" : { - "type" : "string", - "description" : "Docker数据盘配置项(已废弃,请使用storage字段)。默认配置示例如下:" + "jobID": { + "type": "string", + "description": "任务ID,集群当前状态关联的任务ID。当前支持:" }, - "dockerBaseSize" : { - "type" : "integer", - "minimum" : 10, - "maximum" : 500, - "description" : "节点上单容器的可用磁盘空间大小,单位G。" + "reason": { + "type": "string", + "description": "集群变为当前状态的原因,在集群在非“Available”状态下时,会返回此参数。" }, - "publicKey" : { - "type" : "string", - "description" : "节点的公钥。" + "message": { + "type": "string", + "description": "集群变为当前状态的原因的详细信息,在集群在非“Available”状态下时,会返回此参数。" }, - "alpha.cce/preInstall" : { - "type" : "string", - "description" : "安装前执行脚本" - }, - "alpha.cce/postInstall" : { - "type" : "string", - "description" : "安装后执行脚本" - }, - "alpha.cce/NodeImageID" : { - "type" : "string", - "description" : "如果创建裸金属节点,需要使用自定义镜像时用此参数。" + "endpoints": { + "description": "集群中 kube-apiserver 的访问地址。", + "type": "array", + "items": { + "$ref": "#/components/schemas/AutopilotClusterEndpoints" + } }, - "chargingMode" : { - "type" : "integer", - "format" : "int32", - "description" : "节点的计费模式。已废弃,请使用NodeSpec中的billingMode字段。" + "isLocked": { + "type": "boolean", + "description": "CBC资源锁定" }, - "agency_name" : { - "type" : "string", - "description" : "委托的名称。" + "lockScene": { + "type": "string", + "description": "CBC资源锁定场景" }, - "kubeReservedMem" : { - "type" : "integer", - "format" : "int32", - "description" : "节点内存预留,Kubernetes相关组件预留值。随节点规格变动,具体请参见[节点预留资源策略说明](https://support.huaweicloud.com/usermanual-cce/cce_10_0178.html)。" + "lockSource": { + "type": "string", + "description": "锁定资源" }, - "systemReservedMem" : { - "type" : "integer", - "format" : "int32", - "description" : "节点内存预留,系统组件预留值。随节点规格变动,具体请参见[节点预留资源策略说明](https://support.huaweicloud.com/usermanual-cce/cce_10_0178.html)。" + "lockSourceId": { + "type": "string", + "description": "锁定的资源ID" }, - "init-node-password" : { - "type" : "string", - "description" : "节点密码,作为响应参数时,固定展示星号。", - "example" : "******" + "deleteOption": { + "type": "object", + "description": "删除配置状态(仅删除请求响应包含)" }, - "securityReinforcementType" : { - "type" : "string", - "description" : "**参数解释**:", - "enum" : [ "null", "cybersecurity" ] + "deleteStatus": { + "type": "object", + "description": "删除状态信息(仅删除请求响应包含)" } }, - "type" : "object" + "description": "", + "type": "object" }, - "NodeBandwidth" : { - "properties" : { - "chargemode" : { - "type" : "string", - "description" : "带宽的计费类型:" - }, - "size" : { - "type" : "integer", - "description" : "带宽大小,取值请参见取值请参见申请EIP接口中bandwidth.size说明。" - }, - "sharetype" : { - "type" : "string", - "description" : "带宽的共享类型,共享类型枚举:PER,表示独享,目前仅支持独享。" + "AutopilotNetworkSubnet": { + "required": [ + "subnetID" + ], + "properties": { + "subnetID": { + "type": "string", + "description": "用于创建控制节点的subnet的IPv4子网ID(暂不支持IPv6)。获取方法如下:", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" } }, - "description" : "", - "type" : "object" + "description": "ENI网络配置,创建集群指定subnets字段使用时必填。", + "type": "object" + }, + "AutopilotConfigurationItem": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "组件配置项名称" + }, + "value": { + "type": "object", + "description": "组件配置项值", + "properties": {} + } + } }, - "RuntimeConfig" : { - "required" : [ "lvType" ], - "properties" : { - "lvType" : { - "type" : "string", - "description" : "LVM写入模式:linear、striped。linear:线性模式;striped:条带模式,使用多块磁盘组成条带模式,能够提升磁盘性能。" + "AutopilotCustomSan": { + "type": "object", + "description": "集群的API Server服务端证书中的自定义SAN(Subject Alternative Name)字段,遵从SSL标准X509定义的格式规范。", + "items": { + "type": "string", + "description": "", + "maxLength": 255, + "minLength": 0 + }, + "maxItems": 128, + "minItems": 0 + }, + "AutopilotClusterEndpoints": { + "properties": { + "url": { + "type": "string", + "description": "集群中 kube-apiserver 的访问地址" + }, + "type": { + "type": "string", + "description": "集群访问地址的类型" + } + }, + "type": "object" + }, + "AutopilotClusterMetadata": { + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "集群名称。", + "minLength": 4, + "maxLength": 128 + }, + "uid": { + "type": "string", + "description": "集群ID,资源唯一标识,创建成功后自动生成,填写无效。在创建包周期集群时,响应体不返回集群ID。", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + }, + "alias": { + "type": "string", + "description": "集群显示名,用于在 CCE 界面显示,该名称创建后可修改。", + "minLength": 4, + "maxLength": 128 + }, + "annotations": { + "type": "object", + "description": "集群注解,由key/value组成:", + "additionalProperties": { + "type": "string", + "description": "" + } + }, + "labels": { + "type": "object", + "description": "集群标签,key/value对格式。", + "additionalProperties": { + "type": "string", + "description": "" + } + }, + "creationTimestamp": { + "type": "string", + "description": "集群创建时间" + }, + "updateTimestamp": { + "type": "string", + "description": "集群更新时间" + } + }, + "description": "支持通过 annotations[\"cluster.install.addons/install\"] 来指定创建集群时需要安装的插件", + "type": "object" + }, + "AutopilotHostNetwork": { + "required": [ + "subnet", + "vpc" + ], + "properties": { + "vpc": { + "type": "string", + "description": "用于创建控制节点的VPC的ID。", + "minLength": 0, + "maxLength": 64 + }, + "subnet": { + "type": "string", + "description": "用于创建控制节点的subnet的网络ID。获取方法如下:", + "minLength": 0, + "maxLength": 64 + } + }, + "description": "Node network parameters.", + "type": "object" + }, + "AutopilotClusterSpec": { + "required": [ + "containerNetwork", + "flavor", + "hostNetwork" + ], + "properties": { + "category": { + "type": "string", + "description": "集群类别。", + "enum": [ + "Turbo" + ] + }, + "type": { + "type": "string", + "description": "集群Master节点架构:", + "enum": [ + "VirtualMachine" + ] + }, + "flavor": { + "type": "string", + "description": "集群规格,cce.autopilot.cluster" + }, + "version": { + "type": "string", + "description": "集群版本,与Kubernetes社区基线版本保持一致,建议选择最新版本。" + }, + "platformVersion": { + "type": "string", + "description": "CCE集群平台版本号,表示集群版本(version)下的内部版本。用于跟踪某一集群版本内的迭代,集群版本内唯一,跨集群版本重新计数。不支持用户指定,集群创建时自动选择对应集群版本的最新平台版本。" + }, + "description": { + "type": "string", + "description": "集群描述,对于集群使用目的的描述,可根据实际情况自定义,默认为空。集群创建成功后可通过接口[更新指定的集群](cce_02_0240.xml)来做出修改,也可在CCE控制台中对应集群的“集群详情”下的“描述”处进行修改。仅支持utf-8编码。", + "minLength": 0, + "maxLength": 200, + "pattern": "[\\~\\$\\%\\^\\&\\*\\<\\>\\[\\]\\{\\}\\(\\)\\'\\\"\\#\\\\]" + }, + "customSan": { + "$ref": "#/components/schemas/AutopilotCustomSan" + }, + "enableSnat": { + "type": "boolean", + "description": "集群是否配置SNAT。开启后您的集群可以通过NAT网关访问公网,默认使用所选的VPC中已有的NAT网关,否则系统将会为您自动创建一个默认规格的NAT网关并绑定弹性公网IP,自动配置SNAT规则。" + }, + "enableSWRImageAccess": { + "type": "boolean", + "description": "集群是否配置镜像访问。为确保您的集群节点可以从容器镜像服务中拉取镜像,默认使用所选VPC中已有的SWR和OBS终端节点,否则将会为您自动新建SWR和OBS终端节点。" + }, + "ipv6enable": { + "type": "boolean", + "description": "集群是否使用IPv6模式。" + }, + "hostNetwork": { + "description": "节点网络参数,包含了虚拟私有云VPC和子网的ID信息,而VPC是集群内节点之间的通信依赖,所以是必选的参数集。", + "$ref": "#/components/schemas/AutopilotHostNetwork" + }, + "containerNetwork": { + "description": "容器网络参数,包含了容器网络类型和容器网段的信息。", + "$ref": "#/components/schemas/AutopilotContainerNetwork" + }, + "eniNetwork": { + "description": "云原生网络2.0网络配置。", + "$ref": "#/components/schemas/AutopilotEniNetwork" + }, + "serviceNetwork": { + "description": "服务网段参数,包含IPv4 CIDR。", + "$ref": "#/components/schemas/AutopilotServiceNetwork" + }, + "authentication": { + "description": "集群认证方式相关配置。", + "$ref": "#/components/schemas/AutopilotAuthentication" + }, + "billingMode": { + "type": "integer", + "format": "int32", + "description": "集群的计费方式。", + "default": 0 + }, + "kubernetesSvcIpRange": { + "type": "string", + "description": "服务网段参数,kubernetes clusterIP取值范围。创建集群时如若未传参,默认为\"10.247.0.0/16\"。该参数废弃中,推荐使用新字段serviceNetwork,包含IPv4服务网段。" + }, + "clusterTags": { + "type": "array", + "description": "集群资源标签", + "items": { + "description": "集群资源标签", + "$ref": "#/components/schemas/AutopilotResourceTag" + }, + "maxItems": 5, + "minItems": 0 + }, + "kubeProxyMode": { + "type": "string", + "description": "服务转发模式:", + "enum": [ + "iptables" + ] + }, + "az": { + "type": "string", + "description": "可用区(仅查询返回字段)。" + }, + "extendParam": { + "$ref": "#/components/schemas/AutopilotClusterExtendParam", + "description": "集群扩展字段,可配置多可用区集群、专属CCE集群,以及将集群创建在特定的企业项目下等。" + }, + "configurationsOverride": { + "type": "array", + "description": "覆盖集群默认组件配置", + "items": { + "$ref": "#/components/schemas/AutopilotPackageConfiguration" + } + } + }, + "description": "集群参数定义。", + "type": "object" + }, + "AutopilotServiceNetwork": { + "properties": { + "IPv4CIDR": { + "type": "string", + "description": "kubernetes clusterIP IPv4 CIDR取值范围。创建集群时若未传参,默认为\"10.247.0.0/16\"。" + } + }, + "type": "object" + }, + "AutopilotClusterList": { + "required": [ + "apiVersion", + "items", + "kind" + ], + "properties": { + "kind": { + "type": "string", + "description": "Api type", + "minLength": 6, + "maxLength": 10, + "default": "Cluster" + }, + "apiVersion": { + "type": "string", + "description": "API version", + "minLength": 2, + "maxLength": 5, + "default": "v3" + }, + "items": { + "type": "array", + "description": "集群对象列表,包含了当前项目下所有集群的详细信息。您可通过items.metadata.name下的值来找到对应的集群。", + "items": { + "description": "", + "$ref": "#/components/schemas/AutopilotCluster" + } + } + }, + "description": "", + "type": "object" + }, + "MaintenanceWindow": { + "required": [ + "weekly_period", + "start_time", + "duration_hours" + ], + "properties": { + "weekly_period": { + "type": "string", + "description": "升级周期,从\"Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday\"中进行选择,以英文逗号分隔" + }, + "start_time": { + "type": "string", + "description": "升级起始时间(UTC时间)" + }, + "duration_hours": { + "type": "integer", + "description": "升级时长" + }, + "upgrade_scope": { + "type": "string", + "description": "升级版本范围,当前只支持小版本自动升级", + "default": "OnlyPatchVersion", + "pattern": "OnlyPatchVersion" + } + }, + "type": "object" + }, + "APIVersionDetail": { + "description": "API版本的详细信息", + "required": [ + "id", + "links", + "min_version", + "status", + "updated", + "version" + ], + "properties": { + "id": { + "type": "string", + "description": "API版本ID。例如v3。" + }, + "links": { + "type": "array", + "description": "API版本的URL链接信息。", + "items": { + "$ref": "#/components/schemas/APIVersionLink" + } + }, + "min_version": { + "type": "string", + "description": "如果API的这个版本支持微版本,则支持最小的微版本。如果不支持微版本,这将是空字符串。" + }, + "status": { + "type": "string", + "description": "API版本的状态。", + "enum": [ + "CURRENT", + "SUPPORTED", + "DEPRECATED" + ] + }, + "updated": { + "type": "string", + "description": "API发布时间(UTC格式)。例如API版本为v3时,值为'2018-09-15 00:00:00Z'。" + }, + "version": { + "type": "string", + "description": "如果API的这个版本支持微版本,则支持最大的微版本。如果不支持微版本,这将是空字符串。" + } + }, + "type": "object" + }, + "APIVersionLink": { + "description": "API版本的URL链接信息。", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "type": "string", + "description": "API版本信息的链接。" + }, + "rel": { + "type": "string", + "description": "链接属性。self:自助链接包含版本链接的资源。立即链接后使用这些链接。", + "enum": [ + "self" + ] + } + }, + "type": "object" + }, + "APIVersionList": { + "description": "API版本的详细信息", + "required": [ + "versions" + ], + "properties": { + "versions": { + "type": "array", + "description": "API版本信息列表", + "items": { + "$ref": "#/components/schemas/APIVersionDetail" + } + } + }, + "type": "object" + }, + "NodeItem": { + "required": [ + "uid" + ], + "properties": { + "uid": { + "type": "string", + "description": "节点ID" + } + }, + "type": "object" + }, + "RemoveNodesTask": { + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”。" + }, + "kind": { + "type": "string", + "description": "API类型,固定值“RemoveNodesTask”。" + }, + "spec": { + "description": "配置信息", + "$ref": "#/components/schemas/RemoveNodesSpec" + }, + "status": { + "description": "任务状态", + "$ref": "#/components/schemas/TaskStatus" + } + }, + "type": "object" + }, + "TaskStatus": { + "properties": { + "jobID": { + "type": "string", + "description": "任务ID,供调用者查询任务进度。" + } + }, + "type": "object" + }, + "RemoveNodesSpec": { + "required": [ + "login", + "nodes" + ], + "properties": { + "login": { + "description": "节点的登录方式。密钥对和密码登录方式二者必选其一。", + "$ref": "#/components/schemas/Login" + }, + "nodes": { + "type": "array", + "description": "待操作节点列表", + "items": { + "$ref": "#/components/schemas/NodeItem" + } + } + }, + "type": "object" + }, + "ImageCacheDetail": { + "required": [ + "name", + "id", + "created_at", + "images", + "image_cache_size", + "retention_days", + "building_config", + "status" + ], + "properties": { + "name": { + "type": "string", + "description": "镜像缓存名称。", + "minLength": 1, + "maxLength": 128, + "pattern": "^[a-z]([a-z0-9-]*[a-z0-9])?$" + }, + "id": { + "type": "string", + "description": "镜像缓存ID。", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + }, + "created_at": { + "type": "string", + "description": "镜像缓存创建时间戳。" + }, + "images": { + "type": "array", + "description": "镜像缓存中的容器镜像列表。", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 1024 + }, + "maxItems": 20, + "minItems": 1 + }, + "image_cache_size": { + "type": "integer", + "format": "int32", + "description": "镜像缓存后端对应的存储盘大小,单位GiB。", + "default": 20, + "minimum": 20, + "maximum": 400 + }, + "retention_days": { + "type": "integer", + "format": "int32", + "description": "**参数解释:**", + "default": 0, + "minimum": 0, + "maximum": 10000 + }, + "building_config": { + "description": "构建镜像缓存的配置信息。", + "$ref": "#/components/schemas/ImageCacheBuildingConfig" + }, + "status": { + "type": "string", + "description": "**参数解释:**", + "enum": [ + "Available", + "Unavailable", + "Creating", + "Deleting", + "Failed" + ] + }, + "message": { + "type": "string", + "description": "镜像缓存创建失败或异常的错误信息。", + "minLength": 0, + "maxLength": 10240 + } + }, + "description": "镜像缓存信息。", + "type": "object" + }, + "ListImageCacheResponseBody": { + "required": [ + "image_caches" + ], + "properties": { + "image_caches": { + "type": "array", + "description": "镜像缓存列表。", + "items": { + "$ref": "#/components/schemas/ImageCacheDetail" + }, + "minItems": 0, + "maxItems": 20 + } + }, + "description": "镜像缓存列表-response结构体。", + "type": "object" + }, + "ImageCacheBuildingConfig": { + "description": "镜像缓存构建配置信息。", + "required": [ + "cluster" + ], + "properties": { + "cluster": { + "type": "string", + "description": "**参数解释:**", + "example": "8b3b4b2d-e39d-11ef-a9ac-0255ac100113", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + }, + "image_pull_secrets": { + "description": "下载所需缓存镜像的访问凭证列表,不填写或无有效凭证时仅支持下载公共镜像。", + "type": "array", + "items": { + "type": "string", + "description": "**参数解释:**", + "minLength": 3, + "maxLength": 317 + }, + "maxItems": 20, + "minItems": 0, + "example": [ + "default:default-secret", + "test:my-secret" + ] } }, - "type" : "object" + "type": "object" }, - "ClusterNodeInformation" : { - "required" : [ "metadata" ], - "properties" : { - "metadata" : { - "description" : "metadata是节点对象的元数据定义,是集合类的元素类型,包含一组由不同名称定义的属性。", - "$ref" : "#/components/schemas/ClusterNodeInformationMetadata" + "UpgradeTaskStatus": { + "description": "升级任务状态信息", + "properties": { + "phase": { + "type": "string", + "description": "升级任务状态." + }, + "progress": { + "type": "string", + "description": "升级任务进度" + }, + "completionTime": { + "type": "string", + "description": "升级任务结束时间" } }, - "description" : "", - "type" : "object" + "type": "object" }, - "VirtualSpace" : { - "required" : [ "name", "size" ], - "properties" : { - "name" : { - "type" : "string", - "description" : "virtualSpace的名称,当前仅支持四种类型:share、kubernetes、runtime、user。" + "UpgradeTaskListResponseBody": { + "properties": { + "apiVersion": { + "type": "string", + "description": "api版本,默认为v3" }, - "size" : { - "type" : "string", - "description" : "virtualSpace的大小,仅支持整数百分比。例如:90%。" + "kind": { + "type": "string", + "description": "资源类型" }, - "lvmConfig" : { - "description" : "lvm配置管理,适用于share、kubernetes和user空间配置。 需要注意:一个virtualSpace仅支持一个config配置。", - "$ref" : "#/components/schemas/LVMConfig" + "metadata": { + "description": "元数据信息", + "$ref": "#/components/schemas/UpgradeTaskMetadata" }, - "runtimeConfig" : { - "description" : "runtime配置管理,适用于运行时空间配置。 需要注意:一个virtualSpace仅支持一个config配置。", - "$ref" : "#/components/schemas/RuntimeConfig" + "items": { + "type": "array", + "description": "集群升级任务列表", + "items": { + "$ref": "#/components/schemas/UpgradeTaskResponseBody" + } } }, - "type" : "object" + "type": "object" }, - "Node" : { - "properties" : { - "kind" : { - "type" : "string", - "description" : "API类型,固定值“Node”,该值不可修改。", - "default" : "Node" + "UpgradeTaskSpec": { + "description": "升级任务属性", + "properties": { + "version": { + "type": "string", + "description": "升级前集群版本" + }, + "targetVersion": { + "type": "string", + "description": "升级的目标集群版本" + }, + "items": { + "type": "object", + "description": "升级任务附属信息" + } + }, + "type": "object" + }, + "UpgradeTaskResponseBody": { + "properties": { + "apiVersion": { + "type": "string", + "description": "api版本,默认为v3" + }, + "kind": { + "type": "string", + "description": "资源类型,默认为UpgradeTask" + }, + "metadata": { + "description": "升级任务元数据信息", + "$ref": "#/components/schemas/UpgradeTaskMetadata" + }, + "spec": { + "description": "升级任务信息", + "$ref": "#/components/schemas/UpgradeTaskSpec" + }, + "status": { + "description": "升级任务状态", + "$ref": "#/components/schemas/UpgradeTaskStatus" + } + }, + "type": "object" + }, + "UpgradeTaskMetadata": { + "description": "升级任务元数据", + "properties": { + "uid": { + "type": "string", + "description": "升级任务ID" + }, + "creationTimestamp": { + "type": "string", + "description": "任务创建时间" }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”,该值不可修改。", - "default" : "v3" + "updateTimestamp": { + "type": "string", + "description": "任务更新时间" + } + }, + "type": "object" + }, + "CreateReleaseReqBody": { + "description": "创建模板实例的请求体", + "required": [ + "chart_id", + "name", + "namespace", + "values", + "version" + ], + "properties": { + "chart_id": { + "type": "string", + "description": "模板ID", + "example": "af4b699e-018c-11ec-b8b0-0255ac100b05" + }, + "description": { + "type": "string", + "description": "模板实例描述", + "example": "" + }, + "name": { + "type": "string", + "description": "模板实例名称", + "example": "testwww" + }, + "namespace": { + "type": "string", + "description": "模板实例所在的命名空间", + "example": "monitoring" + }, + "version": { + "type": "string", + "description": "模板实例版本号", + "example": "1.0.0" + }, + "parameters": { + "$ref": "#/components/schemas/ReleaseReqBodyParams" + }, + "values": { + "type": "object", + "description": "模板实例的值", + "properties": { + "imagePullPolicy": { + "type": "string", + "example": "IfNotPresent", + "description": "镜像拉取策略" + }, + "imageTag": { + "type": "string", + "example": "v2", + "description": "镜像标签" + } + } + } + }, + "type": "object" + }, + "ReleaseReqBodyParams": { + "description": "模板实例参数", + "properties": { + "dry_run": { + "type": "boolean", + "example": false, + "description": "开启后,仅验证模板参数,不进行安装" + }, + "name_template": { + "type": "string", + "description": "实例名称模板" + }, + "no_hooks": { + "type": "boolean", + "example": false, + "description": "安装时是否禁用hooks" + }, + "replace": { + "type": "boolean", + "example": false, + "description": "是否替换同名实例" + }, + "recreate": { + "type": "boolean", + "example": false, + "description": "是否重建实例" + }, + "reset_values": { + "type": "boolean", + "example": false, + "description": "更新时是否重置values" + }, + "release_version": { + "type": "integer", + "example": 1, + "description": "回滚实例的版本", + "format": "int32" + }, + "include_hooks": { + "type": "boolean", + "example": false, + "description": "更新或者删除时启用hooks" + } + }, + "type": "object" + }, + "DeleteNodePoolStatus": { + "properties": { + "currentNode": { + "type": "integer", + "format": "int32", + "description": "当前节点池中所有节点数量(不含删除中的节点)。" + }, + "creatingNode": { + "type": "integer", + "format": "int32", + "description": "当前节点池中处于创建流程中的节点数量。" + }, + "deletingNode": { + "type": "integer", + "format": "int32", + "description": "当前节点池中删除中的节点数量。" + }, + "phase": { + "type": "string", + "description": "节点池状态。", + "enum": [ + "Synchronizing", + "Synchronized", + "SoldOut", + "Deleting", + "Error" + ] + }, + "jobId": { + "type": "string", + "description": "对节点池执行操作时的 JobID。" + }, + "conditions": { + "description": "节点池当前详细状态列表,详情参见Condition类型定义。", + "type": "array", + "items": { + "$ref": "#/components/schemas/NodePoolCondition", + "description": "节点池详细状态。" + } + }, + "scaleGroupStatuses": { + "description": "伸缩组当前详细状态信息,详情参见ScaleGroupStatus类型定义", + "type": "array", + "items": { + "$ref": "#/components/schemas/ScaleGroupStatus" + } + } + }, + "description": "", + "type": "object" + }, + "DeleteNodePoolResp": { + "required": [ + "kind", + "apiVersion", + "metadata", + "spec" + ], + "properties": { + "kind": { + "type": "string", + "description": "API类型,固定值“NodePool”。", + "default": "NodePool" + }, + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”。", + "default": "v3" + }, + "metadata": { + "description": "节点池的元数据信息", + "$ref": "#/components/schemas/NodePoolMetadata" + }, + "spec": { + "description": "节点池的规格描述", + "$ref": "#/components/schemas/NodePoolSpec" + }, + "status": { + "description": "节点池状态", + "$ref": "#/components/schemas/DeleteNodePoolStatus" + } + }, + "description": "", + "type": "object" + }, + "ClusterSpec": { + "required": [ + "eniNetwork", + "containerNetwork", + "flavor", + "hostNetwork" + ], + "properties": { + "category": { + "type": "string", + "description": "集群类别:", + "enum": [ + "CCE", + "Turbo" + ] + }, + "type": { + "type": "string", + "description": "集群Master节点架构:", + "enum": [ + "VirtualMachine", + "ARM64" + ] + }, + "flavor": { + "type": "string", + "description": "集群规格,当集群为v1.15及以上版本时支持创建后变更,详情请参见[变更集群规格](ResizeCluster.xml)。请按实际业务需求进行选择:" + }, + "version": { + "type": "string", + "description": "集群版本,与Kubernetes社区基线版本保持一致,建议选择最新版本。" + }, + "platformVersion": { + "type": "string", + "description": "CCE集群平台版本号,表示集群版本(version)下的内部版本。用于跟踪某一集群版本内的迭代,集群版本内唯一,跨集群版本重新计数。不支持用户指定,集群创建时自动选择对应集群版本的最新平台版本。" + }, + "description": { + "type": "string", + "description": "集群描述,对于集群使用目的的描述,可根据实际情况自定义,默认为空。集群创建成功后可通过接口[更新指定的集群](cce_02_0240.xml)来做出修改,也可在CCE控制台中对应集群的“集群详情”下的“描述”处进行修改。仅支持utf-8编码。", + "minLength": 0, + "maxLength": 200, + "pattern": "[\\~\\$\\%\\^\\&\\*\\<\\>\\[\\]\\{\\}\\(\\)\\'\\\"\\#\\\\]" + }, + "customSan": { + "$ref": "#/components/schemas/CustomSan" + }, + "ipv6enable": { + "type": "boolean", + "description": "集群是否使用IPv6模式,1.15版本及以上支持。" + }, + "hostNetwork": { + "description": "节点网络参数,包含了虚拟私有云VPC和子网的ID信息,而VPC是集群内节点之间的通信依赖,所以是必选的参数集。", + "$ref": "#/components/schemas/HostNetwork" + }, + "containerNetwork": { + "description": "容器网络参数,包含了容器网络类型和容器网段的信息。", + "$ref": "#/components/schemas/ContainerNetwork" + }, + "eniNetwork": { + "description": "云原生网络2.0网络配置,创建CCE Turbo集群时指定。", + "$ref": "#/components/schemas/EniNetwork" + }, + "serviceNetwork": { + "description": "服务网段参数,包含IPv4 CIDR。", + "$ref": "#/components/schemas/ServiceNetwork" + }, + "authentication": { + "description": "集群认证方式相关配置。", + "$ref": "#/components/schemas/Authentication" + }, + "billingMode": { + "type": "integer", + "format": "int32", + "description": "集群的计费方式。", + "default": 0 + }, + "masters": { + "type": "array", + "description": "控制节点的高级配置", + "items": { + "description": "", + "$ref": "#/components/schemas/MasterSpec" + }, + "maxItems": 3, + "minItems": 1 + }, + "kubernetesSvcIpRange": { + "type": "string", + "description": "服务网段参数,kubernetes clusterIP取值范围,1.11.7版本及以上支持。创建集群时如若未传参,默认为\"10.247.0.0/16\"。该参数废弃中,推荐使用新字段serviceNetwork,包含IPv4服务网段。" + }, + "clusterTags": { + "type": "array", + "description": "集群资源标签", + "items": { + "description": "集群资源标签", + "$ref": "#/components/schemas/ResourceTag" + }, + "maxItems": 5, + "minItems": 0 }, - "metadata" : { - "description" : "metadata是节点对象的元数据定义,是集合类的元素类型,包含一组由不同名称定义的属性。", - "$ref" : "#/components/schemas/NodeMetadata" + "kubeProxyMode": { + "type": "string", + "description": "服务转发模式,支持以下两种实现:", + "enum": [ + "iptables", + "ipvs" + ] }, - "spec" : { - "description" : "spec是集合类的元素类型,用户对需要管理的节点对象进行详细描述的主体部分都在spec中给出。系统通过spec的描述来创建或更新对象。", - "$ref" : "#/components/schemas/NodeSpec" + "az": { + "type": "string", + "description": "可用区(仅查询返回字段)。" }, - "status" : { - "description" : "节点状态,动态记录,创建或修改时指定无意义.", - "$ref" : "#/components/schemas/NodeStatus" + "extendParam": { + "$ref": "#/components/schemas/ClusterExtendParam", + "description": "集群扩展字段,可配置多可用区集群、专属CCE集群,以及将集群创建在特定的企业项目下等。" + }, + "supportIstio": { + "type": "boolean", + "description": "支持Istio" + }, + "enableDistMgt": { + "type": "boolean", + "description": "集群开启对分布式云支持。创建CCE Turbo集群时,可在创建集群过程中,开启对分布式云(cloudpond)支持。" + }, + "deletionProtection": { + "type": "boolean", + "description": "集群删除保护,默认为false关闭,如果开启后用户将无法删除该集群。", + "default": false + }, + "configurationsOverride": { + "type": "array", + "description": "覆盖集群默认组件配置", + "items": { + "$ref": "#/components/schemas/PackageConfiguration" + } + }, + "clusterOps": { + "$ref": "#/components/schemas/ClusterOps", + "description": "**参数解释:**" + }, + "encryptionConfig": { + "type": "object", + "description": "secret资源落盘加密配置,当前仅支持配置一种加密方式。默认使用cce托管密钥(用户侧不感知该密钥)进行加密。", + "$ref": "#/components/schemas/EncryptionConfig" + } + }, + "description": "集群参数定义。", + "type": "object" + }, + "ClusterExtendParam": { + "properties": { + "clusterAZ": { + "type": "string", + "description": "集群控制节点可用区配置。" + }, + "dssMasterVolumes": { + "type": "string", + "description": "用于指定控制节点的系统盘和数据盘使用专属分布式存储,未指定或者值为空时,默认使用EVS云硬盘。" + }, + "enterpriseProjectId": { + "type": "string", + "description": "集群所属的企业项目ID。" + }, + "kubeProxyMode": { + "type": "string", + "description": "服务转发模式,支持以下两种实现:" + }, + "clusterExternalIP": { + "type": "string", + "description": "master 弹性公网IP" + }, + "alpha.cce/fixPoolMask": { + "type": "string", + "description": "容器网络固定IP池掩码位数,仅vpc-router网络支持。" + }, + "decMasterFlavor": { + "type": "string", + "description": "专属CCE集群指定可控制节点的规格。" + }, + "dockerUmaskMode": { + "type": "string", + "description": "集群默认Docker的UmaskMode配置,可取值为secure或normal,不指定时默认为normal。" + }, + "kubernetes.io/cpuManagerPolicy": { + "type": "string", + "description": "集群CPU管理策略。取值为none(或空值)或static,默认为none(或空值)。" + }, + "orderID": { + "type": "string", + "description": "订单ID,集群付费类型为自动付费包周期类型时,响应中会返回此字段(仅创建场景涉及)。" + }, + "periodType": { + "type": "string", + "description": "- month:月" + }, + "periodNum": { + "type": "integer", + "description": "订购周期数,取值范围:" + }, + "isAutoRenew": { + "type": "string", + "description": "是否自动续订" + }, + "isAutoPay": { + "type": "string", + "description": "是否自动扣款" + }, + "upgradefrom": { + "type": "string", + "description": "记录集群通过何种升级方式升级到当前版本。" } }, - "description" : "", - "type" : "object" - }, - "NodePublicIP" : { - "properties" : { - "ids" : { - "type" : "array", - "description" : "已有的弹性IP的ID列表。数量不得大于待创建节点数", - "items" : { - "type" : "string", - "description" : "" - } + "type": "object" + }, + "AlarmInfo": { + "type": "object", + "description": "**参数解释:**", + "required": [ + "topics" + ], + "properties": { + "topics": { + "type": "array", + "items": { + "type": "string" + }, + "description": "**参数解释:**" }, - "count" : { - "type" : "integer", - "format" : "int32", - "description" : "要动态创建的弹性IP个数。" + "alarmRuleTemplateId": { + "type": "string", + "description": "**参数解释:**" }, - "eip" : { - "description" : "弹性IP参数", - "$ref" : "#/components/schemas/NodeEIPSpec" + "promInstanceID": { + "type": "string", + "description": "**参数解释:**" + }, + "promEnterpriseProjectID": { + "type": "string", + "description": "**参数解释:**" } - }, - "description" : "", - "type" : "object" + } }, - "Login" : { - "properties" : { - "sshKey" : { - "type" : "string", - "description" : "选择密钥对方式登录时的密钥对名称。" - }, - "userPassword" : { - "description" : "选择密码方式登录时的帐号密码信息,之后可通过此帐号密码登录节点。", - "$ref" : "#/components/schemas/UserPassword" + "MasterSpec": { + "properties": { + "availabilityZone": { + "type": "string", + "description": "可用区" } }, - "type" : "object" + "description": "master的配置,支持指定可用区、规格和故障域。若指定故障域,则必须所有master节点都需要指定故障字段。", + "type": "object" }, - "StorageGroups" : { - "required" : [ "name", "selectorNames", "virtualSpaces" ], - "properties" : { - "name" : { - "type" : "string", - "description" : "storageGroups的名字,作为虚拟存储组的名字,因此各个group名字不能重复。" + "EniNetwork": { + "required": [ + "eniSubnetId", + "subnets" + ], + "properties": { + "eniSubnetId": { + "type": "string", + "description": "ENI所在子网的IPv4子网ID(暂不支持IPv6,废弃中)。获取方法如下:", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" }, - "cceManaged" : { - "type" : "boolean", - "description" : "k8s及runtime所属存储空间。有且仅有一个group被设置为true,不填默认false。" - }, - "selectorNames" : { - "type" : "array", - "description" : "对应storageSelectors中的name,一个group可选择多个selector;但一个selector只能被一个group选择。", - "items" : { - "type" : "string", - "description" : "" - } + "eniSubnetCIDR": { + "type": "string", + "description": "ENI子网CIDR(废弃中)" }, - "virtualSpaces" : { - "description" : "group中空间配置的详细管理。", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/VirtualSpace" + "subnets": { + "type": "array", + "description": "IPv4子网ID列表", + "items": { + "description": "IPv4子网ID", + "$ref": "#/components/schemas/NetworkSubnet" } } }, - "type" : "object" + "description": "ENI网络配置,创建集群指定使用云原生网络2.0网络模式时必填subnets和eniSubnetId其中一个字段(eniSubnetCIDR可选,若填写了会校验是否合法),1.19.10及新版本集群使用subnets字段,1.19.8及老版本若使用subnets字段,则取值subnets数组中的第一个子网ID作为容器地址使用的子网ID。", + "type": "object" }, - "LVMConfig" : { - "required" : [ "lvType" ], - "properties" : { - "lvType" : { - "type" : "string", - "description" : "LVM写入模式:linear、striped。linear:线性模式;striped:条带模式,使用多块磁盘组成条带模式,能够提升磁盘性能。" + "ResourceTag": { + "properties": { + "key": { + "type": "string", + "description": "Key值。", + "minLength": 1, + "maxLength": 128 }, - "path" : { - "type" : "string", - "description" : "磁盘挂载路径。仅在用户配置中生效。支持包含:数字、大小写字母、点、中划线、下划线的绝对路径。" + "value": { + "type": "string", + "description": "Value值。", + "maxLength": 255 } }, - "type" : "object" + "description": "CCE资源标签", + "type": "object" }, - "NicSpec" : { - "properties" : { - "subnetId" : { - "type" : "string", - "description" : "网卡所在子网的网络ID。主网卡创建时若未指定subnetId,将使用集群子网。若节点池同时配置了subnetList,则节点池扩容子网以subnetList字段为准。扩展网卡创建时必须指定subnetId。", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$", - "example" : "ca964acf-8468-4735-8229-97940ef6c881" - }, - "fixedIps" : { - "type" : "array", - "description" : "主网卡的IP将通过fixedIps指定,数量不得大于创建的节点数。fixedIps或ipBlock同时只能指定一个。扩展网卡不支持指定fiexdIps。", - "items" : { - "type" : "string", - "description" : "" - } - }, - "ipBlock" : { - "type" : "string", - "description" : "主网卡的IP段的CIDR格式,创建的节点IP将属于该IP段内。fixedIps或ipBlock同时只能指定一个。" - }, - "subnetList" : { - "type" : "array", - "description" : "网卡所在子网的网络ID列表,支持节点池配置多个子网,最多支持配置20个子网。", - "items" : { - "type" : "string", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - }, - "example" : [ "7e767d10-7548-4df5-ad72-aeac1d08bd8a" ] + "ServiceNetwork": { + "properties": { + "IPv4CIDR": { + "type": "string", + "description": "kubernetes clusterIP IPv4 CIDR取值范围。创建集群时若未传参,默认为\"10.247.0.0/16\"。" } }, - "description" : "主网卡的描述信息。", - "type" : "object" + "type": "object" }, - "NodeMetadata" : { - "properties" : { - "name" : { - "type" : "string", - "description" : "节点名称", - "minLength" : 1, - "maxLength" : 56 - }, - "uid" : { - "type" : "string", - "description" : "节点ID,资源唯一标识,创建成功后自动生成,填写无效", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - }, - "labels" : { - "type" : "object", - "description" : "CCE自有节点标签,非Kubernetes原生labels。", - "additionalProperties" : { - "type" : "string", - "description" : "" - } - }, - "annotations" : { - "type" : "object", - "description" : "CCE自有节点注解,非Kubernetes原生annotations,格式为key/value键值对。", - "additionalProperties" : { - "type" : "string", - "description" : "" - } - }, - "creationTimestamp" : { - "type" : "string", - "description" : "创建时间,创建成功后自动生成,填写无效" - }, - "updateTimestamp" : { - "type" : "string", - "description" : "更新时间,创建成功后自动生成,填写无效" - }, - "ownerReference" : { - "description" : "节点的属主对象信息", - "$ref" : "#/components/schemas/NodeOwnerReference" - } - }, - "description" : "", - "type" : "object" - }, - "UserPassword" : { - "required" : [ "password" ], - "properties" : { - "username" : { - "type" : "string", - "description" : "登录帐号,默认为“root”", - "default" : "root" - }, - "password" : { - "type" : "string", - "description" : "登录密码,若创建节点通过用户名密码方式,即使用该字段,则响应体中该字段作屏蔽展示。" - } - }, - "type" : "object" - }, - "NodeSpec" : { - "required" : [ "flavor", "az", "login", "rootVolume", "dataVolumes" ], - "properties" : { - "flavor" : { - "type" : "string", - "description" : "节点的规格,CCE支持的节点规格请参考[节点规格说明](https://support.huaweicloud.com/api-cce/cce_02_0368.html)获取。", - "minLength" : 1, - "maxLength" : 50, - "pattern" : "^[A-Za-z0-9-_.]+$" - }, - "az" : { - "type" : "string", - "description" : "待创建节点所在的可用区,需要指定可用区(AZ)的名称,不填或者填random选择随机可用区。", - "maxLength" : 200 - }, - "os" : { - "type" : "string", - "description" : "节点的操作系统类型。具体支持的操作系统请参见[节点操作系统说明](https://support.huaweicloud.com/api-cce/node-os.html)。" - }, - "login" : { - "description" : "节点的登录方式。密钥对和密码登录方式二者必选其一。", - "$ref" : "#/components/schemas/Login" - }, - "rootVolume" : { - "description" : "节点的磁盘信息", - "$ref" : "#/components/schemas/Volume" - }, - "dataVolumes" : { - "type" : "array", - "description" : "节点的数据盘参数(目前已支持通过控制台为CCE节点添加第二块数据盘)。", - "items" : { - "$ref" : "#/components/schemas/Volume" - } - }, - "storage" : { - "$ref" : "#/components/schemas/Storage" - }, - "publicIP" : { - "description" : "节点的弹性公网IP", - "$ref" : "#/components/schemas/NodePublicIP" - }, - "nodeNicSpec" : { - "description" : "节点的网卡信息", - "$ref" : "#/components/schemas/NodeNicSpec" - }, - "count" : { - "type" : "integer", - "format" : "int32", - "description" : "批量创建时节点的个数,必须为大于等于1,小于等于最大限额的正整数。作用于节点池时该项可以不填写。" - }, - "billingMode" : { - "type" : "integer", - "format" : "int32", - "description" : "节点的计费模式:" - }, - "taints" : { - "type" : "array", - "description" : "支持给创建出来的节点加Taints来设置反亲和性,taints配置不超过20条。每条Taints包含以下3个参数:", - "items" : { - "$ref" : "#/components/schemas/Taint" - }, - "maxItems" : 20 + "ClusterOps": { + "type": "object", + "description": "**参数解释:**", + "properties": { + "alarm": { + "type": "object", + "description": "**参数解释:**", + "$ref": "#/components/schemas/AlarmInfo" + } + }, + "required": [ + "alarm" + ] + }, + "PackageConfiguration": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "组件名称" }, - "k8sTags" : { - "type" : "object", - "description" : "格式为key/value键值对。键值对个数不超过20条。", - "additionalProperties" : { - "type" : "string", - "maxLength" : 63 + "configurations": { + "type": "array", + "description": "组件配置项", + "items": { + "$ref": "#/components/schemas/ConfigurationItem" } + } + } + }, + "ClusterStatus": { + "properties": { + "phase": { + "type": "string", + "description": "集群状态,取值如下" }, - "ecsGroupId" : { - "type" : "string", - "description" : "云服务器组ID,若指定,将节点创建在该云服务器组下", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + "jobID": { + "type": "string", + "description": "任务ID,集群当前状态关联的任务ID。当前支持:" }, - "dedicatedHostId" : { - "type" : "string", - "description" : "指定DeH主机的ID,将节点调度到自己的DeH上。" + "reason": { + "type": "string", + "description": "集群变为当前状态的原因,在集群在非“Available”状态下时,会返回此参数。" }, - "userTags" : { - "type" : "array", - "description" : "云服务器标签,键必须唯一,CCE支持的最大用户自定义标签数量依region而定,自定义标签数上限为8个。", - "items" : { - "$ref" : "#/components/schemas/UserTag" + "message": { + "type": "string", + "description": "集群变为当前状态的原因的详细信息,在集群在非“Available”状态下时,会返回此参数。" + }, + "endpoints": { + "description": "集群中 kube-apiserver 的访问地址。", + "type": "array", + "items": { + "$ref": "#/components/schemas/ClusterEndpoints" } }, - "runtime" : { - "$ref" : "#/components/schemas/Runtime", - "description" : "容器运行时, 默认场景:" + "isLocked": { + "type": "boolean", + "description": "CBC资源锁定" }, - "initializedConditions" : { - "type" : "array", - "description" : "自定义初始化标记。", - "maxItems" : 2, - "items" : { - "pattern" : "^[A-Za-z0-9]+$", - "minLength" : 1, - "maxLength" : 20, - "type" : "string" - } + "lockScene": { + "type": "string", + "description": "CBC资源锁定场景" }, - "extendParam" : { - "$ref" : "#/components/schemas/NodeExtendParam", - "description" : "创建节点时的扩展参数。" + "lockSource": { + "type": "string", + "description": "锁定资源" }, - "hostnameConfig" : { - "$ref" : "#/components/schemas/HostnameConfig", - "description" : "K8S节点名称配置参数,支持的集群版本为v1.23.6-r0到v1.25或者v1.25.2-r0及以上。" + "lockSourceId": { + "type": "string", + "description": "锁定的资源ID" }, - "serverEnterpriseProjectID" : { - "type" : "string", - "description" : "服务器企业项目ID。CCE服务不实现EPS相关特性,该字段仅用于同步服务器企业项目ID。" + "deleteOption": { + "type": "object", + "description": "删除配置状态(仅删除请求响应包含)" }, - "partition" : { - "type" : "string", - "description" : "**参数解释**:" + "deleteStatus": { + "type": "object", + "description": "删除状态信息(仅删除请求响应包含)" } }, - "type" : "object" + "description": "", + "type": "object" }, - "UpgradeNodepoolJobResult" : { - "required" : [ "jobid" ], - "properties" : { - "jobid" : { - "type" : "string", - "format" : "uuid", - "example" : "7b9a1695-ab29-11ef-a522-0255ac101231", - "description" : "Job ID returned after the job is delivered. The job ID can be used to query the job execution status." + "NetworkSubnet": { + "required": [ + "subnetID" + ], + "properties": { + "subnetID": { + "type": "string", + "description": "用于创建控制节点的subnet的IPv4子网ID(暂不支持IPv6)。获取方法如下:", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" } }, - "description" : "Return body of the job to upgrade a nodepool.", - "type" : "object" + "description": "ENI网络配置,创建集群指定subnets字段使用时必填。", + "type": "object" }, - "UpgradeNodePool" : { - "required" : [ "spec" ], - "properties" : { - "kind" : { - "type" : "string", - "description" : "API类型,固定值“NodePool”。", - "default" : "NodePool" + "ConfigurationItem": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "组件配置项名称" }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”。", - "default" : "v3" - }, - "metadata" : { - "description" : "节点池的元数据信息", - "$ref" : "#/components/schemas/NodePoolMetadata" - }, - "spec" : { - "description" : "节点池的规格描述", - "$ref" : "#/components/schemas/NodePoolUpgradeSpec" + "value": { + "type": "object", + "description": "组件配置项值", + "properties": {} + } + } + }, + "ContainerNetwork": { + "required": [ + "mode" + ], + "properties": { + "mode": { + "type": "string", + "description": "容器网络类型(只可选择其一)", + "minLength": 0, + "maxLength": 64, + "enum": [ + "overlay_l2", + "vpc-router", + "eni" + ] + }, + "cidr": { + "type": "string", + "description": "容器网络网段,建议使用网段10.0.0.0/12~19,172.16.0.0/16~19,192.168.0.0/16~19,如存在网段冲突,将会报错。", + "minLength": 0, + "maxLength": 64 + }, + "cidrs": { + "type": "array", + "description": "容器网络网段列表。1.21及新版本集群使用cidrs字段,当集群网络类型为vpc-router类型时,支持多个容器网段,最多配置20个;1.21之前版本若使用cidrs字段,则取值cidrs数组中的第一个cidr元素作为容器网络网段地址。", + "items": { + "description": "容器网络网段", + "$ref": "#/components/schemas/ContainerCIDR" + }, + "maxItems": 20 + } + }, + "description": "Container network parameters.", + "type": "object" + }, + "Cluster": { + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ], + "properties": { + "kind": { + "type": "string", + "description": "API类型,固定值“Cluster”或“cluster”,该值不可修改。", + "default": "Cluster" + }, + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”,该值不可修改。", + "default": "v3" + }, + "metadata": { + "description": "集群的基本信息,为集合类的元素类型,包含一组由不同名称定义的属性。", + "$ref": "#/components/schemas/ClusterMetadata" + }, + "spec": { + "description": "spec是集合类的元素类型,您对需要管理的集群对象进行详细描述的主体部分都在spec中给出。CCE通过spec的描述来创建或更新对象。", + "$ref": "#/components/schemas/ClusterSpec" + }, + "status": { + "description": "集合类的元素类型,用于记录对象在系统中的当前状态信息,包含了集群状态和本次创建集群作业的jobID", + "$ref": "#/components/schemas/ClusterStatus" + } + }, + "description": "", + "type": "object" + }, + "ClusterList": { + "required": [ + "apiVersion", + "items", + "kind" + ], + "properties": { + "kind": { + "type": "string", + "description": "Api type", + "minLength": 6, + "maxLength": 10, + "default": "Cluster" + }, + "apiVersion": { + "type": "string", + "description": "API version", + "minLength": 2, + "maxLength": 5, + "default": "v3" + }, + "items": { + "type": "array", + "description": "集群对象列表,包含了当前项目下所有集群的详细信息。您可通过items.metadata.name下的值来找到对应的集群。", + "items": { + "description": "", + "$ref": "#/components/schemas/Cluster" + } + } + }, + "description": "", + "type": "object" + }, + "ClusterEndpoints": { + "properties": { + "url": { + "type": "string", + "description": "集群中 kube-apiserver 的访问地址" + }, + "type": { + "type": "string", + "description": "集群访问地址的类型" + } + }, + "type": "object" + }, + "EncryptionConfig": { + "properties": { + "mode": { + "type": "string", + "description": "**参数解释**:", + "enum": [ + "Default", + "KMS" + ], + "example": "KMS" + }, + "kmsKeyID": { + "type": "string", + "description": "**参数解释**:", + "example": "c8e90454-62ed-4588-b1c1-bbb6d405fb71" + } + }, + "type": "object" + }, + "CustomSan": { + "type": "object", + "description": "集群的API Server服务端证书中的自定义SAN(Subject Alternative Name)字段,遵从SSL标准X509定义的格式规范。", + "items": { + "type": "string", + "description": "", + "maxLength": 255, + "minLength": 0 + }, + "maxItems": 128, + "minItems": 0 + }, + "AuthenticatingProxy": { + "properties": { + "ca": { + "type": "string", + "description": "authenticating_proxy模式配置的x509格式CA证书(base64编码)。当集群认证模式为authenticating_proxy时,此项必须填写。" + }, + "cert": { + "type": "string", + "description": "authenticating_proxy模式配置的x509格式CA证书签发的客户端证书,用于kube-apiserver到扩展apiserver的认证。(base64编码)。当集群认证模式为authenticating_proxy时,此项必须填写。" + }, + "privateKey": { + "type": "string", + "description": "authenticating_proxy模式配置的x509格式CA证书签发的客户端证书时对应的私钥,用于kube-apiserver到扩展apiserver的认证。Kubernetes集群使用的私钥尚不支持密码加密,请使用未加密的私钥。(base64编码)。当集群认证模式为authenticating_proxy时,此项必须填写。" + } + }, + "description": "authenticatingProxy模式相关配置。认证模式为authenticating_proxy时必选", + "type": "object" + }, + "HostNetwork": { + "required": [ + "subnet", + "vpc" + ], + "properties": { + "vpc": { + "type": "string", + "description": "用于创建控制节点的VPC的ID。", + "minLength": 0, + "maxLength": 64 + }, + "subnet": { + "type": "string", + "description": "用于创建控制节点的subnet的网络ID。获取方法如下:", + "minLength": 0, + "maxLength": 64 + }, + "SecurityGroup": { + "type": "string", + "description": "集群默认的Node节点安全组ID,不指定该字段系统将自动为用户创建默认Node节点安全组,指定该字段时集群将绑定指定的安全组。Node节点安全组需要放通部分端口来保证正常通信。详细设置请参考[集群安全组规则配置](https://support.huaweicloud.com/cce_faq/cce_faq_00265.html)。" + } + }, + "description": "Node network parameters.", + "type": "object" + }, + "ClusterMetadata": { + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "集群名称。", + "minLength": 4, + "maxLength": 128 + }, + "uid": { + "type": "string", + "description": "集群ID,资源唯一标识,创建成功后自动生成,填写无效。在创建包周期集群时,响应体不返回集群ID。", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + }, + "alias": { + "type": "string", + "description": "集群显示名,用于在 CCE 界面显示,该名称创建后可修改。", + "minLength": 4, + "maxLength": 128 + }, + "annotations": { + "type": "object", + "description": "集群注解,由key/value组成:", + "additionalProperties": { + "type": "string", + "description": "" + } + }, + "labels": { + "type": "object", + "description": "集群标签,key/value对格式。", + "additionalProperties": { + "type": "string", + "description": "" + } + }, + "creationTimestamp": { + "type": "string", + "description": "集群创建时间" + }, + "updateTimestamp": { + "type": "string", + "description": "集群更新时间" + } + }, + "description": "可以通过 annotations[\"cluster.install.addons/install\"] 来指定创建集群时需要安装的插件,格式形如", + "type": "object" + }, + "ContainerCIDR": { + "required": [ + "cidr" + ], + "properties": { + "cidr": { + "type": "string", + "description": "容器网络网段,建议使用网段10.0.0.0/12~19,172.16.0.0/16~19,192.168.0.0/16~19。" + } + }, + "description": "容器网络网段,指定cidrs字段使用时必填。", + "type": "object" + }, + "Authentication": { + "properties": { + "mode": { + "type": "string", + "description": "集群认证模式。" + }, + "authenticatingProxy": { + "description": "authenticatingProxy模式相关配置。认证模式为authenticating_proxy时必选。", + "$ref": "#/components/schemas/AuthenticatingProxy" + } + }, + "description": "", + "type": "object" + }, + "LockNodeScaledownRequestBody": { + "required": [ + "apiVersion", + "kind" + ], + "properties": { + "apiVersion": { + "type": "string", + "description": "**参数解释**:" + }, + "kind": { + "type": "string", + "description": "**参数解释**:" + }, + "nodeList": { + "type": "array", + "description": "**参数解释**:", + "items": { + "type": "string" + }, + "minItems": 0, + "maxItems": 50 } }, - "description" : "", - "type" : "object" + "type": "object" }, - "NodeTemplate" : { - "properties" : { - "os" : { - "type" : "string" - }, - "imageID" : { - "type" : "string" + "PartitionList": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "example": "List", + "description": "资源类型" + }, + "apiVersion": { + "type": "string", + "example": "v3", + "description": "API版本" }, - "login" : { - "properties" : { - "sshKey" : { - "type" : "string" + "items": { + "items": { + "$ref": "#/components/schemas/Partition" + }, + "type": "array" + } + } + }, + "Partition": { + "type": "object", + "description": "集群分区信息", + "properties": { + "kind": { + "type": "string", + "example": "Partition", + "description": "资源类型" + }, + "apiVersion": { + "type": "string", + "example": "v3", + "description": "API版本" + }, + "metadata": { + "description": "分区的元数据信息", + "properties": { + "name": { + "type": "string", + "example": "partitionName", + "description": "分区名称" }, - "userPassword" : { - "properties" : { - "username" : { - "type" : "string" - }, - "password" : { - "type" : "string" + "creationTimestamp": { + "type": "string", + "example": "2000-1-1 00:00:35.451967 +0000 UTC", + "description": "创建时间" + } + } + }, + "spec": { + "description": "分区的配置信息", + "properties": { + "hostNetwork": { + "description": "分区子网", + "properties": { + "subnetID": { + "type": "string", + "example": "subnetID", + "description": "子网ID" } } - } - } - }, - "lifeCycle" : { - "properties" : { - "preInstall" : { - "type" : "string" }, - "postInstall" : { - "type" : "string" - } - } - }, - "runtimeConfig" : { - "properties" : { - "runtime" : { - "properties" : { - "name" : { - "type" : "string" + "containerNetwork": { + "items": { + "properties": { + "subnetID": { + "type": "string", + "example": "subnetID", + "description": "子网ID" + } } - } - } - } - }, - "extendParam" : { - "properties" : { - "userID" : { - "type" : "string" + }, + "description": "分区容器子网", + "type": "array" + }, + "publicBorderGroup": { + "type": "string", + "example": "publicBorderGroup", + "description": "群组" + }, + "category": { + "type": "string", + "example": "category", + "description": "类别" } } } - }, - "type" : "object" + } }, - "NodePoolUpgradeSpec" : { - "required" : [ "nodePoolID" ], - "properties" : { - "nodePoolID" : { - "type" : "string", - "description" : "节点池id。" + "resourceSelector": { + "description": "资源标签选择器,匹配Kubernetes中node资源", + "required": [ + "key", + "operator" + ], + "properties": { + "key": { + "type": "string", + "description": "标签键值,取值如下", + "enum": [ + "node.uid" + ] }, - "nodeIDs" : { - "type" : "array", - "items" : { - "type" : "string", - "description" : "节点id。" + "values": { + "type": "array", + "description": "标签值列表", + "items": { + "type": "string", + "description": "标签值" } }, - "force" : { - "type" : "boolean", - "description" : "Pod无法驱逐时,是否强制重置。" - }, - "nodeTemplate" : { - "$ref" : "#/components/schemas/NodeTemplate" - }, - "maxUnavailable" : { - "type" : "integer" - }, - "retryTimes" : { - "type" : "integer" - }, - "skippedNodes" : { - "type" : "array", - "items" : { - "type" : "string" - } + "operator": { + "type": "string", + "description": "标签逻辑运算符,当前支持如下取值", + "enum": [ + "In" + ] } }, - "type" : "object" + "type": "object" }, - "NodePoolMetadata" : { - "required" : [ "name" ], - "properties" : { - "name" : { - "type" : "string", - "description" : "节点名池名称。", - "minLength" : 1, - "maxLength" : 50 + "addonCheckStatus": { + "description": "插件限制检查状态", + "properties": { + "phase": { + "description": "状态,取值如下", + "type": "string" }, - "uid" : { - "type" : "string", - "description" : "节点池的uid。创建成功后自动生成,填写无效", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - }, - "annotations" : { - "type" : "object", - "description" : "节点池的注解,以key value对表示。仅用于查询,不支持请求时传入,填写无效。", - "additionalProperties" : { - "type" : "string" + "itemsStatus": { + "type": "array", + "description": "检查项状态集合", + "items": { + "$ref": "#/components/schemas/PreCheckItemStatus" } + } + }, + "type": "object" + }, + "addonRisks": { + "description": "节点风险来源", + "properties": { + "addonTemplateName": { + "type": "string", + "description": "插件模板名称" }, - "updateTimestamp" : { - "type" : "string", - "description" : "更新时间" - }, - "creationTimestamp" : { - "type" : "string", - "description" : "创建时间" + "alias": { + "type": "string", + "description": "插件别名" } }, - "description" : "", - "type" : "object" + "type": "object" }, - "NodeManagement" : { - "properties" : { - "serverGroupReference" : { - "type" : "string", - "description" : "**参数解释**:" + "skippedCheckItemList": { + "properties": { + "name": { + "type": "string", + "description": "跳过的检查项名称" + }, + "resourceSelector": { + "description": "资源标签选择器,仅节点检查涉及该参数,集群检查和插件检查不涉及。", + "$ref": "#/components/schemas/resourceSelector" } }, - "type" : "object" + "type": "object" }, - "CapacityReservationSpecification" : { - "description" : "扩展伸缩组容量预留配置", - "properties" : { - "id" : { - "type" : "string", - "description" : "私有池id,preference为none时忽略该值" + "PrecheckTaskMetadata": { + "description": "升级前检查任务元数据", + "properties": { + "uid": { + "type": "string", + "description": "任务ID" }, - "preference" : { - "type" : "string", - "description" : "私有池容量选项,为 none 时表示不指定容量预留,为 targeted 时表示指定容量预留,此时 id 不能为空", - "default" : "none" + "creationTimestamp": { + "type": "string", + "description": "任务创建时间" + }, + "updateTimestamp": { + "type": "string", + "description": "任务更新时间" + } + }, + "type": "object" + }, + "nodeRisks": { + "description": "节点风险来源", + "properties": { + "NodeID": { + "type": "string", + "description": "用户节点ID" } }, - "type" : "object" + "type": "object" }, - "ExtensionScaleGroup" : { - "description" : "节点池扩展伸缩组配置", - "properties" : { - "metadata" : { - "description" : "扩容伸缩组的基本信息", - "$ref" : "#/components/schemas/ExtensionScaleGroupMetadata" + "clusterCheckStatus": { + "description": "集群限制检查状态", + "properties": { + "phase": { + "description": "状态,取值如下", + "type": "string" }, - "spec" : { - "description" : "扩展伸缩组配置,承载区别于默认伸缩组的差异化配置", - "$ref" : "#/components/schemas/ExtensionScaleGroupSpec" + "itemsStatus": { + "type": "array", + "description": "检查项状态集合", + "items": { + "$ref": "#/components/schemas/PreCheckItemStatus" + } } }, - "type" : "object" + "type": "object" }, - "SecurityID" : { - "properties" : { - "id" : { - "type" : "string", - "description" : "安全组ID。" + "NodeInfo": { + "description": "节点检查状态", + "properties": { + "uid": { + "description": "节点UID", + "type": "string" + }, + "name": { + "description": "节点名称", + "type": "string" + }, + "status": { + "description": "状态", + "type": "string" + }, + "nodeType": { + "description": "节点类型", + "type": "string" } }, - "type" : "object" + "type": "object" }, - "NodePoolSpec" : { - "required" : [ "nodeTemplate" ], - "properties" : { - "type" : { - "type" : "string", - "description" : "节点池类型。不填写时默认为vm。", - "enum" : [ "vm", "ElasticBMS", "pm" ] + "PrecheckStatus": { + "description": "升级前检查状态", + "properties": { + "phase": { + "description": "状态,取值如下", + "type": "string" }, - "nodeTemplate" : { - "description" : "节点池模板详细参数。", - "$ref" : "#/components/schemas/NodeSpec" + "expireTimeStamp": { + "description": "检查结果过期时间", + "type": "string" }, - "initialNodeCount" : { - "type" : "integer", - "format" : "int32", - "description" : "节点池初始化节点个数。查询时为节点池目标节点数量。" + "message": { + "description": "信息,一般是执行错误的日志信息", + "type": "string" }, - "autoscaling" : { - "description" : "弹性伸缩参数。", - "$ref" : "#/components/schemas/NodePoolNodeAutoscaling" + "clusterCheckStatus": { + "description": "集群限制检查状态", + "$ref": "#/components/schemas/clusterCheckStatus" }, - "nodeManagement" : { - "description" : "节点管理相关配置", - "$ref" : "#/components/schemas/NodeManagement" + "addonCheckStatus": { + "description": "插件检查状态", + "$ref": "#/components/schemas/addonCheckStatus" }, - "podSecurityGroups" : { - "description" : "安全组相关配置, 仅turbo集群支持配置该参数。", - "$ref" : "#/components/schemas/PodSecurityGroups" + "nodeCheckStatus": { + "description": "节点检查状态", + "$ref": "#/components/schemas/nodeCheckStatus" + } + }, + "type": "object" + }, + "NodeStageStatus": { + "description": "节点检查状态", + "properties": { + "nodeInfo": { + "description": "节点信息", + "$ref": "#/components/schemas/NodeInfo", + "type": "string" }, - "extensionScaleGroups" : { - "description" : "节点池扩展伸缩组配置列表,详情参见ExtensionScaleGroup类型定义", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExtensionScaleGroup" + "itemsStatus": { + "type": "array", + "description": "检查项状态集合", + "items": { + "$ref": "#/components/schemas/PreCheckItemStatus" } - }, - "customSecurityGroups" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "节点池自定义安全组相关配置。支持节点池新扩容节点绑定指定的安全组。" - } - }, - "description" : "", - "type" : "object" - }, - "ScaleGroupStatus" : { - "description" : "伸缩组当前详细状态信息", - "properties" : { - "name" : { - "type" : "string", - "description" : "伸缩组名称" - }, - "uid" : { - "type" : "string", - "description" : "伸缩组uuid" - }, - "creationTimestamp" : { - "type" : "string", - "description" : "伸缩组创建时间" - }, - "updateTimestamp" : { - "type" : "string", - "description" : "伸缩组更新时间" - }, - "phase" : { - "type" : "string", - "description" : "伸缩组状态。", - "enum" : [ "Synchronizing", "Synchronized", "SoldOut", "Deleting", "Error" ] - }, - "desiredNodeCount" : { - "type" : "integer", - "format" : "int32", - "description" : "伸缩组期望节点数" - }, - "unpaidScaleNodeCount" : { - "type" : "integer", - "format" : "int32", - "description" : "订单未支付节点个数" - }, - "existingNodeCount" : { - "type" : "object", - "description" : "伸缩组存量节点统计信息", - "properties" : { - "postPaid" : { - "type" : "integer", - "format" : "int32", - "description" : "按需计费节点个数" - }, - "prePaid" : { - "type" : "integer", - "format" : "int32", - "description" : "包年包月节点个数" - }, - "total" : { - "type" : "integer", - "format" : "int32", - "description" : "按需计费和包年包月节点总数" - } + } + }, + "type": "object" + }, + "riskSource": { + "description": "风险项来源", + "properties": { + "configurationRisks": { + "type": "array", + "description": "配置风险项", + "items": { + "$ref": "#/components/schemas/configurationRisks" } }, - "upcomingNodeCount" : { - "type" : "object", - "description" : "伸缩组将要创建的节点统计信息", - "properties" : { - "postPaid" : { - "type" : "integer", - "format" : "int32", - "description" : "按需计费节点个数" - }, - "prePaid" : { - "type" : "integer", - "format" : "int32", - "description" : "包年包月节点个数" - }, - "total" : { - "type" : "integer", - "format" : "int32", - "description" : "按需计费和包年包月节点总数" - } + "deprecatedAPIRisks": { + "type": "array", + "description": "废弃API风险", + "items": { + "$ref": "#/components/schemas/deprecatedAPIRisks" } }, - "scaleDownDisabledNodeCount" : { - "type" : "integer", - "format" : "int32", - "description" : "伸缩组禁止缩容的节点数" + "nodeRisks": { + "type": "array", + "description": "节点风险", + "items": { + "$ref": "#/components/schemas/nodeRisks" + } }, - "conditions" : { - "description" : "伸缩组当前详细状态列表,详情参见Condition类型定义。", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/NodePoolCondition" + "addonRisks": { + "type": "array", + "description": "插件风险", + "items": { + "$ref": "#/components/schemas/addonRisks" } } }, - "type" : "object" - }, - "PodSecurityGroups" : { - "type" : "object", - "items" : { - "description" : "安全组信息,仅turbo集群支持配置该参数。", - "$ref" : "#/components/schemas/SecurityID" - }, - "maxItems" : 5, - "description" : "1.21版本集群节点池支持绑定安全组,最多五个。" + "type": "object" }, - "NodePoolCondition" : { - "description" : "节点池详细状态。", - "properties" : { - "type" : { - "type" : "string", - "description" : "Condition类型,当前支持类型如下" - }, - "status" : { - "type" : "string", - "description" : "Condition当前状态,取值如下" + "PrecheckClusterTask": { + "properties": { + "apiVersion": { + "type": "string", + "description": "api版本,默认为v3" }, - "lastProbeTime" : { - "type" : "string", - "description" : "上次状态检查时间。" + "kind": { + "type": "string", + "description": "资源类型,默认为PreCheckTask" }, - "lastTransitTime" : { - "type" : "string", - "description" : "上次状态变更时间。" + "metadata": { + "description": "升级前检查任务元数据信息", + "$ref": "#/components/schemas/PrecheckTaskMetadata" }, - "reason" : { - "type" : "string", - "description" : "上次状态变更原因。" + "spec": { + "description": "升级前检查任务信息", + "$ref": "#/components/schemas/PrecheckSpec" }, - "message" : { - "type" : "string", - "description" : "Condition详细描述。" + "status": { + "description": "升级前检查任务状态", + "$ref": "#/components/schemas/PrecheckStatus" } }, - "type" : "object" + "type": "object" }, - "NodePool" : { - "required" : [ "kind", "apiVersion", "metadata", "spec" ], - "properties" : { - "kind" : { - "type" : "string", - "description" : "API类型,固定值“NodePool”。", - "default" : "NodePool" + "PreCheckItemStatus": { + "description": "检查项状态信息", + "properties": { + "name": { + "type": "string", + "description": "检查项名称" + }, + "kind": { + "type": "string", + "description": "检查项类型,取值如下" + }, + "group": { + "type": "string", + "description": "检查项分组,取值如下" }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”。", - "default" : "v3" + "level": { + "type": "string", + "description": "检查项风险级别,取值如下" }, - "metadata" : { - "description" : "节点池的元数据信息", - "$ref" : "#/components/schemas/NodePoolMetadata" + "phase": { + "description": "状态,取值如下", + "type": "string" }, - "spec" : { - "description" : "节点池的规格描述", - "$ref" : "#/components/schemas/NodePoolSpec" + "message": { + "type": "string", + "description": "提示信息" }, - "status" : { - "description" : "节点池状态", - "$ref" : "#/components/schemas/NodePoolStatus" + "riskSource": { + "description": "风险项", + "$ref": "#/components/schemas/riskSource" + }, + "errorCodes": { + "type": "array", + "description": "错误码集合", + "items": { + "type": "string", + "description": "错误码" + } } }, - "description" : "", - "type" : "object" + "type": "object" }, - "ExtensionScaleGroupMetadata" : { - "description" : "扩容伸缩组的基本信息", - "properties" : { - "uid" : { - "type" : "string", - "description" : "扩展伸缩组的uuid,由系统自动生成" + "deprecatedAPIRisks": { + "description": "废弃API风险来源", + "properties": { + "url": { + "type": "string", + "description": "请求路径,如/apis/policy/v1beta1/podsecuritypolicies" }, - "name" : { - "type" : "string", - "description" : "扩展伸缩组的名称,不能为 **default**,长度不能超过55个字符,只能包含数字和小写字母以及**-**" + "userAgent": { + "type": "string", + "description": "客户端信息" } }, - "type" : "object" + "type": "object" }, - "CreateNodePoolResp" : { - "required" : [ "kind", "apiVersion", "metadata", "spec" ], - "properties" : { - "kind" : { - "type" : "string", - "description" : "API类型,固定值“NodePool”。", - "default" : "NodePool" + "PrecheckClusterTaskListResponseBody": { + "properties": { + "apiVersion": { + "type": "string", + "description": "api版本,默认为v3" }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”。", - "default" : "v3" + "kind": { + "type": "string", + "description": "类型" }, - "metadata" : { - "description" : "节点池的元数据信息", - "$ref" : "#/components/schemas/NodePoolMetadata" + "metadata": { + "description": "基本信息,为集合类的元素类型,包含一组由不同名称定义的属性", + "$ref": "#/components/schemas/Metadata" }, - "spec" : { - "description" : "节点池的规格描述", - "$ref" : "#/components/schemas/NodePoolSpec" - }, - "status" : { - "description" : "节点池状态", - "$ref" : "#/components/schemas/CreateNodePoolStatus" + "items": { + "type": "array", + "description": "集群检查任务列表", + "items": { + "$ref": "#/components/schemas/PrecheckClusterTask" + } } }, - "description" : "", - "type" : "object" + "type": "object" }, - "NodePoolStatus" : { - "properties" : { - "currentNode" : { - "type" : "integer", - "format" : "int32", - "description" : "当前节点池中所有节点数量(不含删除中的节点)。" + "PrecheckSpec": { + "properties": { + "clusterID": { + "type": "string", + "description": "集群ID" }, - "creatingNode" : { - "type" : "integer", - "format" : "int32", - "description" : "当前节点池中处于创建流程中的节点数量。" + "clusterVersion": { + "type": "string", + "description": "集群版本" }, - "deletingNode" : { - "type" : "integer", - "format" : "int32", - "description" : "当前节点池中删除中的节点数量。" + "targetVersion": { + "type": "string", + "description": "升级目标版本" }, - "phase" : { - "type" : "string", - "description" : "节点池状态。", - "enum" : [ "Synchronizing", "Synchronized", "SoldOut", "Deleting", "Error" ] - }, - "jobId" : { - "type" : "string", - "description" : "对节点池执行操作时的 JobID。" - }, - "conditions" : { - "description" : "节点池当前详细状态列表,详情参见Condition类型定义。", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/NodePoolCondition", - "description" : "节点池详细状态。" - } - }, - "scaleGroupStatuses" : { - "description" : "伸缩组当前详细状态信息,详情参见ScaleGroupStatus类型定义", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ScaleGroupStatus" - } - } - }, - "description" : "", - "type" : "object" - }, - "ScaleGroupAutoscaling" : { - "description" : "扩展伸缩组弹性伸缩配置", - "properties" : { - "enable" : { - "type" : "boolean", - "description" : "伸缩组弹性扩缩容启用开关,默认不开启", - "default" : false - }, - "extensionPriority" : { - "type" : "integer", - "description" : "伸缩组优先级,未设置则默认为0,数值越大优先级越高", - "default" : 0 - }, - "minNodeCount" : { - "type" : "integer", - "description" : "弹性伸缩时,伸缩组最少应保持的节点数量,必须大于0" - }, - "maxNodeCount" : { - "type" : "integer", - "description" : "弹性伸缩时,伸缩组最多可保持的节点数量,应大于等于 **minNodeCount**, 不可大于集群规格所允许的节点上限,不可大于节点池节点数量上限" - } - }, - "type" : "object" - }, - "ExtensionScaleGroupSpec" : { - "description" : "扩展伸缩组配置,承载区别于默认伸缩组的差异化配置", - "properties" : { - "flavor" : { - "type" : "string", - "description" : "节点规格" - }, - "az" : { - "type" : "string", - "description" : "节点可用区,未指定或者为空则以默认伸缩组中配置为准" - }, - "capacityReservationSpecification" : { - "description" : "扩展伸缩组容量预留配置", - "$ref" : "#/components/schemas/CapacityReservationSpecification" - }, - "autoscaling" : { - "description" : "扩展伸缩组弹性伸缩配置", - "$ref" : "#/components/schemas/ScaleGroupAutoscaling" - } - }, - "type" : "object" - }, - "NodePoolNodeAutoscaling" : { - "properties" : { - "enable" : { - "type" : "boolean", - "description" : "是否开启自动扩缩容", - "default" : false - }, - "minNodeCount" : { - "type" : "integer", - "format" : "int32", - "description" : "若开启自动扩缩容,最小能缩容的节点个数。不可大于集群规格所允许的节点上限", - "minimum" : 0 - }, - "maxNodeCount" : { - "type" : "integer", - "format" : "int32", - "description" : "若开启自动扩缩容,最大能扩容的节点个数,应大于等于 minNodeCount,且不超过集群规格对应的节点数量上限。", - "minimum" : 0 - }, - "scaleDownCooldownTime" : { - "type" : "integer", - "format" : "int32", - "description" : "节点保留时间,单位为分钟,扩容出来的节点在这个时间内不会被缩掉", - "minimum" : 0, - "maximum" : 2147483647 - }, - "priority" : { - "type" : "integer", - "format" : "int32", - "description" : "节点池权重,更高的权重在扩容时拥有更高的优先级" - }, - "scaleDownUnneededTime" : { - "type" : "integer", - "format" : "int32", - "description" : "**参数解释**:", - "minimum" : 0, - "maximum" : 2147483647 - }, - "scaleDownUtilizationThreshold" : { - "type" : "number", - "format" : "float", - "description" : "**参数解释**:", - "minimum" : 0, - "maximum" : 1 - } - }, - "description" : "节点池自动伸缩相关配置", - "type" : "object" - }, - "CreateNodePoolStatus" : { - "properties" : { - "currentNode" : { - "type" : "integer", - "format" : "int32", - "description" : "当前节点池中所有节点数量(不含删除中的节点)。" - }, - "creatingNode" : { - "type" : "integer", - "format" : "int32", - "description" : "当前节点池中处于创建流程中的节点数量。" - }, - "deletingNode" : { - "type" : "integer", - "format" : "int32", - "description" : "当前节点池中删除中的节点数量。" - }, - "phase" : { - "type" : "string", - "description" : "节点池状态。", - "enum" : [ "Synchronizing", "Synchronized", "SoldOut", "Deleting", "Error" ] - }, - "conditions" : { - "description" : "节点池当前详细状态列表,详情参见Condition类型定义。", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/NodePoolCondition", - "description" : "节点池详细状态。" - } - }, - "scaleGroupStatuses" : { - "description" : "伸缩组当前详细状态信息,详情参见ScaleGroupStatus类型定义", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ScaleGroupStatus" - } - } - }, - "description" : "", - "type" : "object" - }, - "ReleaseResp" : { - "properties" : { - "chart_name" : { - "type" : "string", - "description" : "模板名称", - "example" : "magento-mysql" - }, - "chart_public" : { - "type" : "boolean", - "description" : "是否公开模板", - "example" : false - }, - "chart_version" : { - "type" : "string", - "description" : "模板版本", - "example" : "1.0.0" - }, - "cluster_id" : { - "type" : "string", - "description" : "集群ID", - "example" : "a870253f-5dc7-11ee-bf71-0255ac100b03" - }, - "cluster_name" : { - "type" : "string", - "description" : "集群名称", - "example" : "sfs-turbo-test" - }, - "create_at" : { - "type" : "string", - "description" : "创建时间", - "example" : "2023-11-14T20:30:57+08:00" - }, - "description" : { - "type" : "string", - "description" : "模板实例描述", - "example" : "Initial install underway" - }, - "name" : { - "type" : "string", - "description" : "模板实例名称", - "example" : "testwww" - }, - "namespace" : { - "type" : "string", - "description" : "模板实例所在的命名空间", - "example" : "monitoring" - }, - "parameters" : { - "type" : "string", - "description" : "模板实例参数", - "example" : "" - }, - "resources" : { - "type" : "string", - "description" : "模板实例需要的资源", - "example" : "" - }, - "status" : { - "type" : "string", - "description" : "模板实例状态", - "example" : "PENDING_INSTALL" - }, - "status_description" : { - "type" : "string", - "description" : "模板实例状态描述", - "example" : "Initial install underway" - }, - "update_at" : { - "type" : "string", - "description" : "更新时间", - "example" : "2023-11-14T20:30:57+08:00" - }, - "values" : { - "type" : "string", - "description" : "模板实例的值", - "example" : "{\"basic\":{\"admin_password\":\"magentorocks1\",\"admin_username\":\"admin\",\"app_name\":\"magento\",\"mysql_database\":\"magento\",\"mysql_name\":\"mysql\",\"mysql_password\":\"magento\",\"mysql_port\":3306,\"mysql_root_password\":\"changeme\",\"mysql_user\":\"magento\",\"storage_class\":\"csi-nas\",\"storage_mode\":\"ReadWriteMany\",\"storage_size\":\"10G\"},\"global\":{\"magento_EIP\":\"100.95.154.255\",\"magento_EPORT\":32080,\"namespace\":\"default\"},\"image\":{\"magento_image\":\"swr.cn-north-7.myhuaweicloud.com/everest/magento:latest\",\"mysql_image\":\"swr.cn-north-7.myhuaweicloud.com/everest/mysql:5.7.14\"}}" - }, - "version" : { - "type" : "integer", - "format" : "int32", - "description" : "模板实例版本", - "example" : 1 - } - }, - "type" : "object" - }, - "SnapshotCluserResponseMetadata" : { - "description" : "备份任务数据", - "properties" : { - "apiVersion" : { - "description" : "API版本,默认为v3.1", - "type" : "string" - }, - "kind" : { - "description" : "任务类型", - "type" : "string" - } - }, - "type" : "object" - }, - "SnapshotClusterResponseBody" : { - "description" : "备份返回体", - "properties" : { - "uid" : { - "type" : "string", - "description" : "任务ID" - }, - "metadata" : { - "description" : "备份任务元数据", - "$ref" : "#/components/schemas/SnapshotCluserResponseMetadata" - } - }, - "type" : "object" - }, - "ChartResp" : { - "properties" : { - "id" : { - "type" : "string", - "description" : "模板ID", - "example" : "1abd3bd6-0258-11ec-b8b0-0255ac100b05" - }, - "name" : { - "type" : "string", - "description" : "模板名称", - "example" : "magento-mysql" - }, - "values" : { - "type" : "string", - "description" : "模板值", - "example" : "{\"basic\":{\"admin_password\":\"magentorocks1\",\"admin_username\":\"admin\",\"app_name\":\"magento\",\"mysql_database\":\"magento\",\"mysql_name\":\"mysql\",\"mysql_password\":\"magento\",\"mysql_port\":3306,\"mysql_root_password\":\"changeme\",\"mysql_user\":\"magento\",\"storage_class\":\"csi-nas\",\"storage_mode\":\"ReadWriteMany\",\"storage_size\":\"10G\"},\"global\":{\"magento_EIP\":\"100.95.154.255\",\"magento_EPORT\":32080,\"namespace\":\"default\"},\"image\":{\"magento_image\":\"swr.cn-north-7.myhuaweicloud.com/everest/magento:latest\",\"mysql_image\":\"swr.cn-north-7.myhuaweicloud.com/everest/mysql:5.7.14\"}}" - }, - "translate" : { - "type" : "string", - "description" : "模板翻译资源", - "example" : "" - }, - "instruction" : { - "type" : "string", - "description" : "模板介绍", - "example" : "" - }, - "version" : { - "type" : "string", - "description" : "模板版本", - "example" : "1.0.0" - }, - "description" : { - "type" : "string", - "description" : "模板描述", - "example" : "chart description" - }, - "source" : { - "type" : "string", - "description" : "模板的来源", - "example" : "" - }, - "icon_url" : { - "type" : "string", - "description" : "模板的图标链接", - "example" : "https://example.com/magento-stack-110x117.png" - }, - "public" : { - "type" : "boolean", - "description" : "是否公开模板", - "example" : false - }, - "chart_url" : { - "type" : "string", - "description" : "模板的链接", - "example" : "magento-mysql-1.0.0.tgz" - }, - "create_at" : { - "type" : "string", - "description" : "创建时间", - "example" : "2021-08-20T08:00:29Z" - }, - "update_at" : { - "type" : "string", - "description" : "更新时间", - "example" : "2021-08-20T08:00:29Z" - } - }, - "description" : "模板返回体", - "type" : "object" - }, - "PackageOptions" : { - "description" : "配置参数结构", - "required" : [ "name", "type", "default", "validAt", "empty", "schema" ], - "properties" : { - "name" : { - "type" : "string", - "description" : "参数名称" - }, - "default" : { - "type" : "object", - "description" : "参数默认值,不指定时按默认值生效, 参数类型以实际返回为准,可能为integer,string或者boolean" - }, - "validAt" : { - "type" : "string", - "description" : "参数生效方式", - "enum" : [ "static", "immediately" ] - }, - "empty" : { - "type" : "boolean", - "description" : "配置项是否可以为空" - }, - "schema" : { - "type" : "string", - "description" : "参数分类" - }, - "type" : { - "type" : "string", - "description" : "参数类型" - } - }, - "type" : "object" - }, - "ClusterConfigDetailRespBody" : { - "type" : "object", - "description" : "获取指定集群配置项列表返回体", - "additionalProperties" : { - "type" : "array", - "description" : "配置参数,由key/value组成。", - "items" : { - "$ref" : "#/components/schemas/PackageOptions" + "skippedCheckItemList": { + "type": "array", + "description": "跳过检查的项目列表", + "items": { + "$ref": "#/components/schemas/skippedCheckItemList" + } } - } + }, + "type": "object" }, - "NodePoolResp" : { - "required" : [ "kind", "apiVersion", "metadata", "spec" ], - "properties" : { - "kind" : { - "type" : "string", - "description" : "API类型,固定值“NodePool”。", - "default" : "NodePool" - }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”。", - "default" : "v3" - }, - "metadata" : { - "description" : "节点池的元数据信息", - "$ref" : "#/components/schemas/NodePoolMetadata" + "nodeCheckStatus": { + "description": "节点限制检查状态", + "properties": { + "phase": { + "description": "状态,取值如下", + "type": "string" }, - "spec" : { - "description" : "节点池的规格描述", - "$ref" : "#/components/schemas/NodePoolSpec" - }, - "status" : { - "description" : "节点池状态", - "$ref" : "#/components/schemas/NodePoolStatus" + "nodeStageStatus": { + "type": "array", + "description": "节点检查状态", + "items": { + "$ref": "#/components/schemas/NodeStageStatus" + } } }, - "description" : "", - "type" : "object" + "type": "object" }, - "AddNodesToNodePoolList" : { - "description" : "自定义节点池纳管节点参数,纳管过程将清理节点上系统盘、数据盘数据,并作为新节点接入Kuberntes集群,请提前备份迁移关键数据。", - "required" : [ "apiVersion", "kind", "nodeList" ], - "properties" : { - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”。" + "configurationRisks": { + "description": "配置风险项来源", + "properties": { + "package": { + "type": "string", + "description": "组件名称" }, - "kind" : { - "type" : "string", - "description" : "API类型,固定值“List”。" + "sourceFile": { + "type": "string", + "description": "涉及文件路径" }, - "nodeList" : { - "type" : "array", - "description" : "纳管节点列表,当前最多支持同时纳管200个节点。", - "items" : { - "$ref" : "#/components/schemas/AddNodesToNodePool" - } - } - }, - "type" : "object" - }, - "ReinstallJobResult" : { - "required" : [ "jobid" ], - "properties" : { - "jobid" : { - "type" : "string", - "format" : "uuid", - "example" : "70a599e0-31e7-49b7-b260-868f44166666", - "description" : "提交任务成功后返回的任务ID,用户可以使用该ID对任务执行情况进行查询。" - } - }, - "description" : "纳管节点或者重置节点任务返回体。", - "type" : "object" - }, - "AddNodesToNodePool" : { - "description" : "自定义节点池纳管节点参数。", - "required" : [ "serverID" ], - "properties" : { - "serverID" : { - "type" : "string", - "format" : "uuid", - "description" : "服务器ID,获取方式请参见ECS/BMS相关资料。" + "nodeMsg": { + "type": "string", + "description": "节点信息" + }, + "field": { + "type": "string", + "description": "参数值" + }, + "operation": { + "type": "string", + "description": "修改操作类型" + }, + "originalValue": { + "type": "string", + "description": "原始值" + }, + "value": { + "type": "string", + "description": "当前值" } }, - "type" : "object" + "type": "object" }, - "NodeCreateRequest" : { - "required" : [ "kind", "apiVersion", "spec" ], - "properties" : { - "kind" : { - "type" : "string", - "description" : "API类型,固定值“Node”,该值不可修改。", - "default" : "Node" - }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”,该值不可修改。", - "default" : "v3" - }, - "metadata" : { - "description" : "metadata是节点对象的元数据定义,是集合类的元素类型,包含一组由不同名称定义的属性。", - "$ref" : "#/components/schemas/NodeMetadata" - }, - "spec" : { - "description" : "spec是集合类的元素类型,用户对需要管理的节点对象进行详细描述的主体部分都在spec中给出。系统通过spec的描述来创建或更新对象。", - "$ref" : "#/components/schemas/NodeSpec" + "GetImageCacheResponseBody": { + "required": [ + "image_cache" + ], + "properties": { + "image_cache": { + "description": "镜像缓存信息。", + "$ref": "#/components/schemas/ImageCacheDetail" } }, - "description" : "", - "type" : "object" + "description": "查询镜像缓存-response结构体。", + "type": "object" }, - "AutopilotContainerNetwork" : { - "required" : [ "mode" ], - "properties" : { - "mode" : { - "type" : "string", - "description" : "容器网络类型", - "minLength" : 0, - "maxLength" : 64, - "enum" : [ "eni" ] + "AddonInstanceRollbackRequest": { + "required": [ + "clusterID" + ], + "properties": { + "clusterID": { + "type": "string", + "description": "集群ID" } }, - "description" : "Container network parameters.", - "type" : "object" + "type": "object" }, - "AutopilotClusterExtendParam" : { - "properties" : { - "enterpriseProjectId" : { - "type" : "string", - "description" : "集群所属的企业项目ID。" + "NodeList": { + "properties": { + "kind": { + "type": "string", + "description": "API类型,固定值“List”", + "default": "List" }, - "upgradefrom" : { - "type" : "string", - "description" : "记录集群通过何种升级方式升级到当前版本。" + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”", + "default": "v3" + }, + "items": { + "type": "array", + "description": "节点对象列表,包含了当前集群下所有节点的详细信息。可通过items.metadata.name下的值来找到对应的节点。", + "items": { + "description": "", + "$ref": "#/components/schemas/Node" + } } }, - "type" : "object" - }, - "AutopilotCluster" : { - "required" : [ "apiVersion", "kind", "metadata", "spec" ], - "properties" : { - "kind" : { - "type" : "string", - "description" : "API类型,固定值“Cluster”或“cluster”,该值不可修改。", - "default" : "Cluster" + "description": "", + "type": "object" + }, + "BatchCreateClusterTagsRequestBody": { + "description": "批量添加指定集群资源标签的请求体", + "required": [ + "tags" + ], + "properties": { + "tags": { + "type": "array", + "description": "待创建的集群资源标签列表。单集群资源标签总数上限为20。", + "items": { + "$ref": "#/components/schemas/ResourceTag" + }, + "maxItems": 20, + "minItems": 1 + } + }, + "type": "object" + }, + "AddonTemplate": { + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ], + "properties": { + "kind": { + "type": "string", + "description": "API类型,固定值“Addon”,该值不可修改。", + "default": "Addon" + }, + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”,该值不可修改。", + "default": "v3" + }, + "metadata": { + "description": "基本信息,为集合类的元素类型,包含一组由不同名称定义的属性", + "$ref": "#/components/schemas/AddonMetadata" + }, + "spec": { + "description": "spec是集合类的元素类型,内容为插件模板具体信息,插件模板的详细描述主体部分都在spec中给出", + "$ref": "#/components/schemas/Templatespec" + } + }, + "description": "插件模板详情-response结构体", + "type": "object" + }, + "AddonTemplates": { + "required": [ + "apiVersion", + "items", + "kind" + ], + "properties": { + "kind": { + "type": "string", + "description": "API类型,固定值“Addon”,该值不可修改。", + "default": "Addon" + }, + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”,该值不可修改。", + "default": "v3" + }, + "items": { + "type": "array", + "description": "插件模板列表", + "items": { + "$ref": "#/components/schemas/AddonTemplate" + } + } + }, + "description": "插件模板列表-response结构体", + "type": "object" + }, + "Templatespec": { + "required": [ + "description", + "labels", + "logoURL", + "readmeURL", + "type", + "versions" + ], + "properties": { + "type": { + "type": "string", + "description": "模板类型(helm,static)" + }, + "require": { + "type": "boolean", + "description": "是否为必安装插件" + }, + "labels": { + "type": "array", + "description": "模板所属分组", + "items": { + "type": "string" + } + }, + "logoURL": { + "type": "string", + "description": "Logo图片地址" }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”,该值不可修改。", - "default" : "v3" + "readmeURL": { + "type": "string", + "description": "插件详情描述及使用说明" }, - "metadata" : { - "description" : "集群的基本信息,为集合类的元素类型,包含一组由不同名称定义的属性。", - "$ref" : "#/components/schemas/AutopilotClusterMetadata" + "description": { + "type": "string", + "description": "模板描述" }, - "spec" : { - "description" : "spec是集合类的元素类型,您对需要管理的集群对象进行详细描述的主体部分都在spec中给出。CCE通过spec的描述来创建或更新对象。", - "$ref" : "#/components/schemas/AutopilotClusterSpec" + "versions": { + "type": "array", + "description": "模板具体版本详情", + "items": { + "$ref": "#/components/schemas/Versions" + } + } + }, + "description": "插件模板详细信息", + "type": "object" + }, + "SyncNodeResp": { + "type": "object" + }, + "PostcheckClusterRequestBody": { + "required": [ + "kind", + "apiVersion", + "spec" + ], + "properties": { + "apiVersion": { + "type": "string", + "description": "API版本,默认为v3" + }, + "kind": { + "type": "string", + "description": "资源类型" }, - "status" : { - "description" : "集合类的元素类型,用于记录对象在系统中的当前状态信息,包含了集群状态和本次创建集群作业的jobID", - "$ref" : "#/components/schemas/AutopilotClusterStatus" + "spec": { + "description": "spec是升级后确认的配置信息。", + "$ref": "#/components/schemas/PostcheckSpec" } }, - "description" : "", - "type" : "object" + "type": "object" }, - "AutopilotAuthentication" : { - "properties" : { - "mode" : { - "type" : "string", - "description" : "集群认证模式。默认取值为“rbac”。" + "PostcheckClusterResponseBody": { + "description": "升级后确认返回体", + "properties": { + "apiVersion": { + "type": "string", + "description": "API版本" + }, + "kind": { + "type": "string", + "description": "资源类型" + }, + "metadata": { + "description": "升级后确认元数据", + "$ref": "#/components/schemas/PostcheckCluserResponseMetadata" + }, + "spec": { + "description": "集群升级后确认的配置信息", + "$ref": "#/components/schemas/PostcheckSpec" + }, + "status": { + "description": "集群升级后确认的状态信息", + "properties": { + "phase": { + "description": "状态,取值如下", + "type": "string" + } + } } }, - "description" : "", - "type" : "object" + "type": "object" }, - "AutopilotResourceTag" : { - "properties" : { - "key" : { - "type" : "string", - "description" : "Key值。", - "minLength" : 1, - "maxLength" : 128 + "PostcheckSpec": { + "properties": { + "clusterID": { + "type": "string", + "description": "集群ID" }, - "value" : { - "type" : "string", - "description" : "Value值。", - "maxLength" : 255 + "clusterVersion": { + "type": "string", + "description": "集群升级源版本" + }, + "targetVersion": { + "type": "string", + "description": "集群升级目标版本" } }, - "description" : "CCE资源标签", - "type" : "object" + "type": "object" }, - "AutopilotEniNetwork" : { - "required" : [ "subnets" ], - "properties" : { - "subnets" : { - "type" : "array", - "description" : "ENI所在子网的IPv4子网ID列表。获取方法如下:", - "items" : { - "description" : "IPv4子网ID", - "$ref" : "#/components/schemas/AutopilotNetworkSubnet" - } + "PostcheckCluserResponseMetadata": { + "description": "升级后确认元数据", + "properties": { + "uid": { + "description": "任务ID", + "type": "string" } }, - "description" : "ENI网络配置。", - "type" : "object" - }, - "AutopilotPackageConfiguration" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "description" : "组件名称" - }, - "configurations" : { - "type" : "array", - "description" : "组件配置项", - "items" : { - "$ref" : "#/components/schemas/AutopilotConfigurationItem" - } - } - } + "type": "object" }, - "AutopilotClusterStatus" : { - "properties" : { - "phase" : { - "type" : "string", - "description" : "集群状态,取值如下" - }, - "jobID" : { - "type" : "string", - "description" : "任务ID,集群当前状态关联的任务ID。当前支持:" - }, - "reason" : { - "type" : "string", - "description" : "集群变为当前状态的原因,在集群在非“Available”状态下时,会返回此参数。" - }, - "message" : { - "type" : "string", - "description" : "集群变为当前状态的原因的详细信息,在集群在非“Available”状态下时,会返回此参数。" - }, - "endpoints" : { - "description" : "集群中 kube-apiserver 的访问地址。", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/AutopilotClusterEndpoints" - } + "SnapshotTask": { + "properties": { + "kind": { + "type": "string", + "description": "任务类型" }, - "isLocked" : { - "type" : "boolean", - "description" : "CBC资源锁定" + "apiVersion": { + "type": "string", + "description": "API版本" }, - "lockScene" : { - "type" : "string", - "description" : "CBC资源锁定场景" + "metadata": { + "description": "备份任务元数据信息", + "$ref": "#/components/schemas/SnapshotTaskMetadata" }, - "lockSource" : { - "type" : "string", - "description" : "锁定资源" + "spec": { + "description": "备份任务配置信息(待废弃)", + "$ref": "#/components/schemas/SnapshotSpec" }, - "lockSourceId" : { - "type" : "string", - "description" : "锁定的资源ID" - }, - "deleteOption" : { - "type" : "object", - "description" : "删除配置状态(仅删除请求响应包含)" - }, - "deleteStatus" : { - "type" : "object", - "description" : "删除状态信息(仅删除请求响应包含)" + "status": { + "description": "备份任务状态", + "$ref": "#/components/schemas/SnapshotStatus" } }, - "description" : "", - "type" : "object" + "type": "object" }, - "AutopilotNetworkSubnet" : { - "required" : [ "subnetID" ], - "properties" : { - "subnetID" : { - "type" : "string", - "description" : "用于创建控制节点的subnet的IPv4子网ID(暂不支持IPv6)。获取方法如下:", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + "SnapshotTaskStatus": { + "properties": { + "latestBackupTime": { + "type": "string", + "description": "最近一次备份的时间" } }, - "description" : "ENI网络配置,创建集群指定subnets字段使用时必填。", - "type" : "object" + "type": "object" }, - "AutopilotConfigurationItem" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "description" : "组件配置项名称" + "SnapshotSpecItems": { + "properties": { + "id": { + "type": "string", + "description": "子任务ID" }, - "value" : { - "type" : "object", - "description" : "组件配置项值", - "properties" : { } - } - } - }, - "AutopilotCustomSan" : { - "type" : "object", - "description" : "集群的API Server服务端证书中的自定义SAN(Subject Alternative Name)字段,遵从SSL标准X509定义的格式规范。", - "items" : { - "type" : "string", - "description" : "", - "maxLength" : 255, - "minLength" : 0 - }, - "maxItems" : 128, - "minItems" : 0 - }, - "AutopilotClusterEndpoints" : { - "properties" : { - "url" : { - "type" : "string", - "description" : "集群中 kube-apiserver 的访问地址" - }, - "type" : { - "type" : "string", - "description" : "集群访问地址的类型" - } - }, - "type" : "object" - }, - "AutopilotClusterMetadata" : { - "required" : [ "name" ], - "properties" : { - "name" : { - "type" : "string", - "description" : "集群名称。", - "minLength" : 4, - "maxLength" : 128 - }, - "uid" : { - "type" : "string", - "description" : "集群ID,资源唯一标识,创建成功后自动生成,填写无效。在创建包周期集群时,响应体不返回集群ID。", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - }, - "alias" : { - "type" : "string", - "description" : "集群显示名,用于在 CCE 界面显示,该名称创建后可修改。", - "minLength" : 4, - "maxLength" : 128 - }, - "annotations" : { - "type" : "object", - "description" : "集群注解,由key/value组成:", - "additionalProperties" : { - "type" : "string", - "description" : "" - } - }, - "labels" : { - "type" : "object", - "description" : "集群标签,key/value对格式。", - "additionalProperties" : { - "type" : "string", - "description" : "" - } - }, - "creationTimestamp" : { - "type" : "string", - "description" : "集群创建时间" - }, - "updateTimestamp" : { - "type" : "string", - "description" : "集群更新时间" - } - }, - "description" : "支持通过 annotations[\"cluster.install.addons/install\"] 来指定创建集群时需要安装的插件", - "type" : "object" - }, - "AutopilotHostNetwork" : { - "required" : [ "subnet", "vpc" ], - "properties" : { - "vpc" : { - "type" : "string", - "description" : "用于创建控制节点的VPC的ID。", - "minLength" : 0, - "maxLength" : 64 - }, - "subnet" : { - "type" : "string", - "description" : "用于创建控制节点的subnet的网络ID。获取方法如下:", - "minLength" : 0, - "maxLength" : 64 - } - }, - "description" : "Node network parameters.", - "type" : "object" - }, - "AutopilotClusterSpec" : { - "required" : [ "containerNetwork", "flavor", "hostNetwork" ], - "properties" : { - "category" : { - "type" : "string", - "description" : "集群类别。", - "enum" : [ "Turbo" ] - }, - "type" : { - "type" : "string", - "description" : "集群Master节点架构:", - "enum" : [ "VirtualMachine" ] - }, - "flavor" : { - "type" : "string", - "description" : "集群规格,cce.autopilot.cluster" - }, - "version" : { - "type" : "string", - "description" : "集群版本,与Kubernetes社区基线版本保持一致,建议选择最新版本。" - }, - "platformVersion" : { - "type" : "string", - "description" : "CCE集群平台版本号,表示集群版本(version)下的内部版本。用于跟踪某一集群版本内的迭代,集群版本内唯一,跨集群版本重新计数。不支持用户指定,集群创建时自动选择对应集群版本的最新平台版本。" - }, - "description" : { - "type" : "string", - "description" : "集群描述,对于集群使用目的的描述,可根据实际情况自定义,默认为空。集群创建成功后可通过接口[更新指定的集群](cce_02_0240.xml)来做出修改,也可在CCE控制台中对应集群的“集群详情”下的“描述”处进行修改。仅支持utf-8编码。", - "minLength" : 0, - "maxLength" : 200, - "pattern" : "[\\~\\$\\%\\^\\&\\*\\<\\>\\[\\]\\{\\}\\(\\)\\'\\\"\\#\\\\]" - }, - "customSan" : { - "$ref" : "#/components/schemas/AutopilotCustomSan" - }, - "enableSnat" : { - "type" : "boolean", - "description" : "集群是否配置SNAT。开启后您的集群可以通过NAT网关访问公网,默认使用所选的VPC中已有的NAT网关,否则系统将会为您自动创建一个默认规格的NAT网关并绑定弹性公网IP,自动配置SNAT规则。" - }, - "enableSWRImageAccess" : { - "type" : "boolean", - "description" : "集群是否配置镜像访问。为确保您的集群节点可以从容器镜像服务中拉取镜像,默认使用所选VPC中已有的SWR和OBS终端节点,否则将会为您自动新建SWR和OBS终端节点。" - }, - "ipv6enable" : { - "type" : "boolean", - "description" : "集群是否使用IPv6模式。" - }, - "hostNetwork" : { - "description" : "节点网络参数,包含了虚拟私有云VPC和子网的ID信息,而VPC是集群内节点之间的通信依赖,所以是必选的参数集。", - "$ref" : "#/components/schemas/AutopilotHostNetwork" - }, - "containerNetwork" : { - "description" : "容器网络参数,包含了容器网络类型和容器网段的信息。", - "$ref" : "#/components/schemas/AutopilotContainerNetwork" - }, - "eniNetwork" : { - "description" : "云原生网络2.0网络配置。", - "$ref" : "#/components/schemas/AutopilotEniNetwork" - }, - "serviceNetwork" : { - "description" : "服务网段参数,包含IPv4 CIDR。", - "$ref" : "#/components/schemas/AutopilotServiceNetwork" - }, - "authentication" : { - "description" : "集群认证方式相关配置。", - "$ref" : "#/components/schemas/AutopilotAuthentication" - }, - "billingMode" : { - "type" : "integer", - "format" : "int32", - "description" : "集群的计费方式。", - "default" : 0 - }, - "kubernetesSvcIpRange" : { - "type" : "string", - "description" : "服务网段参数,kubernetes clusterIP取值范围。创建集群时如若未传参,默认为\"10.247.0.0/16\"。该参数废弃中,推荐使用新字段serviceNetwork,包含IPv4服务网段。" - }, - "clusterTags" : { - "type" : "array", - "description" : "集群资源标签", - "items" : { - "description" : "集群资源标签", - "$ref" : "#/components/schemas/AutopilotResourceTag" - }, - "maxItems" : 5, - "minItems" : 0 + "type": { + "type": "string", + "description": "子任务类型" }, - "kubeProxyMode" : { - "type" : "string", - "description" : "服务转发模式:", - "enum" : [ "iptables" ] + "status": { + "type": "string", + "description": "状态" }, - "az" : { - "type" : "string", - "description" : "可用区(仅查询返回字段)。" - }, - "extendParam" : { - "$ref" : "#/components/schemas/AutopilotClusterExtendParam", - "description" : "集群扩展字段,可配置多可用区集群、专属CCE集群,以及将集群创建在特定的企业项目下等。" - }, - "configurationsOverride" : { - "type" : "array", - "description" : "覆盖集群默认组件配置", - "items" : { - "$ref" : "#/components/schemas/AutopilotPackageConfiguration" - } + "creationTimestamp": { + "type": "string", + "description": "任务创建时间" + }, + "updateTimestamp": { + "type": "string", + "description": "任务更新时间" + }, + "message": { + "type": "string", + "description": "信息" } }, - "description" : "集群参数定义。", - "type" : "object" + "type": "object" }, - "AutopilotServiceNetwork" : { - "properties" : { - "IPv4CIDR" : { - "type" : "string", - "description" : "kubernetes clusterIP IPv4 CIDR取值范围。创建集群时若未传参,默认为\"10.247.0.0/16\"。" - } - }, - "type" : "object" - }, - "AutopilotClusterList" : { - "required" : [ "apiVersion", "items", "kind" ], - "properties" : { - "kind" : { - "type" : "string", - "description" : "Api type", - "minLength" : 6, - "maxLength" : 10, - "default" : "Cluster" + "SnapshotStatus": { + "properties": { + "phase": { + "type": "string", + "description": "任务状态" }, - "apiVersion" : { - "type" : "string", - "description" : "API version", - "minLength" : 2, - "maxLength" : 5, - "default" : "v3" + "progress": { + "type": "string", + "description": "任务进度" }, - "items" : { - "type" : "array", - "description" : "集群对象列表,包含了当前项目下所有集群的详细信息。您可通过items.metadata.name下的值来找到对应的集群。", - "items" : { - "description" : "", - "$ref" : "#/components/schemas/AutopilotCluster" - } + "completionTime": { + "type": "string", + "description": "完成时间" } }, - "description" : "", - "type" : "object" + "type": "object" }, - "MaintenanceWindow" : { - "required" : [ "weekly_period", "start_time", "duration_hours" ], - "properties" : { - "weekly_period" : { - "type" : "string", - "description" : "升级周期,从\"Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday\"中进行选择,以英文逗号分隔" + "SnapshotTaskMetadata": { + "properties": { + "uid": { + "type": "string", + "description": "任务的ID。" }, - "start_time" : { - "type" : "string", - "description" : "升级起始时间(UTC时间)" + "creationTimestamp": { + "type": "string", + "description": "任务的创建时间。" }, - "duration_hours" : { - "type" : "integer", - "description" : "升级时长" - }, - "upgrade_scope" : { - "type" : "string", - "description" : "升级版本范围,当前只支持小版本自动升级", - "default" : "OnlyPatchVersion", - "pattern" : "OnlyPatchVersion" + "updateTimestamp": { + "type": "string", + "description": "任务的更新时间。" } }, - "type" : "object" + "type": "object" }, - "APIVersionDetail" : { - "description" : "API版本的详细信息", - "required" : [ "id", "links", "min_version", "status", "updated", "version" ], - "properties" : { - "id" : { - "type" : "string", - "description" : "API版本ID。例如v3。" - }, - "links" : { - "type" : "array", - "description" : "API版本的URL链接信息。", - "items" : { - "$ref" : "#/components/schemas/APIVersionLink" - } + "SnapshotClusterTaskResponseBody": { + "properties": { + "apiVersion": { + "type": "string", + "description": "api版本,默认为v3.1" }, - "min_version" : { - "type" : "string", - "description" : "如果API的这个版本支持微版本,则支持最小的微版本。如果不支持微版本,这将是空字符串。" + "kind": { + "type": "string", + "description": "任务类型" }, - "status" : { - "type" : "string", - "description" : "API版本的状态。", - "enum" : [ "CURRENT", "SUPPORTED", "DEPRECATED" ] + "metadata": { + "description": "备份任务元数据信息", + "$ref": "#/components/schemas/SnapshotTaskMetadata" }, - "updated" : { - "type" : "string", - "description" : "API发布时间(UTC格式)。例如API版本为v3时,值为'2018-09-15 00:00:00Z'。" + "items": { + "type": "array", + "description": "备份任务列表", + "items": { + "$ref": "#/components/schemas/SnapshotTask" + } }, - "version" : { - "type" : "string", - "description" : "如果API的这个版本支持微版本,则支持最大的微版本。如果不支持微版本,这将是空字符串。" + "status": { + "description": "备份任务状态", + "$ref": "#/components/schemas/SnapshotTaskStatus" } }, - "type" : "object" + "type": "object" }, - "APIVersionLink" : { - "description" : "API版本的URL链接信息。", - "required" : [ "href", "rel" ], - "properties" : { - "href" : { - "type" : "string", - "description" : "API版本信息的链接。" - }, - "rel" : { - "type" : "string", - "description" : "链接属性。self:自助链接包含版本链接的资源。立即链接后使用这些链接。", - "enum" : [ "self" ] - } - }, - "type" : "object" - }, - "APIVersionList" : { - "description" : "API版本的详细信息", - "required" : [ "versions" ], - "properties" : { - "versions" : { - "type" : "array", - "description" : "API版本信息列表", - "items" : { - "$ref" : "#/components/schemas/APIVersionDetail" + "SnapshotSpec": { + "properties": { + "items": { + "type": "array", + "description": "备份任务详情", + "items": { + "$ref": "#/components/schemas/SnapshotSpecItems" } } }, - "type" : "object" + "type": "object" + }, + "ShowNodePoolConfigurationDetailsRespBody": { + "type": "object", + "description": "获取指定节点池配置参数列表返回体", + "additionalProperties": { + "type": "array", + "description": "配置参数,由key/value组成。", + "items": { + "$ref": "#/components/schemas/PackageOptions" + } + } }, - "NodeItem" : { - "required" : [ "uid" ], - "properties" : { - "uid" : { - "type" : "string", - "description" : "节点ID" + "ClusterMetadataForUpdate": { + "properties": { + "alias": { + "type": "string", + "description": "集群显示名。", + "minLength": 4, + "maxLength": 128 } }, - "type" : "object" + "type": "object" }, - "RemoveNodesTask" : { - "required" : [ "spec" ], - "properties" : { - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”。" + "ClusterInformationSpec": { + "properties": { + "description": { + "type": "string", + "description": "集群的描述信息。", + "maxLength": 200, + "pattern": "[^\\~\\$\\%\\^\\&\\*\\<\\>\\[\\]\\{\\}\\(\\)\\'\\\"\\#\\\\]" + }, + "customSan": { + "$ref": "#/components/schemas/CustomSan" }, - "kind" : { - "type" : "string", - "description" : "API类型,固定值“RemoveNodesTask”。" + "containerNetwork": { + "description": "容器网络参数,包含容器网段的信息。", + "$ref": "#/components/schemas/ContainerNetworkUpdate" }, - "spec" : { - "description" : "配置信息", - "$ref" : "#/components/schemas/RemoveNodesSpec" + "eniNetwork": { + "description": "云原生网络2.0网络配置,包含CCE Turbo集群的容器子网信息。", + "$ref": "#/components/schemas/EniNetworkUpdate" + }, + "hostNetwork": { + "description": "节点网络参数,包含了Node节点默认安群组设置", + "properties": { + "SecurityGroup": { + "type": "string", + "description": "集群默认Node节点安全组需要放通部分端口来保证正常通信,详细设置请参考[集群安全组规则配置](https://support.huaweicloud.com/cce_faq/cce_faq_00265.html)。" + } + } }, - "status" : { - "description" : "任务状态", - "$ref" : "#/components/schemas/TaskStatus" + "deletionProtection": { + "type": "boolean", + "description": "集群删除保护,默认为false关闭,如果开启后用户将无法删除该集群。", + "default": false } }, - "type" : "object" + "description": "", + "type": "object" }, - "TaskStatus" : { - "properties" : { - "jobID" : { - "type" : "string", - "description" : "任务ID,供调用者查询任务进度。" + "ClusterInformation": { + "required": [ + "spec" + ], + "properties": { + "spec": { + "description": "具体集群参数", + "$ref": "#/components/schemas/ClusterInformationSpec" + }, + "metadata": { + "description": "集群基本信息,包含与名称相关的字段", + "$ref": "#/components/schemas/ClusterMetadataForUpdate" } }, - "type" : "object" + "description": "", + "type": "object" }, - "RemoveNodesSpec" : { - "required" : [ "login", "nodes" ], - "properties" : { - "login" : { - "description" : "节点的登录方式。密钥对和密码登录方式二者必选其一。", - "$ref" : "#/components/schemas/Login" - }, - "nodes" : { - "type" : "array", - "description" : "待操作节点列表", - "items" : { - "$ref" : "#/components/schemas/NodeItem" - } + "ContainerNetworkUpdate": { + "properties": { + "cidrs": { + "type": "array", + "description": "容器网络网段列表。1.21及新版本集群,当集群网络类型为vpc-router时,支持增量添加容器网段,最多配置20个。", + "items": { + "description": "容器网络网段", + "$ref": "#/components/schemas/ContainerCIDR" + }, + "maxItems": 20 } }, - "type" : "object" + "type": "object" }, - "ImageCacheDetail" : { - "required" : [ "name", "id", "created_at", "images", "image_cache_size", "retention_days", "building_config", "status" ], - "properties" : { - "name" : { - "type" : "string", - "description" : "镜像缓存名称。", - "minLength" : 1, - "maxLength" : 128, - "pattern" : "^[a-z]([a-z0-9-]*[a-z0-9])?$" - }, - "id" : { - "type" : "string", - "description" : "镜像缓存ID。", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - }, - "created_at" : { - "type" : "string", - "description" : "镜像缓存创建时间戳。" - }, - "images" : { - "type" : "array", - "description" : "镜像缓存中的容器镜像列表。", - "items" : { - "type" : "string", - "minLength" : 1, - "maxLength" : 1024 + "EniNetworkUpdate": { + "properties": { + "subnets": { + "type": "array", + "description": "IPv4子网ID列表。1.19.10及以上版本的CCE Turbo集群支持多容器子网,同时支持增量更新容器子网列表。", + "items": { + "description": "IPv4子网ID", + "$ref": "#/components/schemas/NetworkSubnet" }, - "maxItems" : 20, - "minItems" : 1 - }, - "image_cache_size" : { - "type" : "integer", - "format" : "int32", - "description" : "镜像缓存后端对应的存储盘大小,单位GiB。", - "default" : 20, - "minimum" : 20, - "maximum" : 400 - }, - "retention_days" : { - "type" : "integer", - "format" : "int32", - "description" : "**参数解释:**", - "default" : 0, - "minimum" : 0, - "maximum" : 10000 - }, - "building_config" : { - "description" : "构建镜像缓存的配置信息。", - "$ref" : "#/components/schemas/ImageCacheBuildingConfig" - }, - "status" : { - "type" : "string", - "description" : "**参数解释:**", - "enum" : [ "Available", "Unavailable", "Creating", "Deleting", "Failed" ] - }, - "message" : { - "type" : "string", - "description" : "镜像缓存创建失败或异常的错误信息。", - "minLength" : 0, - "maxLength" : 10240 - } - }, - "description" : "镜像缓存信息。", - "type" : "object" - }, - "ListImageCacheResponseBody" : { - "required" : [ "image_caches" ], - "properties" : { - "image_caches" : { - "type" : "array", - "description" : "镜像缓存列表。", - "items" : { - "$ref" : "#/components/schemas/ImageCacheDetail" - }, - "minItems" : 0, - "maxItems" : 20 - } - }, - "description" : "镜像缓存列表-response结构体。", - "type" : "object" - }, - "ImageCacheBuildingConfig" : { - "description" : "镜像缓存构建配置信息。", - "required" : [ "cluster" ], - "properties" : { - "cluster" : { - "type" : "string", - "description" : "**参数解释:**", - "example" : "8b3b4b2d-e39d-11ef-a9ac-0255ac100113", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - }, - "image_pull_secrets" : { - "description" : "下载所需缓存镜像的访问凭证列表,不填写或无有效凭证时仅支持下载公共镜像。", - "type" : "array", - "items" : { - "type" : "string", - "description" : "**参数解释:**", - "minLength" : 3, - "maxLength" : 317 - }, - "maxItems" : 20, - "minItems" : 0, - "example" : [ "default:default-secret", "test:my-secret" ] + "maxItems": 20 } }, - "type" : "object" + "type": "object" }, - "UpgradeTaskStatus" : { - "description" : "升级任务状态信息", - "properties" : { - "phase" : { - "type" : "string", - "description" : "升级任务状态." + "UpgradeInfoSpec": { + "description": "升级配置相关信息", + "properties": { + "lastUpgradeInfo": { + "description": "上次集群升级信息", + "$ref": "#/components/schemas/UpgradeInfoStatus" }, - "progress" : { - "type" : "string", - "description" : "升级任务进度" + "versionInfo": { + "description": "版本信息", + "$ref": "#/components/schemas/UpgradeVersionInfo" }, - "completionTime" : { - "type" : "string", - "description" : "升级任务结束时间" + "upgradeFeatureGates": { + "description": "集群升级特性开关", + "$ref": "#/components/schemas/UpgradeFeatureGates" } }, - "type" : "object" + "type": "object" }, - "UpgradeTaskListResponseBody" : { - "properties" : { - "apiVersion" : { - "type" : "string", - "description" : "api版本,默认为v3" + "UpgradeVersionInfo": { + "description": "版本信息", + "properties": { + "release": { + "type": "string", + "description": "正式版本号,如:v1.19.10" }, - "kind" : { - "type" : "string", - "description" : "资源类型" + "patch": { + "type": "string", + "description": "补丁版本号,如r0" }, - "metadata" : { - "description" : "元数据信息", - "$ref" : "#/components/schemas/UpgradeTaskMetadata" + "suggestPatch": { + "type": "string", + "description": "推荐升级的目标补丁版本号,如r0" }, - "items" : { - "type" : "array", - "description" : "集群升级任务列表", - "items" : { - "$ref" : "#/components/schemas/UpgradeTaskResponseBody" + "targetVersions": { + "type": "array", + "description": "升级目标版本集合", + "items": { + "type": "string", + "description": "目标版本" } } }, - "type" : "object" + "type": "object" }, - "UpgradeTaskSpec" : { - "description" : "升级任务属性", - "properties" : { - "version" : { - "type" : "string", - "description" : "升级前集群版本" + "UpgradeInfoStatus": { + "description": "升级状态信息", + "properties": { + "phase": { + "type": "string", + "description": "升级任务状态." }, - "targetVersion" : { - "type" : "string", - "description" : "升级的目标集群版本" + "progress": { + "type": "string", + "description": "升级任务进度" }, - "items" : { - "type" : "object", - "description" : "升级任务附属信息" + "completionTime": { + "type": "string", + "description": "升级任务结束时间" } }, - "type" : "object" + "type": "object" }, - "UpgradeTaskResponseBody" : { - "properties" : { - "apiVersion" : { - "type" : "string", - "description" : "api版本,默认为v3" + "UpgradeInfoResponseBody": { + "properties": { + "kind": { + "type": "string", + "description": "类型" }, - "kind" : { - "type" : "string", - "description" : "资源类型,默认为UpgradeTask" + "apiVersion": { + "type": "string", + "description": "API版本" }, - "metadata" : { - "description" : "升级任务元数据信息", - "$ref" : "#/components/schemas/UpgradeTaskMetadata" + "metadata": { + "description": "基本信息,为集合类的元素类型,包含一组由不同名称定义的属性", + "$ref": "#/components/schemas/Metadata" }, - "spec" : { - "description" : "升级任务信息", - "$ref" : "#/components/schemas/UpgradeTaskSpec" + "spec": { + "description": "升级配置相关信息", + "$ref": "#/components/schemas/UpgradeInfoSpec" }, - "status" : { - "description" : "升级任务状态", - "$ref" : "#/components/schemas/UpgradeTaskStatus" + "status": { + "description": "升级状态信息", + "$ref": "#/components/schemas/UpgradeInfoStatus" } }, - "type" : "object" + "type": "object" }, - "UpgradeTaskMetadata" : { - "description" : "升级任务元数据", - "properties" : { - "uid" : { - "type" : "string", - "description" : "升级任务ID" - }, - "creationTimestamp" : { - "type" : "string", - "description" : "任务创建时间" - }, - "updateTimestamp" : { - "type" : "string", - "description" : "任务更新时间" + "UpgradeFeatureGates": { + "description": "集群升级特性开关", + "properties": { + "supportUpgradePageV4": { + "type": "boolean", + "description": "集群升级Console界面是否支持V4版本,该字段一般由CCE Console使用。" } }, - "type" : "object" + "type": "object" }, - "CreateReleaseReqBody" : { - "description" : "创建模板实例的请求体", - "required" : [ "chart_id", "name", "namespace", "values", "version" ], - "properties" : { - "chart_id" : { - "type" : "string", - "description" : "模板ID", - "example" : "af4b699e-018c-11ec-b8b0-0255ac100b05" + "PrecheckClusterResponseBody": { + "description": "升级前检查返回体", + "properties": { + "apiVersion": { + "type": "string", + "description": "API版本" }, - "description" : { - "type" : "string", - "description" : "模板实例描述", - "example" : "" + "kind": { + "type": "string", + "description": "资源类型" }, - "name" : { - "type" : "string", - "description" : "模板实例名称", - "example" : "testwww" + "metadata": { + "description": "升级前检查元数据", + "$ref": "#/components/schemas/PrecheckCluserResponseMetadata" }, - "namespace" : { - "type" : "string", - "description" : "模板实例所在的命名空间", - "example" : "monitoring" + "spec": { + "description": "spec是集合类的元素类型,您对需要升级前检查的配置信息的主体部分都在spec中给出。CCE通过spec的描述来执行检查。", + "$ref": "#/components/schemas/PrecheckSpec" }, - "version" : { - "type" : "string", - "description" : "模板实例版本号", - "example" : "1.0.0" - }, - "parameters" : { - "$ref" : "#/components/schemas/ReleaseReqBodyParams" - }, - "values" : { - "type" : "object", - "description" : "模板实例的值", - "properties" : { - "imagePullPolicy" : { - "type" : "string", - "example" : "IfNotPresent", - "description" : "镜像拉取策略" - }, - "imageTag" : { - "type" : "string", - "example" : "v2", - "description" : "镜像标签" - } - } + "status": { + "description": "集群升级前检查状态", + "$ref": "#/components/schemas/PrecheckStatus" } - }, - "type" : "object" + }, + "type": "object" }, - "ReleaseReqBodyParams" : { - "description" : "模板实例参数", - "properties" : { - "dry_run" : { - "type" : "boolean", - "example" : false, - "description" : "开启后,仅验证模板参数,不进行安装" - }, - "name_template" : { - "type" : "string", - "description" : "实例名称模板" - }, - "no_hooks" : { - "type" : "boolean", - "example" : false, - "description" : "安装时是否禁用hooks" + "PrecheckClusterRequestBody": { + "required": [ + "kind", + "apiVersion", + "spec" + ], + "properties": { + "apiVersion": { + "type": "string", + "description": "API版本,默认为v3" }, - "replace" : { - "type" : "boolean", - "example" : false, - "description" : "是否替换同名实例" + "kind": { + "type": "string", + "description": "资源类型,默认为PreCheckTask" }, - "recreate" : { - "type" : "boolean", - "example" : false, - "description" : "是否重建实例" - }, - "reset_values" : { - "type" : "boolean", - "example" : false, - "description" : "更新时是否重置values" - }, - "release_version" : { - "type" : "integer", - "example" : 1, - "description" : "回滚实例的版本", - "format" : "int32" - }, - "include_hooks" : { - "type" : "boolean", - "example" : false, - "description" : "更新或者删除时启用hooks" - } - }, - "type" : "object" - }, - "DeleteNodePoolStatus" : { - "properties" : { - "currentNode" : { - "type" : "integer", - "format" : "int32", - "description" : "当前节点池中所有节点数量(不含删除中的节点)。" - }, - "creatingNode" : { - "type" : "integer", - "format" : "int32", - "description" : "当前节点池中处于创建流程中的节点数量。" - }, - "deletingNode" : { - "type" : "integer", - "format" : "int32", - "description" : "当前节点池中删除中的节点数量。" - }, - "phase" : { - "type" : "string", - "description" : "节点池状态。", - "enum" : [ "Synchronizing", "Synchronized", "SoldOut", "Deleting", "Error" ] - }, - "jobId" : { - "type" : "string", - "description" : "对节点池执行操作时的 JobID。" - }, - "conditions" : { - "description" : "节点池当前详细状态列表,详情参见Condition类型定义。", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/NodePoolCondition", - "description" : "节点池详细状态。" - } - }, - "scaleGroupStatuses" : { - "description" : "伸缩组当前详细状态信息,详情参见ScaleGroupStatus类型定义", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ScaleGroupStatus" - } - } - }, - "description" : "", - "type" : "object" - }, - "DeleteNodePoolResp" : { - "required" : [ "kind", "apiVersion", "metadata", "spec" ], - "properties" : { - "kind" : { - "type" : "string", - "description" : "API类型,固定值“NodePool”。", - "default" : "NodePool" - }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”。", - "default" : "v3" - }, - "metadata" : { - "description" : "节点池的元数据信息", - "$ref" : "#/components/schemas/NodePoolMetadata" - }, - "spec" : { - "description" : "节点池的规格描述", - "$ref" : "#/components/schemas/NodePoolSpec" - }, - "status" : { - "description" : "节点池状态", - "$ref" : "#/components/schemas/DeleteNodePoolStatus" - } - }, - "description" : "", - "type" : "object" - }, - "ClusterSpec" : { - "required" : [ "eniNetwork", "containerNetwork", "flavor", "hostNetwork" ], - "properties" : { - "category" : { - "type" : "string", - "description" : "集群类别:", - "enum" : [ "CCE", "Turbo" ] - }, - "type" : { - "type" : "string", - "description" : "集群Master节点架构:", - "enum" : [ "VirtualMachine", "ARM64" ] - }, - "flavor" : { - "type" : "string", - "description" : "集群规格,当集群为v1.15及以上版本时支持创建后变更,详情请参见[变更集群规格](ResizeCluster.xml)。请按实际业务需求进行选择:" - }, - "version" : { - "type" : "string", - "description" : "集群版本,与Kubernetes社区基线版本保持一致,建议选择最新版本。" - }, - "platformVersion" : { - "type" : "string", - "description" : "CCE集群平台版本号,表示集群版本(version)下的内部版本。用于跟踪某一集群版本内的迭代,集群版本内唯一,跨集群版本重新计数。不支持用户指定,集群创建时自动选择对应集群版本的最新平台版本。" - }, - "description" : { - "type" : "string", - "description" : "集群描述,对于集群使用目的的描述,可根据实际情况自定义,默认为空。集群创建成功后可通过接口[更新指定的集群](cce_02_0240.xml)来做出修改,也可在CCE控制台中对应集群的“集群详情”下的“描述”处进行修改。仅支持utf-8编码。", - "minLength" : 0, - "maxLength" : 200, - "pattern" : "[\\~\\$\\%\\^\\&\\*\\<\\>\\[\\]\\{\\}\\(\\)\\'\\\"\\#\\\\]" - }, - "customSan" : { - "$ref" : "#/components/schemas/CustomSan" - }, - "ipv6enable" : { - "type" : "boolean", - "description" : "集群是否使用IPv6模式,1.15版本及以上支持。" - }, - "hostNetwork" : { - "description" : "节点网络参数,包含了虚拟私有云VPC和子网的ID信息,而VPC是集群内节点之间的通信依赖,所以是必选的参数集。", - "$ref" : "#/components/schemas/HostNetwork" - }, - "containerNetwork" : { - "description" : "容器网络参数,包含了容器网络类型和容器网段的信息。", - "$ref" : "#/components/schemas/ContainerNetwork" - }, - "eniNetwork" : { - "description" : "云原生网络2.0网络配置,创建CCE Turbo集群时指定。", - "$ref" : "#/components/schemas/EniNetwork" - }, - "serviceNetwork" : { - "description" : "服务网段参数,包含IPv4 CIDR。", - "$ref" : "#/components/schemas/ServiceNetwork" - }, - "authentication" : { - "description" : "集群认证方式相关配置。", - "$ref" : "#/components/schemas/Authentication" - }, - "billingMode" : { - "type" : "integer", - "format" : "int32", - "description" : "集群的计费方式。", - "default" : 0 - }, - "masters" : { - "type" : "array", - "description" : "控制节点的高级配置", - "items" : { - "description" : "", - "$ref" : "#/components/schemas/MasterSpec" - }, - "maxItems" : 3, - "minItems" : 1 - }, - "kubernetesSvcIpRange" : { - "type" : "string", - "description" : "服务网段参数,kubernetes clusterIP取值范围,1.11.7版本及以上支持。创建集群时如若未传参,默认为\"10.247.0.0/16\"。该参数废弃中,推荐使用新字段serviceNetwork,包含IPv4服务网段。" - }, - "clusterTags" : { - "type" : "array", - "description" : "集群资源标签", - "items" : { - "description" : "集群资源标签", - "$ref" : "#/components/schemas/ResourceTag" - }, - "maxItems" : 5, - "minItems" : 0 - }, - "kubeProxyMode" : { - "type" : "string", - "description" : "服务转发模式,支持以下两种实现:", - "enum" : [ "iptables", "ipvs" ] + "spec": { + "description": "spec是集合类的元素类型,您对需要升级前检查的配置信息的主体部分都在spec中给出。CCE通过spec的描述来执行检查。", + "$ref": "#/components/schemas/PrecheckSpec" + } + }, + "type": "object" + }, + "PrecheckCluserResponseMetadata": { + "description": "升级前检查元数据", + "properties": { + "uid": { + "description": "检查任务ID", + "type": "string" + } + }, + "type": "object" + }, + "CertRevokeConfigRequestBody": { + "properties": { + "userId": { + "type": "string", + "description": "用户ID" }, - "az" : { - "type" : "string", - "description" : "可用区(仅查询返回字段)。" + "agencyId": { + "type": "string", + "description": "委托用户ID" + } + }, + "type": "object" + }, + "JobSpec": { + "properties": { + "type": { + "type": "string", + "description": "任务的类型,例:“CreateCluster”- 创建集群。" }, - "extendParam" : { - "$ref" : "#/components/schemas/ClusterExtendParam", - "description" : "集群扩展字段,可配置多可用区集群、专属CCE集群,以及将集群创建在特定的企业项目下等。" + "clusterUID": { + "type": "string", + "description": "任务所在的集群的ID。" }, - "supportIstio" : { - "type" : "boolean", - "description" : "支持Istio" + "resourceID": { + "type": "string", + "description": "任务操作的资源ID。" }, - "enableDistMgt" : { - "type" : "boolean", - "description" : "集群开启对分布式云支持。创建CCE Turbo集群时,可在创建集群过程中,开启对分布式云(cloudpond)支持。" + "resourceName": { + "type": "string", + "description": "任务操作的资源名称。" }, - "deletionProtection" : { - "type" : "boolean", - "description" : "集群删除保护,默认为false关闭,如果开启后用户将无法删除该集群。", - "default" : false + "extendParam": { + "type": "object", + "description": "扩展参数。", + "additionalProperties": { + "type": "string" + } }, - "configurationsOverride" : { - "type" : "array", - "description" : "覆盖集群默认组件配置", - "items" : { - "$ref" : "#/components/schemas/PackageConfiguration" + "subJobs": { + "type": "array", + "description": "子任务的列表。", + "items": { + "description": "子任务的详细信息", + "$ref": "#/components/schemas/Job" } + } + }, + "description": "", + "type": "object" + }, + "JobMetadata": { + "properties": { + "uid": { + "type": "string", + "description": "任务的ID。" }, - "clusterOps" : { - "$ref" : "#/components/schemas/ClusterOps", - "description" : "**参数解释:**" + "creationTimestamp": { + "type": "string", + "description": "任务的创建时间。" }, - "encryptionConfig" : { - "type" : "object", - "description" : "secret资源落盘加密配置,当前仅支持配置一种加密方式。默认使用cce托管密钥(用户侧不感知该密钥)进行加密。", - "$ref" : "#/components/schemas/EncryptionConfig" + "updateTimestamp": { + "type": "string", + "description": "任务的更新时间。" } }, - "description" : "集群参数定义。", - "type" : "object" + "description": "", + "type": "object" }, - "ClusterExtendParam" : { - "properties" : { - "clusterAZ" : { - "type" : "string", - "description" : "集群控制节点可用区配置。" + "Job": { + "properties": { + "kind": { + "type": "string", + "description": "API类型,固定值“Job”,该值不可修改。", + "default": "Job" }, - "dssMasterVolumes" : { - "type" : "string", - "description" : "用于指定控制节点的系统盘和数据盘使用专属分布式存储,未指定或者值为空时,默认使用EVS云硬盘。" + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”,该值不可修改。", + "default": "v3" }, - "enterpriseProjectId" : { - "type" : "string", - "description" : "集群所属的企业项目ID。" + "metadata": { + "description": "任务元数据。", + "$ref": "#/components/schemas/JobMetadata" }, - "kubeProxyMode" : { - "type" : "string", - "description" : "服务转发模式,支持以下两种实现:" + "spec": { + "description": "任务详细参数。", + "$ref": "#/components/schemas/JobSpec" + }, + "status": { + "description": "任务状态信息。", + "$ref": "#/components/schemas/JobStatus" + } + }, + "description": "", + "type": "object" + }, + "JobStatus": { + "properties": { + "phase": { + "type": "string", + "description": "任务的状态,有如下四种状态:" }, - "clusterExternalIP" : { - "type" : "string", - "description" : "master 弹性公网IP" + "reason": { + "type": "string", + "description": "任务变为当前状态的原因" + } + }, + "description": "", + "type": "object" + }, + "UpgradePath": { + "description": "升级路径", + "properties": { + "version": { + "type": "string", + "description": "集群版本,v1.19及以下集群形如v1.19.16-r20,v1.21及以上形如v1.21,v1.23,详细请参考CCE集群版本号说明。" }, - "alpha.cce/fixPoolMask" : { - "type" : "string", - "description" : "容器网络固定IP池掩码位数,仅vpc-router网络支持。" + "platformVersion": { + "type": "string", + "description": "CCE集群平台版本号,表示集群版本(version)下的内部版本。用于跟踪某一集群版本内的迭代,集群版本内唯一,跨集群版本重新计数。" }, - "decMasterFlavor" : { - "type" : "string", - "description" : "专属CCE集群指定可控制节点的规格。" + "targetVersions": { + "type": "array", + "description": "可升级的目标版本集合", + "items": { + "type": "string", + "description": "可升级的目标版本,如v1.25.1-r0,关于版本号格式请参考CCE集群版本号说明。" + } + } + }, + "type": "object" + }, + "ClusterUpgradePathsResponseBody": { + "description": "集群升级特性开关配置返回体", + "properties": { + "apiVersion": { + "type": "string", + "description": "API版本" }, - "dockerUmaskMode" : { - "type" : "string", - "description" : "集群默认Docker的UmaskMode配置,可取值为secure或normal,不指定时默认为normal。" + "kind": { + "type": "string", + "description": "资源类型" }, - "kubernetes.io/cpuManagerPolicy" : { - "type" : "string", - "description" : "集群CPU管理策略。取值为none(或空值)或static,默认为none(或空值)。" + "metadata": { + "description": "基本信息,为集合类的元素类型,包含一组由不同名称定义的属性", + "$ref": "#/components/schemas/Metadata" }, - "orderID" : { - "type" : "string", - "description" : "订单ID,集群付费类型为自动付费包周期类型时,响应中会返回此字段(仅创建场景涉及)。" + "upgradePaths": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpgradePath" + }, + "description": "升级路径集合" + } + }, + "type": "object" + }, + "PersistentVolumeClaimStatus": { + "properties": { + "accessModes": { + "type": "array", + "description": "显示volume实际具有的访问模式。", + "items": { + "type": "string", + "description": "" + } + }, + "capacity": { + "type": "string", + "description": "底层卷的实际资源" + }, + "phase": { + "type": "string", + "description": "PersistentVolumeClaim当前所处的状态" + } + }, + "description": "", + "type": "object" + }, + "PersistentVolumeClaim": { + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ], + "properties": { + "apiVersion": { + "type": "string", + "description": "API版本,固定值**v1**", + "default": "v1" + }, + "kind": { + "type": "string", + "description": "API类型,固定值**PersistentVolumeClaim**", + "default": "PersistentVolumeClaim" }, - "periodType" : { - "type" : "string", - "description" : "- month:月" + "metadata": { + "description": "metadata是集群对象的元数据定义,是集合类的元素类型,包含一组由不同名称定义的属性。", + "$ref": "#/components/schemas/PersistentVolumeClaimMetadata" + }, + "spec": { + "description": "spec是集合类的元素类型,用户对需要管理的集群对象进行详细描述的主体部分都在spec中给出。系统通过spec的描述来创建或更新对象。", + "$ref": "#/components/schemas/PersistentVolumeClaimSpec" + }, + "status": { + "description": "status是当前PersistentVolumeClaim的状态信息,创建时不需要添加status参数。", + "$ref": "#/components/schemas/PersistentVolumeClaimStatus" + } + }, + "description": "", + "type": "object" + }, + "PersistentVolumeClaimMetadata": { + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "example": "例:my-pvc", + "description": "PersistentVolumeClaim名称,可以包含小写字母、数字、连字符和点,开头和结尾必须是字母或数字,最长253个字符,同一namespace下name不能重复。" + }, + "labels": { + "type": "string", + "description": "PersistentVolumeClaim标签,key/value对格式。" + } + }, + "description": "metadata是集群对象的元数据定义,是集合类的元素类型,包含一组由不同名称定义的属性。", + "type": "object" + }, + "PersistentVolumeClaimSpec": { + "required": [ + "accessModes", + "storageType", + "volumeID" + ], + "properties": { + "volumeID": { + "type": "string", + "description": "资源需为已经存在的存储资源" + }, + "storageType": { + "type": "string", + "description": "云存储的类型,和volumeID搭配使用。即volumeID和storageType必须同时被配置。" + }, + "accessModes": { + "type": "array", + "description": "指定volume应该具有的访问模式,列表中仅第一个配置参数有效。", + "items": { + "type": "string", + "description": "", + "enum": [ + "ReadOnlyMany", + "ReadWriteMany" + ] + } + }, + "storageClassName": { + "type": "string", + "description": "PVC的StorageClass名称" + }, + "volumeName": { + "type": "string", + "description": "PVC绑定的PV名称" + }, + "resources": { + "description": "资源需求和限制", + "$ref": "#/components/schemas/ResourceRequirements" + }, + "volumeMode": { + "type": "string", + "description": "PVC指定的PV类型" + } + }, + "description": "", + "type": "object" + }, + "ResourceRequirements": { + "properties": { + "limits": { + "description": "资源限制,创建时指定无效", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "requests": { + "description": "资源需求,创建时指定无效", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "type": "object" + }, + "CreateUpgradeWorkFlowRequestBody": { + "required": [ + "apiVersion", + "kind", + "spec" + ], + "properties": { + "kind": { + "type": "string", + "pattern": "WorkFlowTask", + "description": "API类型,固定值“WorkFlowTask”,该值不可修改。", + "default": "WorkFlowTask" + }, + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”,该值不可修改。", + "default": "v3", + "pattern": "v3" + }, + "spec": { + "$ref": "#/components/schemas/WorkFlowSpec" + } + }, + "type": "object" + }, + "ReinstallVolumeSpec": { + "description": "服务器重装云硬盘配置", + "properties": { + "imageID": { + "type": "string", + "format": "uuid", + "description": "用户自定义镜像ID" + }, + "cmkID": { + "type": "string", + "description": "用户主密钥ID。默认为空时,表示云硬盘不加密。" + } + }, + "type": "object" + }, + "ReinstallNodeSpec": { + "description": "节点重装配置参数", + "required": [ + "os", + "login" + ], + "properties": { + "os": { + "type": "string", + "description": "操作系统。指定自定义镜像场景将以IMS镜像的实际操作系统版本为准。请选择当前集群支持的操作系统版本,例如EulerOS 2.5、CentOS 7.6、EulerOS 2.8。" + }, + "login": { + "description": "节点的登录方式。密钥对和密码登录方式二者必选其一。", + "$ref": "#/components/schemas/Login" + }, + "name": { + "type": "string", + "description": "节点名称" + }, + "serverConfig": { + "description": "服务器配置", + "$ref": "#/components/schemas/ReinstallServerConfig" + }, + "volumeConfig": { + "description": "卷管理配置", + "$ref": "#/components/schemas/ReinstallVolumeConfig" + }, + "runtimeConfig": { + "description": "容器运行时配置", + "$ref": "#/components/schemas/ReinstallRuntimeConfig" + }, + "k8sOptions": { + "description": "Kubernetes节点配置", + "$ref": "#/components/schemas/ReinstallK8sOptionsConfig" + }, + "lifecycle": { + "description": "节点自定义生命周期配置", + "$ref": "#/components/schemas/NodeLifecycleConfig" + }, + "initializedConditions": { + "type": "array", + "description": "自定义初始化标记。", + "maxItems": 2, + "items": { + "pattern": "^[A-Za-z0-9]+$", + "minLength": 1, + "maxLength": 20, + "type": "string" + } + }, + "extendParam": { + "description": "重装拓展参数,已废弃", + "$ref": "#/components/schemas/ReinstallExtendParam" + }, + "hostnameConfig": { + "$ref": "#/components/schemas/HostnameConfig", + "description": "K8S节点名称配置参数,支持的集群版本为v1.23.6-r0到v1.25或者v1.25.2-r0及以上。" + }, + "securityReinforcementType": { + "type": "string", + "description": "**参数解释**:", + "enum": [ + "null", + "cybersecurity" + ] + } + }, + "type": "object" + }, + "ResetNode": { + "description": "重置节点参数。集群内已有节点通过重置进行重新安装并接入集群。", + "required": [ + "nodeID", + "spec" + ], + "properties": { + "nodeID": { + "type": "string", + "format": "uuid", + "description": "节点ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。" + }, + "spec": { + "description": "节点重装配置参数。节点池内节点不支持外部指定,将以节点池配置进行重装,默认节点池中节点此参数必选。", + "$ref": "#/components/schemas/ReinstallNodeSpec" + } + }, + "type": "object" + }, + "ReinstallRuntimeConfig": { + "description": "节点重装场景容器运行时配置", + "properties": { + "dockerBaseSize": { + "type": "integer", + "format": "int32", + "minimum": 10, + "maximum": 500, + "description": "节点上单容器的可用磁盘空间大小,单位G。" + }, + "runtime": { + "$ref": "#/components/schemas/Runtime", + "description": "容器运行时, 默认场景:" + } + }, + "type": "object" + }, + "NodeLifecycleConfig": { + "description": "节点自定义生命周期配置", + "properties": { + "preInstall": { + "type": "string", + "description": "安装前执行脚本", + "maxLength": 2048 + }, + "postInstall": { + "type": "string", + "description": "安装后执行脚本", + "maxLength": 2048 + } + }, + "type": "object" + }, + "ReinstallServerConfig": { + "description": "节点重装场景服务器配置", + "properties": { + "userTags": { + "type": "array", + "description": "云服务器标签,键必须唯一,CCE支持的最大用户自定义标签数量依region而定,自定义标签数上限为5个。", + "items": { + "$ref": "#/components/schemas/UserTag" + } + }, + "rootVolume": { + "description": "系统盘重装配置", + "$ref": "#/components/schemas/ReinstallVolumeSpec" + } + }, + "type": "object" + }, + "ReinstallK8sOptionsConfig": { + "description": "节点重装场景Kubernetes节点配置", + "properties": { + "labels": { + "type": "object", + "description": "格式为key/value键值对。键值对个数不超过20条。", + "additionalProperties": { + "type": "string", + "maxLength": 63 + } }, - "periodNum" : { - "type" : "integer", - "description" : "订购周期数,取值范围:" + "taints": { + "type": "array", + "description": "支持给创建出来的节点加Taints来设置反亲和性,taints配置不超过20条。每条Taints包含以下3个参数:", + "items": { + "$ref": "#/components/schemas/Taint" + }, + "maxItems": 20 }, - "isAutoRenew" : { - "type" : "string", - "description" : "是否自动续订" + "maxPods": { + "type": "integer", + "format": "int32", + "description": "节点最大允许创建的实例数(Pod),该数量包含系统默认实例,取值范围为16~256。" }, - "isAutoPay" : { - "type" : "string", - "description" : "是否自动扣款" + "nicMultiqueue": { + "type": "string", + "description": "- 弹性网卡队列数配置,默认配置示例如下:" }, - "upgradefrom" : { - "type" : "string", - "description" : "记录集群通过何种升级方式升级到当前版本。" + "nicThreshold": { + "type": "string", + "description": "- 弹性网卡预绑定比例配置,默认配置示例如下:" + } + }, + "type": "object" + }, + "ReinstallVolumeConfig": { + "description": "节点重装场景服务器相关配置", + "properties": { + "lvmConfig": { + "type": "string", + "description": "Docker数据盘配置项。" + }, + "storage": { + "$ref": "#/components/schemas/Storage" + } + }, + "type": "object" + }, + "ResetNodeList": { + "description": "纳管节点参数。满足条件的已有服务器,支持通过纳管节点方式安装并接入集群,重置过程将清理节点上系统盘、数据盘数据,并作为新节点接入Kuberntes集群,请提前备份迁移关键数据。其中节点池内节点重置时不支持外部指定配置,将以节点池配置进行校验并重装,以保证同节点池节点一致性。", + "required": [ + "apiVersion", + "kind", + "nodeList" + ], + "properties": { + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”。" + }, + "kind": { + "type": "string", + "description": "API类型,固定值“List”。" + }, + "nodeList": { + "type": "array", + "description": "重置节点列表", + "items": { + "$ref": "#/components/schemas/ResetNode" + } + } + }, + "type": "object" + }, + "ReinstallExtendParam": { + "description": "重装拓展参数,已废弃。", + "properties": { + "alpha.cce/NodeImageID": { + "type": "string", + "format": "uuid", + "description": "指定待切换目标操作系统所使用的用户镜像ID,已废弃。" + } + }, + "type": "object" + }, + "ClusterUpgradeFeatureGatesResponseBody": { + "description": "集群升级特性开关配置返回体", + "properties": { + "apiVersion": { + "type": "string", + "description": "API版本" + }, + "kind": { + "type": "string", + "description": "资源类型" + }, + "metadata": { + "description": "基本信息,为集合类的元素类型,包含一组由不同名称定义的属性", + "$ref": "#/components/schemas/Metadata" + }, + "upgradeFeatureGates": { + "type": "object", + "description": "特性开关信息,格式为key/value键值对。", + "additionalProperties": { + "type": "string" + } + } + }, + "type": "object" + }, + "CreateImageCacheRequestBody": { + "required": [ + "name", + "images", + "building_config" + ], + "properties": { + "name": { + "type": "string", + "description": "**参数解释:**", + "example": "test-imagecache1", + "minLength": 1, + "maxLength": 128, + "pattern": "^[a-z]([a-z0-9-]*[a-z0-9])?$" + }, + "images": { + "type": "array", + "description": "镜像缓存中的容器镜像列表。", + "items": { + "type": "string", + "description": "**参数解释:**", + "minLength": 1, + "maxLength": 1024 + }, + "maxItems": 20, + "minItems": 1, + "example": [ + "swr.region.com/test/nginx:v1", + "busybox:latest" + ] + }, + "image_cache_size": { + "type": "integer", + "format": "int32", + "description": "**参数解释:**", + "default": 20, + "example": 25, + "minimum": 20, + "maximum": 400 + }, + "retention_days": { + "type": "integer", + "format": "int32", + "description": "**参数解释:**", + "minimum": 0, + "maximum": 10000, + "default": 0, + "example": 7 + }, + "building_config": { + "description": "构建镜像缓存的配置信息。", + "$ref": "#/components/schemas/ImageCacheBuildingConfig" + } + }, + "description": "创建镜像缓存-respuest结构体。", + "type": "object" + }, + "CreateImageCacheResponseBody": { + "required": [ + "image_cache" + ], + "properties": { + "image_cache": { + "description": "镜像缓存信息。", + "$ref": "#/components/schemas/ImageCacheDetail" + } + }, + "description": "创建镜像缓存-response结构体。", + "type": "object" + }, + "QuotaResp": { + "required": [ + "quotas" + ], + "properties": { + "quotas": { + "type": "object", + "description": "模板配额", + "properties": { + "resources": { + "type": "array", + "description": "资源", + "items": { + "properties": { + "type": { + "type": "string", + "description": "类型", + "example": "Charts" + }, + "quota": { + "type": "integer", + "description": "配额", + "example": 200 + }, + "used": { + "type": "integer", + "description": "已使用量", + "example": 2 + } + } + } + } + } } }, - "type" : "object" + "description": "quota of charts", + "type": "object" }, - "AlarmInfo" : { - "type" : "object", - "description" : "**参数解释:**", - "required" : [ "topics" ], - "properties" : { - "topics" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "description" : "**参数解释:**" - }, - "alarmRuleTemplateId" : { - "type" : "string", - "description" : "**参数解释:**" + "ClusterLogConfig": { + "type": "object", + "properties": { + "ttl_in_days": { + "type": "integer", + "format": "int32", + "example": 7, + "description": "存储时长" }, - "promInstanceID" : { - "type" : "string", - "description" : "**参数解释:**" - }, - "promEnterpriseProjectID" : { - "type" : "string", - "description" : "**参数解释:**" + "log_configs": { + "items": { + "properties": { + "name": { + "type": "string", + "example": "audit", + "description": "日志类型" + }, + "enable": { + "type": "boolean", + "example": false, + "description": "是否采集" + }, + "type": { + "type": "string", + "description": "组件类型" + } + } + }, + "type": "array", + "description": "日志配置项" } } }, - "MasterSpec" : { - "properties" : { - "availabilityZone" : { - "type" : "string", - "description" : "可用区" - } - }, - "description" : "master的配置,支持指定可用区、规格和故障域。若指定故障域,则必须所有master节点都需要指定故障字段。", - "type" : "object" - }, - "EniNetwork" : { - "required" : [ "eniSubnetId", "subnets" ], - "properties" : { - "eniSubnetId" : { - "type" : "string", - "description" : "ENI所在子网的IPv4子网ID(暂不支持IPv6,废弃中)。获取方法如下:", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + "PrecheckClusterTaskResponseBody": { + "properties": { + "apiVersion": { + "type": "string", + "description": "api版本,默认为v3" }, - "eniSubnetCIDR" : { - "type" : "string", - "description" : "ENI子网CIDR(废弃中)" + "kind": { + "type": "string", + "description": "资源类型,默认为PreCheckTask" }, - "subnets" : { - "type" : "array", - "description" : "IPv4子网ID列表", - "items" : { - "description" : "IPv4子网ID", - "$ref" : "#/components/schemas/NetworkSubnet" - } - } - }, - "description" : "ENI网络配置,创建集群指定使用云原生网络2.0网络模式时必填subnets和eniSubnetId其中一个字段(eniSubnetCIDR可选,若填写了会校验是否合法),1.19.10及新版本集群使用subnets字段,1.19.8及老版本若使用subnets字段,则取值subnets数组中的第一个子网ID作为容器地址使用的子网ID。", - "type" : "object" - }, - "ResourceTag" : { - "properties" : { - "key" : { - "type" : "string", - "description" : "Key值。", - "minLength" : 1, - "maxLength" : 128 + "metadata": { + "description": "升级前检查任务元数据信息", + "$ref": "#/components/schemas/PrecheckTaskMetadata" }, - "value" : { - "type" : "string", - "description" : "Value值。", - "maxLength" : 255 - } - }, - "description" : "CCE资源标签", - "type" : "object" - }, - "ServiceNetwork" : { - "properties" : { - "IPv4CIDR" : { - "type" : "string", - "description" : "kubernetes clusterIP IPv4 CIDR取值范围。创建集群时若未传参,默认为\"10.247.0.0/16\"。" + "spec": { + "description": "升级前检查任务信息", + "$ref": "#/components/schemas/PrecheckSpec" + }, + "status": { + "description": "升级前检查任务状态", + "$ref": "#/components/schemas/PrecheckStatus" } }, - "type" : "object" + "type": "object" }, - "ClusterOps" : { - "type" : "object", - "description" : "**参数解释:**", - "properties" : { - "alarm" : { - "type" : "object", - "description" : "**参数解释:**", - "$ref" : "#/components/schemas/AlarmInfo" + "Context": { + "properties": { + "cluster": { + "type": "string", + "description": "上下文cluster信息。" + }, + "user": { + "type": "string", + "description": "上下文user信息。" } }, - "required" : [ "alarm" ] + "type": "object" }, - "PackageConfiguration" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "description" : "组件名称" + "ClusterCert": { + "properties": { + "server": { + "type": "string", + "description": "服务器地址。" }, - "configurations" : { - "type" : "array", - "description" : "组件配置项", - "items" : { - "$ref" : "#/components/schemas/ConfigurationItem" - } + "certificate-authority-data": { + "type": "string", + "description": "证书授权数据。" + }, + "insecure-skip-tls-verify": { + "type": "boolean", + "description": "不校验服务端证书,在 cluster 类型为 externalCluster 时,该值为 true。" } - } + }, + "type": "object" }, - "ClusterStatus" : { - "properties" : { - "phase" : { - "type" : "string", - "description" : "集群状态,取值如下" + "ClusterCertResponseBody": { + "properties": { + "kind": { + "type": "string", + "description": "API类型,固定值“Config”,该值不可修改。", + "default": "Config" }, - "jobID" : { - "type" : "string", - "description" : "任务ID,集群当前状态关联的任务ID。当前支持:" + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v1”。" }, - "reason" : { - "type" : "string", - "description" : "集群变为当前状态的原因,在集群在非“Available”状态下时,会返回此参数。" + "preferences": { + "type": "object", + "description": "当前未使用该字段,当前默认为空。" }, - "message" : { - "type" : "string", - "description" : "集群变为当前状态的原因的详细信息,在集群在非“Available”状态下时,会返回此参数。" - }, - "endpoints" : { - "description" : "集群中 kube-apiserver 的访问地址。", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ClusterEndpoints" + "clusters": { + "type": "array", + "description": "集群列表。", + "items": { + "$ref": "#/components/schemas/Clusters" } }, - "isLocked" : { - "type" : "boolean", - "description" : "CBC资源锁定" - }, - "lockScene" : { - "type" : "string", - "description" : "CBC资源锁定场景" - }, - "lockSource" : { - "type" : "string", - "description" : "锁定资源" - }, - "lockSourceId" : { - "type" : "string", - "description" : "锁定的资源ID" + "users": { + "type": "array", + "description": "存放了指定用户的一些证书信息和ClientKey信息。", + "items": { + "$ref": "#/components/schemas/Users" + } }, - "deleteOption" : { - "type" : "object", - "description" : "删除配置状态(仅删除请求响应包含)" + "contexts": { + "type": "array", + "description": "上下文列表。", + "items": { + "$ref": "#/components/schemas/Contexts" + } }, - "deleteStatus" : { - "type" : "object", - "description" : "删除状态信息(仅删除请求响应包含)" + "current-context": { + "type": "string", + "description": "当前上下文,若存在publicIp(虚拟机弹性IP)时为 external; 若不存在publicIp为 internal。" } }, - "description" : "", - "type" : "object" + "type": "object" }, - "NetworkSubnet" : { - "required" : [ "subnetID" ], - "properties" : { - "subnetID" : { - "type" : "string", - "description" : "用于创建控制节点的subnet的IPv4子网ID(暂不支持IPv6)。获取方法如下:", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + "User": { + "properties": { + "client-certificate-data": { + "type": "string", + "description": "客户端证书。" + }, + "client-key-data": { + "type": "string", + "description": "包含来自TLS客户端密钥文件的PEM编码数据。" } }, - "description" : "ENI网络配置,创建集群指定subnets字段使用时必填。", - "type" : "object" + "type": "object" }, - "ConfigurationItem" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "description" : "组件配置项名称" + "Users": { + "properties": { + "name": { + "type": "string", + "description": "当前为固定值“user“。" }, - "value" : { - "type" : "object", - "description" : "组件配置项值", - "properties" : { } + "user": { + "description": "存放了指定用户的一些证书信息和ClientKey信息。", + "$ref": "#/components/schemas/User" } - } + }, + "type": "object" }, - "ContainerNetwork" : { - "required" : [ "mode" ], - "properties" : { - "mode" : { - "type" : "string", - "description" : "容器网络类型(只可选择其一)", - "minLength" : 0, - "maxLength" : 64, - "enum" : [ "overlay_l2", "vpc-router", "eni" ] - }, - "cidr" : { - "type" : "string", - "description" : "容器网络网段,建议使用网段10.0.0.0/12~19,172.16.0.0/16~19,192.168.0.0/16~19,如存在网段冲突,将会报错。", - "minLength" : 0, - "maxLength" : 64 - }, - "cidrs" : { - "type" : "array", - "description" : "容器网络网段列表。1.21及新版本集群使用cidrs字段,当集群网络类型为vpc-router类型时,支持多个容器网段,最多配置20个;1.21之前版本若使用cidrs字段,则取值cidrs数组中的第一个cidr元素作为容器网络网段地址。", - "items" : { - "description" : "容器网络网段", - "$ref" : "#/components/schemas/ContainerCIDR" - }, - "maxItems" : 20 + "Contexts": { + "properties": { + "name": { + "type": "string", + "description": "上下文的名称。" + }, + "context": { + "description": "上下文信息。", + "$ref": "#/components/schemas/Context" } }, - "description" : "Container network parameters.", - "type" : "object" + "type": "object" }, - "Cluster" : { - "required" : [ "apiVersion", "kind", "metadata", "spec" ], - "properties" : { - "kind" : { - "type" : "string", - "description" : "API类型,固定值“Cluster”或“cluster”,该值不可修改。", - "default" : "Cluster" - }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”,该值不可修改。", - "default" : "v3" - }, - "metadata" : { - "description" : "集群的基本信息,为集合类的元素类型,包含一组由不同名称定义的属性。", - "$ref" : "#/components/schemas/ClusterMetadata" + "Clusters": { + "properties": { + "name": { + "type": "string", + "description": "集群名字。" }, - "spec" : { - "description" : "spec是集合类的元素类型,您对需要管理的集群对象进行详细描述的主体部分都在spec中给出。CCE通过spec的描述来创建或更新对象。", - "$ref" : "#/components/schemas/ClusterSpec" - }, - "status" : { - "description" : "集合类的元素类型,用于记录对象在系统中的当前状态信息,包含了集群状态和本次创建集群作业的jobID", - "$ref" : "#/components/schemas/ClusterStatus" - } - }, - "description" : "", - "type" : "object" - }, - "ClusterList" : { - "required" : [ "apiVersion", "items", "kind" ], - "properties" : { - "kind" : { - "type" : "string", - "description" : "Api type", - "minLength" : 6, - "maxLength" : 10, - "default" : "Cluster" - }, - "apiVersion" : { - "type" : "string", - "description" : "API version", - "minLength" : 2, - "maxLength" : 5, - "default" : "v3" - }, - "items" : { - "type" : "array", - "description" : "集群对象列表,包含了当前项目下所有集群的详细信息。您可通过items.metadata.name下的值来找到对应的集群。", - "items" : { - "description" : "", - "$ref" : "#/components/schemas/Cluster" - } - } - }, - "description" : "", - "type" : "object" - }, - "ClusterEndpoints" : { - "properties" : { - "url" : { - "type" : "string", - "description" : "集群中 kube-apiserver 的访问地址" - }, - "type" : { - "type" : "string", - "description" : "集群访问地址的类型" - } - }, - "type" : "object" - }, - "EncryptionConfig" : { - "properties" : { - "mode" : { - "type" : "string", - "description" : "**参数解释**:", - "enum" : [ "Default", "KMS" ], - "example" : "KMS" - }, - "kmsKeyID" : { - "type" : "string", - "description" : "**参数解释**:", - "example" : "c8e90454-62ed-4588-b1c1-bbb6d405fb71" - } - }, - "type" : "object" - }, - "CustomSan" : { - "type" : "object", - "description" : "集群的API Server服务端证书中的自定义SAN(Subject Alternative Name)字段,遵从SSL标准X509定义的格式规范。", - "items" : { - "type" : "string", - "description" : "", - "maxLength" : 255, - "minLength" : 0 - }, - "maxItems" : 128, - "minItems" : 0 - }, - "AuthenticatingProxy" : { - "properties" : { - "ca" : { - "type" : "string", - "description" : "authenticating_proxy模式配置的x509格式CA证书(base64编码)。当集群认证模式为authenticating_proxy时,此项必须填写。" - }, - "cert" : { - "type" : "string", - "description" : "authenticating_proxy模式配置的x509格式CA证书签发的客户端证书,用于kube-apiserver到扩展apiserver的认证。(base64编码)。当集群认证模式为authenticating_proxy时,此项必须填写。" - }, - "privateKey" : { - "type" : "string", - "description" : "authenticating_proxy模式配置的x509格式CA证书签发的客户端证书时对应的私钥,用于kube-apiserver到扩展apiserver的认证。Kubernetes集群使用的私钥尚不支持密码加密,请使用未加密的私钥。(base64编码)。当集群认证模式为authenticating_proxy时,此项必须填写。" + "cluster": { + "description": "集群信息。", + "$ref": "#/components/schemas/ClusterCert" } - }, - "description" : "authenticatingProxy模式相关配置。认证模式为authenticating_proxy时必选", - "type" : "object" - }, - "HostNetwork" : { - "required" : [ "subnet", "vpc" ], - "properties" : { - "vpc" : { - "type" : "string", - "description" : "用于创建控制节点的VPC的ID。", - "minLength" : 0, - "maxLength" : 64 - }, - "subnet" : { - "type" : "string", - "description" : "用于创建控制节点的subnet的网络ID。获取方法如下:", - "minLength" : 0, - "maxLength" : 64 - }, - "SecurityGroup" : { - "type" : "string", - "description" : "集群默认的Node节点安全组ID,不指定该字段系统将自动为用户创建默认Node节点安全组,指定该字段时集群将绑定指定的安全组。Node节点安全组需要放通部分端口来保证正常通信。详细设置请参考[集群安全组规则配置](https://support.huaweicloud.com/cce_faq/cce_faq_00265.html)。" - } - }, - "description" : "Node network parameters.", - "type" : "object" - }, - "ClusterMetadata" : { - "required" : [ "name" ], - "properties" : { - "name" : { - "type" : "string", - "description" : "集群名称。", - "minLength" : 4, - "maxLength" : 128 - }, - "uid" : { - "type" : "string", - "description" : "集群ID,资源唯一标识,创建成功后自动生成,填写无效。在创建包周期集群时,响应体不返回集群ID。", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - }, - "alias" : { - "type" : "string", - "description" : "集群显示名,用于在 CCE 界面显示,该名称创建后可修改。", - "minLength" : 4, - "maxLength" : 128 - }, - "annotations" : { - "type" : "object", - "description" : "集群注解,由key/value组成:", - "additionalProperties" : { - "type" : "string", - "description" : "" - } - }, - "labels" : { - "type" : "object", - "description" : "集群标签,key/value对格式。", - "additionalProperties" : { - "type" : "string", - "description" : "" - } - }, - "creationTimestamp" : { - "type" : "string", - "description" : "集群创建时间" - }, - "updateTimestamp" : { - "type" : "string", - "description" : "集群更新时间" - } - }, - "description" : "可以通过 annotations[\"cluster.install.addons/install\"] 来指定创建集群时需要安装的插件,格式形如", - "type" : "object" - }, - "ContainerCIDR" : { - "required" : [ "cidr" ], - "properties" : { - "cidr" : { - "type" : "string", - "description" : "容器网络网段,建议使用网段10.0.0.0/12~19,172.16.0.0/16~19,192.168.0.0/16~19。" - } - }, - "description" : "容器网络网段,指定cidrs字段使用时必填。", - "type" : "object" - }, - "Authentication" : { - "properties" : { - "mode" : { - "type" : "string", - "description" : "集群认证模式。" - }, - "authenticatingProxy" : { - "description" : "authenticatingProxy模式相关配置。认证模式为authenticating_proxy时必选。", - "$ref" : "#/components/schemas/AuthenticatingProxy" - } - }, - "description" : "", - "type" : "object" - }, - "LockNodeScaledownRequestBody" : { - "required" : [ "apiVersion", "kind" ], - "properties" : { - "apiVersion" : { - "type" : "string", - "description" : "**参数解释**:" - }, - "kind" : { - "type" : "string", - "description" : "**参数解释**:" - }, - "nodeList" : { - "type" : "array", - "description" : "**参数解释**:", - "items" : { - "type" : "string" - }, - "minItems" : 0, - "maxItems" : 50 + }, + "type": "object" + }, + "CertDuration": { + "required": [ + "duration" + ], + "properties": { + "duration": { + "type": "integer", + "format": "int32", + "description": "集群证书有效时间,单位为天,最小值为1,最大值为1825(5*365,1年固定计365天,忽略闰年影响);若填-1则为最大值5年。", + "minimum": 1, + "maximum": 1825 } }, - "type" : "object" + "description": "集群证书有效期", + "type": "object" }, - "PartitionList" : { - "type" : "object", - "properties" : { - "kind" : { - "type" : "string", - "example" : "List", - "description" : "资源类型" + "PartitionReqBody": { + "type": "object", + "description": "集群分区信息", + "properties": { + "kind": { + "type": "string", + "example": "Partition", + "description": "资源类型" }, - "apiVersion" : { - "type" : "string", - "example" : "v3", - "description" : "API版本" + "apiVersion": { + "type": "string", + "example": "v3", + "description": "API版本" }, - "items" : { - "items" : { - "$ref" : "#/components/schemas/Partition" - }, - "type" : "array" - } - } - }, - "Partition" : { - "type" : "object", - "description" : "集群分区信息", - "properties" : { - "kind" : { - "type" : "string", - "example" : "Partition", - "description" : "资源类型" - }, - "apiVersion" : { - "type" : "string", - "example" : "v3", - "description" : "API版本" - }, - "metadata" : { - "description" : "分区的元数据信息", - "properties" : { - "name" : { - "type" : "string", - "example" : "partitionName", - "description" : "分区名称" - }, - "creationTimestamp" : { - "type" : "string", - "example" : "2000-1-1 00:00:35.451967 +0000 UTC", - "description" : "创建时间" - } - } - }, - "spec" : { - "description" : "分区的配置信息", - "properties" : { - "hostNetwork" : { - "description" : "分区子网", - "properties" : { - "subnetID" : { - "type" : "string", - "example" : "subnetID", - "description" : "子网ID" + "metadata": { + "description": "分区的元数据信息", + "properties": { + "name": { + "type": "string", + "example": "partitionName", + "description": "分区名称" + } + } + }, + "spec": { + "description": "分区的配置信息", + "properties": { + "hostNetwork": { + "description": "分区子网", + "properties": { + "subnetID": { + "type": "string", + "example": "subnetID", + "description": "子网ID" } } }, - "containerNetwork" : { - "items" : { - "properties" : { - "subnetID" : { - "type" : "string", - "example" : "subnetID", - "description" : "子网ID" + "containerNetwork": { + "items": { + "properties": { + "subnetID": { + "type": "string", + "example": "subnetID", + "description": "子网ID" } } }, - "description" : "分区容器子网", - "type" : "array" + "description": "分区容器子网", + "type": "array" }, - "publicBorderGroup" : { - "type" : "string", - "example" : "publicBorderGroup", - "description" : "群组" + "publicBorderGroup": { + "type": "string", + "example": "publicBorderGroup", + "description": "群组" }, - "category" : { - "type" : "string", - "example" : "category", - "description" : "类别" + "category": { + "type": "string", + "example": "category", + "description": "类别" } } } } }, - "resourceSelector" : { - "description" : "资源标签选择器,匹配Kubernetes中node资源", - "required" : [ "key", "operator" ], - "properties" : { - "key" : { - "type" : "string", - "description" : "标签键值,取值如下", - "enum" : [ "node.uid" ] - }, - "values" : { - "type" : "array", - "description" : "标签值列表", - "items" : { - "type" : "string", - "description" : "标签值" - } - }, - "operator" : { - "type" : "string", - "description" : "标签逻辑运算符,当前支持如下取值", - "enum" : [ "In" ] - } - }, - "type" : "object" - }, - "addonCheckStatus" : { - "description" : "插件限制检查状态", - "properties" : { - "phase" : { - "description" : "状态,取值如下", - "type" : "string" - }, - "itemsStatus" : { - "type" : "array", - "description" : "检查项状态集合", - "items" : { - "$ref" : "#/components/schemas/PreCheckItemStatus" - } + "ClusterConfigurationsSpec": { + "description": "Configuration的规格信息", + "required": [ + "packages" + ], + "properties": { + "packages": { + "type": "array", + "items": { + "properties": { + "name": { + "type": "string", + "description": "组件名称" + }, + "configurations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConfigurationItem" + }, + "description": "组件配置项详情" + } + } + }, + "description": "组件配置项列表" } }, - "type" : "object" + "type": "object" }, - "addonRisks" : { - "description" : "节点风险来源", - "properties" : { - "addonTemplateName" : { - "type" : "string", - "description" : "插件模板名称" + "ClusterConfigRespBody": { + "description": "获取指定集群配置参数内容返回体", + "properties": { + "apiVersion": { + "type": "string", + "description": "API版本" }, - "alias" : { - "type" : "string", - "description" : "插件别名" - } - }, - "type" : "object" - }, - "skippedCheckItemList" : { - "properties" : { - "name" : { - "type" : "string", - "description" : "跳过的检查项名称" + "kind": { + "type": "string", + "description": "API类型,固定值**Configuration**" }, - "resourceSelector" : { - "description" : "资源标签选择器,仅节点检查涉及该参数,集群检查和插件检查不涉及。", - "$ref" : "#/components/schemas/resourceSelector" - } - }, - "type" : "object" - }, - "PrecheckTaskMetadata" : { - "description" : "升级前检查任务元数据", - "properties" : { - "uid" : { - "type" : "string", - "description" : "任务ID" + "metadata": { + "description": "Configuration的元数据信息", + "$ref": "#/components/schemas/ConfigurationMetadata" }, - "creationTimestamp" : { - "type" : "string", - "description" : "任务创建时间" + "spec": { + "description": "Configuration的规格信息", + "$ref": "#/components/schemas/ClusterConfigurationsSpec" }, - "updateTimestamp" : { - "type" : "string", - "description" : "任务更新时间" - } - }, - "type" : "object" - }, - "nodeRisks" : { - "description" : "节点风险来源", - "properties" : { - "NodeID" : { - "type" : "string", - "description" : "用户节点ID" + "status": { + "description": "Configuration的状态信息", + "type": "object" } }, - "type" : "object" + "type": "object" }, - "clusterCheckStatus" : { - "description" : "集群限制检查状态", - "properties" : { - "phase" : { - "description" : "状态,取值如下", - "type" : "string" + "ConfigurationMetadata": { + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "Configuration名称" }, - "itemsStatus" : { - "type" : "array", - "description" : "检查项状态集合", - "items" : { - "$ref" : "#/components/schemas/PreCheckItemStatus" + "labels": { + "type": "object", + "description": "Configuration标签,key/value对格式。", + "additionalProperties": { + "type": "string", + "description": "" } } }, - "type" : "object" + "description": "metadata字段数据结构说明", + "type": "object" }, - "NodeInfo" : { - "description" : "节点检查状态", - "properties" : { - "uid" : { - "description" : "节点UID", - "type" : "string" - }, - "name" : { - "description" : "节点名称", - "type" : "string" - }, - "status" : { - "description" : "状态", - "type" : "string" - }, - "nodeType" : { - "description" : "节点类型", - "type" : "string" + "UpgradeCluserResponseMetadata": { + "description": "升级任务元数据", + "properties": { + "uid": { + "description": "升级任务ID,可通过调用获取集群升级任务详情API查询进展", + "type": "string" } }, - "type" : "object" + "type": "object" }, - "PrecheckStatus" : { - "description" : "升级前检查状态", - "properties" : { - "phase" : { - "description" : "状态,取值如下", - "type" : "string" + "ClusterUpgradeAction": { + "required": [ + "strategy", + "targetVersion" + ], + "properties": { + "addons": { + "description": "插件配置列表", + "type": "array", + "items": { + "$ref": "#/components/schemas/UpgradeAddonConfig" + } }, - "expireTimeStamp" : { - "description" : "检查结果过期时间", - "type" : "string" + "nodeOrder": { + "description": "节点池内节点升级顺序配置。", + "type": "object", + "additionalProperties": { + "description": "对应节点池内的节点升级顺序配置", + "type": "array", + "items": { + "$ref": "#/components/schemas/NodePriority" + } + } }, - "message" : { - "description" : "信息,一般是执行错误的日志信息", - "type" : "string" + "nodePoolOrder": { + "description": "节点池升级顺序配置,key/value对格式。", + "type": "object", + "additionalProperties": { + "type": "integer", + "default": 0, + "description": "节点池的优先级,默认值为0,优先级最低,数值越大优先级越高" + } }, - "clusterCheckStatus" : { - "description" : "集群限制检查状态", - "$ref" : "#/components/schemas/clusterCheckStatus" + "strategy": { + "description": "升级策略", + "$ref": "#/components/schemas/UpgradeStrategy" }, - "addonCheckStatus" : { - "description" : "插件检查状态", - "$ref" : "#/components/schemas/addonCheckStatus" + "targetVersion": { + "description": "目标集群版本,例如\"v1.23\"", + "type": "string" }, - "nodeCheckStatus" : { - "description" : "节点检查状态", - "$ref" : "#/components/schemas/nodeCheckStatus" + "isOnlyUpgrade": { + "description": "是否在集群升级流程中执行升级前检查。默认为false,表示会执行升级前检查,如果您在集群升级编排中调用了升级前检查的API,则升级时可用将该字段置为false,不再额外执行一次检查", + "type": "boolean" } }, - "type" : "object" + "type": "object" }, - "NodeStageStatus" : { - "description" : "节点检查状态", - "properties" : { - "nodeInfo" : { - "description" : "节点信息", - "$ref" : "#/components/schemas/NodeInfo", - "type" : "string" - }, - "itemsStatus" : { - "type" : "array", - "description" : "检查项状态集合", - "items" : { - "$ref" : "#/components/schemas/PreCheckItemStatus" - } + "UpgradeResponseSpec": { + "description": "升级任务元数据", + "properties": { + "clusterUpgradeAction": { + "description": "集群升级配置", + "$ref": "#/components/schemas/ClusterUpgradeResponseAction" } }, - "type" : "object" + "type": "object" }, - "riskSource" : { - "description" : "风险项来源", - "properties" : { - "configurationRisks" : { - "type" : "array", - "description" : "配置风险项", - "items" : { - "$ref" : "#/components/schemas/configurationRisks" - } + "UpgradeAddonConfig": { + "required": [ + "addonTemplateName", + "operation", + "version" + ], + "properties": { + "addonTemplateName": { + "description": "插件名称", + "type": "string" }, - "deprecatedAPIRisks" : { - "type" : "array", - "description" : "废弃API风险", - "items" : { - "$ref" : "#/components/schemas/deprecatedAPIRisks" - } + "operation": { + "description": "执行动作,当前升级场景支持操作为\"patch\"", + "type": "string" }, - "nodeRisks" : { - "type" : "array", - "description" : "节点风险", - "items" : { - "$ref" : "#/components/schemas/nodeRisks" - } + "version": { + "description": "目标插件版本号", + "type": "string" }, - "addonRisks" : { - "type" : "array", - "description" : "插件风险", - "items" : { - "$ref" : "#/components/schemas/addonRisks" - } + "values": { + "type": "object", + "description": "插件参数列表,Key:Value格式" } }, - "type" : "object" + "type": "object" }, - "PrecheckClusterTask" : { - "properties" : { - "apiVersion" : { - "type" : "string", - "description" : "api版本,默认为v3" - }, - "kind" : { - "type" : "string", - "description" : "资源类型,默认为PreCheckTask" + "ClusterUpgradeResponseAction": { + "properties": { + "version": { + "description": "当前集群版本", + "type": "string" }, - "metadata" : { - "description" : "升级前检查任务元数据信息", - "$ref" : "#/components/schemas/PrecheckTaskMetadata" + "targetVersion": { + "description": "目标集群版本,例如\"v1.23\"", + "type": "string" }, - "spec" : { - "description" : "升级前检查任务信息", - "$ref" : "#/components/schemas/PrecheckSpec" + "targetPlatformVersion": { + "description": "目标集群的平台版本号,表示集群版本(version)下的内部版本,不支持用户指定。", + "type": "string" }, - "status" : { - "description" : "升级前检查任务状态", - "$ref" : "#/components/schemas/PrecheckStatus" + "strategy": { + "description": "升级策略", + "$ref": "#/components/schemas/UpgradeStrategy" + }, + "config": { + "description": "升级过程中指定的集群配置", + "type": "object" } }, - "type" : "object" + "type": "object" }, - "PreCheckItemStatus" : { - "description" : "检查项状态信息", - "properties" : { - "name" : { - "type" : "string", - "description" : "检查项名称" - }, - "kind" : { - "type" : "string", - "description" : "检查项类型,取值如下" - }, - "group" : { - "type" : "string", - "description" : "检查项分组,取值如下" + "UpgradeClusterResponseBody": { + "description": "原地升级配置", + "properties": { + "metadata": { + "description": "升级任务元数据信息", + "$ref": "#/components/schemas/UpgradeCluserResponseMetadata" }, - "level" : { - "type" : "string", - "description" : "检查项风险级别,取值如下" - }, - "phase" : { - "description" : "状态,取值如下", - "type" : "string" - }, - "message" : { - "type" : "string", - "description" : "提示信息" - }, - "riskSource" : { - "description" : "风险项", - "$ref" : "#/components/schemas/riskSource" - }, - "errorCodes" : { - "type" : "array", - "description" : "错误码集合", - "items" : { - "type" : "string", - "description" : "错误码" - } + "spec": { + "description": "升级配置信息", + "$ref": "#/components/schemas/UpgradeResponseSpec" } }, - "type" : "object" + "type": "object" }, - "deprecatedAPIRisks" : { - "description" : "废弃API风险来源", - "properties" : { - "url" : { - "type" : "string", - "description" : "请求路径,如/apis/policy/v1beta1/podsecuritypolicies" + "UpgradeClusterRequestMetadata": { + "required": [ + "apiVersion", + "kind" + ], + "properties": { + "apiVersion": { + "type": "string", + "description": "api版本,默认为v3" }, - "userAgent" : { - "type" : "string", - "description" : "客户端信息" + "kind": { + "type": "string", + "description": "资源类型,默认为UpgradeTask" } }, - "type" : "object" + "type": "object" }, - "PrecheckClusterTaskListResponseBody" : { - "properties" : { - "apiVersion" : { - "type" : "string", - "description" : "api版本,默认为v3" - }, - "kind" : { - "type" : "string", - "description" : "类型" - }, - "metadata" : { - "description" : "基本信息,为集合类的元素类型,包含一组由不同名称定义的属性", - "$ref" : "#/components/schemas/Metadata" - }, - "items" : { - "type" : "array", - "description" : "集群检查任务列表", - "items" : { - "$ref" : "#/components/schemas/PrecheckClusterTask" - } + "UpgradeSpec": { + "properties": { + "clusterUpgradeAction": { + "description": "集群升级配置", + "$ref": "#/components/schemas/ClusterUpgradeAction" } }, - "type" : "object" + "type": "object" }, - "PrecheckSpec" : { - "properties" : { - "clusterID" : { - "type" : "string", - "description" : "集群ID" - }, - "clusterVersion" : { - "type" : "string", - "description" : "集群版本" + "NodePriority": { + "required": [ + "nodeSelector", + "priority" + ], + "description": "节点优先级批量配置", + "properties": { + "nodeSelector": { + "description": "节点标签选择器,选择一批节点", + "$ref": "#/components/schemas/NodeSelector" }, - "targetVersion" : { - "type" : "string", - "description" : "升级目标版本" - }, - "skippedCheckItemList" : { - "type" : "array", - "description" : "跳过检查的项目列表", - "items" : { - "$ref" : "#/components/schemas/skippedCheckItemList" - } + "priority": { + "type": "integer", + "default": 0, + "description": "该批次节点的优先级,默认值为0,优先级最低,数值越大优先级越高" } }, - "type" : "object" + "type": "object" }, - "nodeCheckStatus" : { - "description" : "节点限制检查状态", - "properties" : { - "phase" : { - "description" : "状态,取值如下", - "type" : "string" + "UpgradeClusterRequestBody": { + "required": [ + "metadata", + "spec" + ], + "properties": { + "metadata": { + "description": "升级元数据", + "$ref": "#/components/schemas/UpgradeClusterRequestMetadata" }, - "nodeStageStatus" : { - "type" : "array", - "description" : "节点检查状态", - "items" : { - "$ref" : "#/components/schemas/NodeStageStatus" - } + "spec": { + "description": "升级配置信息", + "$ref": "#/components/schemas/UpgradeSpec" } }, - "type" : "object" + "type": "object" }, - "configurationRisks" : { - "description" : "配置风险项来源", - "properties" : { - "package" : { - "type" : "string", - "description" : "组件名称" - }, - "sourceFile" : { - "type" : "string", - "description" : "涉及文件路径" - }, - "nodeMsg" : { - "type" : "string", - "description" : "节点信息" - }, - "field" : { - "type" : "string", - "description" : "参数值" + "NodeSelector": { + "description": "节点标签选择器,匹配Kubernetes中nodeSelector相关约束", + "required": [ + "key", + "operator" + ], + "properties": { + "key": { + "type": "string", + "description": "标签键" }, - "operation" : { - "type" : "string", - "description" : "修改操作类型" + "value": { + "type": "array", + "description": "标签值列表", + "items": { + "type": "string", + "description": "标签值" + } }, - "originalValue" : { - "type" : "string", - "description" : "原始值" + "operator": { + "type": "string", + "description": "标签逻辑运算符" + } + }, + "type": "object" + }, + "InPlaceRollingUpdate": { + "description": "原地升级配置", + "properties": { + "userDefinedStep": { + "type": "integer", + "description": "节点升级步长,取值范围为[1, 40],建议取值20" + } + }, + "type": "object" + }, + "UpgradeStrategy": { + "required": [ + "type" + ], + "description": "升级配置", + "properties": { + "type": { + "description": "升级策略类型,当前仅支持原地升级类型\"inPlaceRollingUpdate\"", + "type": "string" }, - "value" : { - "type" : "string", - "description" : "当前值" + "inPlaceRollingUpdate": { + "description": "原地升级配置,指定原地升级策略类型时必选。", + "$ref": "#/components/schemas/InPlaceRollingUpdate" } }, - "type" : "object" + "type": "object" }, - "GetImageCacheResponseBody" : { - "required" : [ "image_cache" ], - "properties" : { - "image_cache" : { - "description" : "镜像缓存信息。", - "$ref" : "#/components/schemas/ImageCacheDetail" + "DomainQuotaResponse": { + "properties": { + "quotas": { + "type": "array", + "description": "资源", + "items": { + "$ref": "#/components/schemas/QuotaResource" + } + } + }, + "type": "object" + }, + "QuotaResource": { + "properties": { + "quotaKey": { + "type": "string", + "description": "资源类型" + }, + "quotaLimit": { + "type": "integer", + "format": "int32", + "description": "配额值" + }, + "used": { + "type": "integer", + "format": "int32", + "description": "已创建的资源个数" + }, + "unit": { + "type": "string", + "description": "单位" + }, + "regionId": { + "type": "string", + "description": "局点ID。若资源不涉及此参数,则不返回该参数。" + }, + "availabilityZoneId": { + "type": "string", + "description": "可用区ID。若资源不涉及此参数,则不返回该参数。" } }, - "description" : "查询镜像缓存-response结构体。", - "type" : "object" + "type": "object" }, - "AddonInstanceRollbackRequest" : { - "required" : [ "clusterID" ], - "properties" : { - "clusterID" : { - "type" : "string", - "description" : "集群ID" + "MasterEIPRequest": { + "required": [ + "spec" + ], + "properties": { + "spec": { + "$ref": "#/components/schemas/MasterEIPRequestSpec", + "description": "绑定、解绑集群公网apiserver地址的请求配置参数" } }, - "type" : "object" + "type": "object" }, - "NodeList" : { - "properties" : { - "kind" : { - "type" : "string", - "description" : "API类型,固定值“List”", - "default" : "List" + "MasterEIPResponseSpec": { + "properties": { + "action": { + "type": "string", + "description": "绑定动作", + "enum": [ + "bind" + ] }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”", - "default" : "v3" - }, - "items" : { - "type" : "array", - "description" : "节点对象列表,包含了当前集群下所有节点的详细信息。可通过items.metadata.name下的值来找到对应的节点。", - "items" : { - "description" : "", - "$ref" : "#/components/schemas/Node" + "spec": { + "description": "待绑定的弹性IP配置属性", + "properties": { + "id": { + "type": "string", + "description": "弹性网卡ID" + }, + "eip": { + "description": "EIP的详细信息", + "$ref": "#/components/schemas/EipSpec" + }, + "IsDynamic": { + "type": "boolean", + "description": "是否动态创建" + } } + }, + "elasticIp": { + "type": "string", + "description": "弹性公网IP" } }, - "description" : "", - "type" : "object" - }, - "BatchCreateClusterTagsRequestBody" : { - "description" : "批量添加指定集群资源标签的请求体", - "required" : [ "tags" ], - "properties" : { - "tags" : { - "type" : "array", - "description" : "待创建的集群资源标签列表。单集群资源标签总数上限为20。", - "items" : { - "$ref" : "#/components/schemas/ResourceTag" - }, - "maxItems" : 20, - "minItems" : 1 - } - }, - "type" : "object" + "type": "object" }, - "AddonTemplate" : { - "required" : [ "apiVersion", "kind", "metadata", "spec" ], - "properties" : { - "kind" : { - "type" : "string", - "description" : "API类型,固定值“Addon”,该值不可修改。", - "default" : "Addon" + "MasterEIPRequestSpec": { + "properties": { + "action": { + "type": "string", + "description": "绑定或解绑动作,必选参数。", + "enum": [ + "bind", + "unbind" + ] }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”,该值不可修改。", - "default" : "v3" + "spec": { + "description": "待绑定的弹性IP配置属性", + "properties": { + "id": { + "type": "string", + "description": "弹性网卡ID,绑定时必选,解绑时该字段无效" + } + } }, - "metadata" : { - "description" : "基本信息,为集合类的元素类型,包含一组由不同名称定义的属性", - "$ref" : "#/components/schemas/AddonMetadata" + "bandwidth": { + "type": "string", + "description": "带宽(字段已失效,暂不推荐使用)" }, - "spec" : { - "description" : "spec是集合类的元素类型,内容为插件模板具体信息,插件模板的详细描述主体部分都在spec中给出", - "$ref" : "#/components/schemas/Templatespec" + "elasticIp": { + "type": "string", + "description": "弹性网卡IP(字段已失效,暂不推荐使用)" } }, - "description" : "插件模板详情-response结构体", - "type" : "object" + "type": "object" }, - "AddonTemplates" : { - "required" : [ "apiVersion", "items", "kind" ], - "properties" : { - "kind" : { - "type" : "string", - "description" : "API类型,固定值“Addon”,该值不可修改。", - "default" : "Addon" + "MasterEIPResponse": { + "properties": { + "metadata": { + "$ref": "#/components/schemas/Metadata", + "description": "基本信息,为集合类的元素类型,包含一组由不同名称定义的属性" }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”,该值不可修改。", - "default" : "v3" + "spec": { + "$ref": "#/components/schemas/MasterEIPResponseSpec", + "description": "绑定集群公网apiserver地址的配置信息" }, - "items" : { - "type" : "array", - "description" : "插件模板列表", - "items" : { - "$ref" : "#/components/schemas/AddonTemplate" + "status": { + "description": "状态信息", + "properties": { + "privateEndpoint": { + "type": "string", + "description": "集群访问的PrivateIP(HA集群返回VIP)" + }, + "publicEndpoint": { + "type": "string", + "description": "集群访问的PublicIP" + } } } }, - "description" : "插件模板列表-response结构体", - "type" : "object" + "type": "object" }, - "Templatespec" : { - "required" : [ "description", "labels", "logoURL", "readmeURL", "type", "versions" ], - "properties" : { - "type" : { - "type" : "string", - "description" : "模板类型(helm,static)" - }, - "require" : { - "type" : "boolean", - "description" : "是否为必安装插件" - }, - "labels" : { - "type" : "array", - "description" : "模板所属分组", - "items" : { - "type" : "string" - } - }, - "logoURL" : { - "type" : "string", - "description" : "Logo图片地址" - }, - "readmeURL" : { - "type" : "string", - "description" : "插件详情描述及使用说明" - }, - "description" : { - "type" : "string", - "description" : "模板描述" - }, - "versions" : { - "type" : "array", - "description" : "模板具体版本详情", - "items" : { - "$ref" : "#/components/schemas/Versions" + "EipSpec": { + "properties": { + "bandwidth": { + "description": "带宽信息", + "properties": { + "size": { + "type": "integer", + "description": "带宽大小" + }, + "sharetype": { + "type": "string", + "description": "带宽类型", + "enum": [ + "PER", + "WHOLE" + ] + } + } + } + }, + "type": "object" + }, + "ShowCluster": { + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ], + "properties": { + "kind": { + "type": "string", + "description": "API类型,固定值“Cluster”或“cluster”,该值不可修改。", + "default": "Cluster" + }, + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”,该值不可修改。", + "default": "v3" + }, + "metadata": { + "description": "集群的基本信息,为集合类的元素类型,包含一组由不同名称定义的属性。", + "$ref": "#/components/schemas/ClusterMetadata" + }, + "spec": { + "description": "spec是集合类的元素类型,您对需要管理的集群对象进行详细描述的主体部分都在spec中给出。CCE通过spec的描述来创建或更新对象。", + "$ref": "#/components/schemas/ClusterSpec" + }, + "status": { + "description": "集群状态信息", + "$ref": "#/components/schemas/ClusterStatus" + } + }, + "description": "", + "type": "object" + }, + "NodePools": { + "required": [ + "kind" + ], + "properties": { + "kind": { + "type": "string", + "description": "API type. The value is fixed to List." + }, + "apiVersion": { + "type": "string", + "description": "API version. The value is fixed to v3." + }, + "items": { + "type": "array", + "description": "/", + "items": { + "description": "", + "$ref": "#/components/schemas/NodePoolResp" + } + } + }, + "description": "", + "type": "object" + }, + "AddNode": { + "description": "纳管节点参数。集群内已有节点支持通过重置进行重新安装并接入集群。", + "required": [ + "serverID", + "spec" + ], + "properties": { + "serverID": { + "type": "string", + "format": "uuid", + "description": "服务器ID,获取方式请参见ECS/BMS相关资料。" + }, + "spec": { + "description": "节点重装配置参数。当前不支持纳管节点接入节点池。", + "$ref": "#/components/schemas/ReinstallNodeSpec" + } + }, + "type": "object" + }, + "AddNodeList": { + "description": "重置节点参数。集群内已有节点,支持通过重置节点方式进行重新安装并接入集群,纳管过程将清理节点上系统盘、数据盘数据,并作为新节点接入Kuberntes集群,请提前备份迁移关键数据。", + "required": [ + "apiVersion", + "kind", + "nodeList" + ], + "properties": { + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”。" + }, + "kind": { + "type": "string", + "description": "API类型,固定值“List”。" + }, + "nodeList": { + "type": "array", + "description": "纳管节点列表", + "items": { + "$ref": "#/components/schemas/AddNode" + } + } + }, + "type": "object" + }, + "UpdateReleaseReqBody": { + "description": "更新模板实例的请求体", + "required": [ + "chart_id", + "action", + "parameters", + "values" + ], + "properties": { + "chart_id": { + "type": "string", + "description": "模板ID", + "example": "af4b699e-018c-11ec-b8b0-0255ac100b05" + }, + "action": { + "type": "string", + "description": "更新操作,升级为upgrade,回退为rollback", + "enum": [ + "upgrade", + "rollback" + ] + }, + "parameters": { + "$ref": "#/components/schemas/ReleaseReqBodyParams" + }, + "values": { + "type": "object", + "description": "模板实例的值", + "properties": { + "imagePullPolicy": { + "type": "string", + "example": "IfNotPresent", + "description": "镜像拉取策略" + }, + "imageTag": { + "type": "string", + "example": "v2", + "description": "镜像标签" + } } } }, - "description" : "插件模板详细信息", - "type" : "object" - }, - "SyncNodeResp" : { - "type" : "object" + "type": "object" }, - "PostcheckClusterRequestBody" : { - "required" : [ "kind", "apiVersion", "spec" ], - "properties" : { - "apiVersion" : { - "type" : "string", - "description" : "API版本,默认为v3" + "AddonInstances": { + "required": [ + "apiVersion", + "items", + "kind" + ], + "properties": { + "kind": { + "type": "string", + "description": "API类型,固定值“Addon”,该值不可修改。", + "default": "Addon" }, - "kind" : { - "type" : "string", - "description" : "资源类型" + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”,该值不可修改。", + "default": "v3" }, - "spec" : { - "description" : "spec是升级后确认的配置信息。", - "$ref" : "#/components/schemas/PostcheckSpec" + "items": { + "type": "array", + "description": "插件实例列表", + "items": { + "$ref": "#/components/schemas/AddonInstance" + } } }, - "type" : "object" + "description": "插件实例列表-response结构体", + "type": "object" }, - "PostcheckClusterResponseBody" : { - "description" : "升级后确认返回体", - "properties" : { - "apiVersion" : { - "type" : "string", - "description" : "API版本" - }, - "kind" : { - "type" : "string", - "description" : "资源类型" + "OpenAPIResponse": { + "properties": { + "metadata": { + "$ref": "#/components/schemas/Metadata", + "description": "基本信息,为集合类的元素类型,包含一组由不同名称定义的属性" }, - "metadata" : { - "description" : "升级后确认元数据", - "$ref" : "#/components/schemas/PostcheckCluserResponseMetadata" + "spec": { + "description": "集群访问地址的配置参数信息", + "$ref": "#/components/schemas/OpenAPISpec" }, - "spec" : { - "description" : "集群升级后确认的配置信息", - "$ref" : "#/components/schemas/PostcheckSpec" - }, - "status" : { - "description" : "集群升级后确认的状态信息", - "properties" : { - "phase" : { - "description" : "状态,取值如下", - "type" : "string" + "status": { + "description": "状态信息", + "properties": { + "privateEndpoint": { + "type": "string", + "description": "集群访问的PrivateIP(HA集群返回VIP)" + }, + "publicEndpoint": { + "type": "string", + "description": "集群访问的PublicIP" } } } }, - "type" : "object" + "type": "object" }, - "PostcheckSpec" : { - "properties" : { - "clusterID" : { - "type" : "string", - "description" : "集群ID" - }, - "clusterVersion" : { - "type" : "string", - "description" : "集群升级源版本" - }, - "targetVersion" : { - "type" : "string", - "description" : "集群升级目标版本" + "OpenAPISpec": { + "properties": { + "spec": { + "description": "集群访问的地址", + "properties": { + "eip": { + "description": "EIP的详细信息", + "$ref": "#/components/schemas/EipSpec" + }, + "IsDynamic": { + "type": "boolean", + "description": "是否动态创建" + } + } + } + }, + "type": "object" + }, + "SyncNodesResp": { + "type": "object" + }, + "UpgradePlanResponseBody": { + "required": [ + "kind", + "apiVersion", + "items" + ], + "properties": { + "kind": { + "type": "string", + "pattern": "List", + "description": "API类型,固定值“List”,该值不可修改。", + "default": "List" + }, + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”,该值不可修改。", + "pattern": "v3", + "default": "v3" + }, + "items": { + "type": "array", + "description": "自动升级计划", + "$ref": "#/components/schemas/UpgradePlan" + } + }, + "type": "object" + }, + "UpgradePlan": { + "required": [ + "kind", + "apiVersion", + "metadata", + "spec", + "status" + ], + "properties": { + "kind": { + "type": "string", + "pattern": "UpgradePlan", + "description": "API类型,固定值“UpgradePlan”,该值不可修改。", + "default": "UpgradePlan" + }, + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”,该值不可修改。", + "pattern": "v3", + "default": "v3" + }, + "metadata": { + "description": "自动升级计划的元数据信息", + "$ref": "#/components/schemas/Metadata" + }, + "spec": { + "description": "自动升级计划主体", + "$ref": "#/components/schemas/UpgradePlanSpec" + }, + "status": { + "description": "自动升级计划的当前状态", + "$ref": "#/components/schemas/UpgradePlanStatus" + } + }, + "type": "object" + }, + "UpgradePlanStatus": { + "required": [ + "phase" + ], + "properties": { + "phase": { + "type": "string", + "description": "自动升级计划状态", + "default": "Pending", + "enum": [ + "Pending", + "Enqueued", + "Upgrading", + "Success", + "Failed", + "Skipped" + ] + } + }, + "type": "object" + }, + "UpgradePlanSpec": { + "required": [ + "clusterID", + "clusterVersion", + "targetVersion", + "notBefore", + "notAfter", + "notBeforeDeadline" + ], + "properties": { + "clusterID": { + "type": "string", + "description": "集群ID", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + }, + "clusterVersion": { + "type": "string", + "description": "当前集群版本", + "pattern": "^v\\d\\.\\d\\.\\d-r\\d$", + "example": "v1.23.4-r0" + }, + "targetVersion": { + "type": "string", + "description": "本次集群升级的目标版本", + "pattern": "^v\\d\\.\\d\\.\\d-r\\d$", + "example": "v1.25.2-r0" + }, + "notBefore": { + "type": "string", + "description": "自动升级计划的最早时间(UTC时间),需要早于notBeforeDeadline", + "example": "2025-01-06 16:00:00 +0000 UTC" + }, + "notAfter": { + "type": "string", + "description": "自动升级计划的最晚时间(UTC时间)", + "example": "2025-01-06 20:00:00 +0000 UTC" + }, + "notBeforeDeadline": { + "type": "string", + "description": "自动升级计划开始的截止时间(UTC时间)", + "example": "2025-01-30 16:00:00 +0000 UTC" + } + }, + "type": "object" + }, + "ResizeClusterResponseBody": { + "description": "变更集群规格的返回体", + "required": [ + "jobID" + ], + "properties": { + "jobID": { + "type": "string", + "description": "任务ID" + }, + "orderID": { + "type": "string", + "description": "包周期集群变更规格订单ID" + } + }, + "type": "object" + }, + "ResizeClusterRequestBody": { + "description": "变更集群规格的请求体", + "required": [ + "flavorResize" + ], + "properties": { + "flavorResize": { + "type": "string", + "description": "要变更的目标规格。仅支持变更集群最大节点规模,不支持变更控制节点数,且不支持降低集群规格。例如原集群规格为cce.s2.medium,仅支持变更至cce.s2.large及以上规格,不支持变更至cce.s2.small或cce.s1.medium。" + }, + "extendParam": { + "type": "object", + "properties": { + "decMasterFlavor": { + "type": "string", + "description": "专属云CCE集群可指定控制节点的规格" + }, + "isAutoPay": { + "type": "string", + "description": "是否自动扣款" + } + } } }, - "type" : "object" + "type": "object" }, - "PostcheckCluserResponseMetadata" : { - "description" : "升级后确认元数据", - "properties" : { - "uid" : { - "description" : "任务ID", - "type" : "string" - } - }, - "type" : "object" - }, - "SnapshotTask" : { - "properties" : { - "kind" : { - "type" : "string", - "description" : "任务类型" - }, - "apiVersion" : { - "type" : "string", - "description" : "API版本" + "UnlockNodeScaledownRequestBody": { + "required": [ + "apiVersion", + "kind" + ], + "properties": { + "apiVersion": { + "type": "string", + "description": "**参数解释**:" }, - "metadata" : { - "description" : "备份任务元数据信息", - "$ref" : "#/components/schemas/SnapshotTaskMetadata" + "kind": { + "type": "string", + "description": "**参数解释**:" }, - "spec" : { - "description" : "备份任务配置信息(待废弃)", - "$ref" : "#/components/schemas/SnapshotSpec" + "nodeList": { + "type": "array", + "description": "**参数解释**:", + "items": { + "type": "string" + }, + "minItems": 0, + "maxItems": 50 + } + }, + "type": "object" + }, + "DelayUpgradePlanRequestBody": { + "required": [ + "notBefore" + ], + "properties": { + "notBefore": { + "type": "string", + "format": "date", + "description": "新的自动升级计划启动时间,必须早于notBeforeDeadline", + "example": "2025-02-01 16:00:00 +0000 UTC" + } + }, + "type": "object" + }, + "NodePoolUpdate": { + "required": [ + "metadata", + "spec" + ], + "properties": { + "metadata": { + "description": "节点池的元数据信息", + "$ref": "#/components/schemas/NodePoolMetadataUpdate" + }, + "spec": { + "description": "节点池的规格描述", + "$ref": "#/components/schemas/NodePoolSpecUpdate" + } + }, + "description": "", + "type": "object" + }, + "UpdateNodePoolResp": { + "required": [ + "kind", + "apiVersion", + "metadata", + "spec" + ], + "properties": { + "kind": { + "type": "string", + "description": "API类型,固定值“NodePool”。", + "default": "NodePool" + }, + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”。", + "default": "v3" + }, + "metadata": { + "description": "节点池的元数据信息", + "$ref": "#/components/schemas/NodePoolMetadata" + }, + "spec": { + "description": "节点池的规格描述", + "$ref": "#/components/schemas/NodePoolSpec" + }, + "status": { + "description": "节点池状态", + "$ref": "#/components/schemas/UpdateNodePoolStatus" + } + }, + "description": "", + "type": "object" + }, + "NodeSpecUpdate": { + "required": [ + "taints", + "k8sTags", + "userTags" + ], + "properties": { + "flavor": { + "type": "string", + "description": "**参数解释:**", + "minLength": 1, + "maxLength": 50, + "pattern": "^[A-Za-z0-9-_.]+$" + }, + "os": { + "type": "string", + "description": "**参数解释**:" + }, + "login": { + "description": "**参数解释**:", + "$ref": "#/components/schemas/Login" + }, + "rootVolumeUpdate": { + "description": "**参数解释**:", + "$ref": "#/components/schemas/Volume" + }, + "dataVolumesUpdate": { + "type": "array", + "description": "**参数解释**:", + "items": { + "$ref": "#/components/schemas/Volume" + } + }, + "storage": { + "$ref": "#/components/schemas/Storage" + }, + "runtime": { + "$ref": "#/components/schemas/Runtime", + "description": "**参数解释**:" + }, + "taints": { + "type": "array", + "description": "**参数解释**:", + "items": { + "$ref": "#/components/schemas/Taint" + }, + "maxItems": 20 + }, + "k8sTags": { + "type": "object", + "description": "**参数解释**:", + "additionalProperties": { + "type": "string", + "maxLength": 63 + } + }, + "ecsGroupId": { + "type": "string", + "description": "**参数解释**:", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + }, + "userTags": { + "type": "array", + "description": "**参数解释**:", + "items": { + "$ref": "#/components/schemas/UserTag" + } + }, + "nodeNameTemplate": { + "type": "object", + "description": "**参数解释**:", + "properties": { + "nodeNamePrefix": { + "type": "string", + "pattern": "^[a-z]([-.a-z0-9]*[-.a-z0-9])?$", + "description": "**参数解释**:", + "example": "prefix" + }, + "nodeNameSuffix": { + "type": "string", + "pattern": "^[-.a-z0-9]*[a-z0-9]$", + "description": "**参数解释**:", + "example": "suffix" + } + } + }, + "initializedConditions": { + "type": "array", + "description": "**参数解释**:", + "maxItems": 2, + "items": { + "pattern": "^[A-Za-z0-9]+$", + "minLength": 1, + "maxLength": 20, + "type": "string" + } + }, + "serverEnterpriseProjectID": { + "type": "string", + "description": "**参数解释**:" + }, + "nodeNicSpecUpdate": { + "description": "**参数解释**:", + "properties": { + "primaryNic": { + "description": "**参数解释**:", + "properties": { + "subnetId": { + "type": "string", + "description": "**参数解释**:", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$", + "example": "ca964acf-8468-4735-8229-97940ef6c881" + }, + "subnetList": { + "type": "array", + "description": "**参数解释**:", + "items": { + "type": "string", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + }, + "example": [ + "7e767d10-7548-4df5-ad72-aeac1d08bd8a" + ] + } + } + } + } }, - "status" : { - "description" : "备份任务状态", - "$ref" : "#/components/schemas/SnapshotStatus" - } - }, - "type" : "object" - }, - "SnapshotTaskStatus" : { - "properties" : { - "latestBackupTime" : { - "type" : "string", - "description" : "最近一次备份的时间" + "extendParam": { + "$ref": "#/components/schemas/NodePoolUpdateExtendParam", + "description": "**参数解释**:" } }, - "type" : "object" + "type": "object" }, - "SnapshotSpecItems" : { - "properties" : { - "id" : { - "type" : "string", - "description" : "子任务ID" + "UpdateNodePoolStatus": { + "properties": { + "currentNode": { + "type": "integer", + "format": "int32", + "description": "当前节点池中所有节点数量(不含删除中的节点)。" }, - "type" : { - "type" : "string", - "description" : "子任务类型" + "creatingNode": { + "type": "integer", + "format": "int32", + "description": "当前节点池中处于创建流程中的节点数量。" }, - "status" : { - "type" : "string", - "description" : "状态" + "deletingNode": { + "type": "integer", + "format": "int32", + "description": "当前节点池中删除中的节点数量。" }, - "creationTimestamp" : { - "type" : "string", - "description" : "任务创建时间" + "phase": { + "type": "string", + "description": "节点池状态。", + "enum": [ + "Synchronizing", + "Synchronized", + "SoldOut", + "Deleting", + "Error" + ] }, - "updateTimestamp" : { - "type" : "string", - "description" : "任务更新时间" + "conditions": { + "description": "节点池当前详细状态列表,详情参见Condition类型定义。", + "type": "array", + "items": { + "$ref": "#/components/schemas/NodePoolCondition", + "description": "节点池详细状态。" + } }, - "message" : { - "type" : "string", - "description" : "信息" + "scaleGroupStatuses": { + "description": "伸缩组当前详细状态信息,详情参见ScaleGroupStatus类型定义", + "type": "array", + "items": { + "$ref": "#/components/schemas/ScaleGroupStatus" + } } }, - "type" : "object" + "description": "", + "type": "object" }, - "SnapshotStatus" : { - "properties" : { - "phase" : { - "type" : "string", - "description" : "任务状态" + "NodePoolSpecUpdate": { + "required": [ + "initialNodeCount" + ], + "properties": { + "nodeTemplate": { + "description": "**参数解释:**", + "$ref": "#/components/schemas/NodeSpecUpdate" + }, + "initialNodeCount": { + "type": "integer", + "format": "int32", + "description": "**参数解释:**" + }, + "ignoreInitialNodeCount": { + "type": "boolean", + "description": "**参数解释:**" + }, + "autoscaling": { + "description": "弹性伸缩参数。仅按需计费的节点池支持弹性伸缩。", + "$ref": "#/components/schemas/NodePoolNodeAutoscaling" }, - "progress" : { - "type" : "string", - "description" : "任务进度" + "nodeManagementUpdate": { + "description": "**参数解释:**", + "$ref": "#/components/schemas/NodeManagement" }, - "completionTime" : { - "type" : "string", - "description" : "完成时间" + "taintPolicyOnExistingNodes": { + "type": "string", + "description": "**参数解释:**" + }, + "labelPolicyOnExistingNodes": { + "type": "string", + "description": "**参数解释:**" + }, + "userTagsPolicyOnExistingNodes": { + "type": "string", + "description": "**参数解释:**" + }, + "extensionScaleGroups": { + "description": "节点池扩展伸缩组配置列表,详情参见ExtensionScaleGroup类型定义", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtensionScaleGroup" + } + } + }, + "description": "", + "type": "object" + }, + "NodePoolMetadataUpdate": { + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "节点池名称。", + "minLength": 1, + "maxLength": 50 + } + }, + "description": "", + "type": "object" + }, + "NodePoolUpdateExtendParam": { + "description": "**参数解释**:", + "properties": { + "agency_name": { + "type": "string", + "description": "**参数解释**:" + }, + "alpha.cce/preInstall": { + "type": "string", + "description": "**参数解释**:" + }, + "alpha.cce/postInstall": { + "type": "string", + "description": "**参数解释**:" + }, + "securityReinforcementType": { + "type": "string", + "description": "**参数解释**:", + "enum": [ + "null", + "cybersecurity" + ] + } + }, + "type": "object" + }, + "UpgradeWorkFlowList": { + "properties": { + "kind": { + "type": "string", + "description": "API类型,固定值“List”,该值不可修改。", + "default": "List", + "pattern": "List" + }, + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”,该值不可修改。", + "default": "v3", + "pattern": "v3" + }, + "items": { + "$ref": "#/components/schemas/UpgradeWorkFlow" + } + }, + "type": "object" + }, + "DeleteImageCacheResponseBody": { + "required": [ + "image_cache" + ], + "properties": { + "image_cache": { + "description": "镜像缓存信息。", + "$ref": "#/components/schemas/ImageCacheDetail" + } + }, + "description": "删除镜像缓存-response结构体。", + "type": "object" + }, + "AutopilotShowCluster": { + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ], + "properties": { + "kind": { + "type": "string", + "description": "API类型,固定值“Cluster”或“cluster”,该值不可修改。", + "default": "Cluster" + }, + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”,该值不可修改。", + "default": "v3" + }, + "metadata": { + "description": "集群的基本信息,为集合类的元素类型,包含一组由不同名称定义的属性。", + "$ref": "#/components/schemas/AutopilotClusterMetadata" + }, + "spec": { + "description": "spec是集合类的元素类型,您对需要管理的集群对象进行详细描述的主体部分都在spec中给出。CCE通过spec的描述来创建或更新对象。", + "$ref": "#/components/schemas/AutopilotClusterSpec" + }, + "status": { + "description": "集群状态信息", + "$ref": "#/components/schemas/AutopilotClusterStatus" + } + }, + "description": "", + "type": "object" + }, + "AutopilotClusterInformation": { + "required": [ + "spec" + ], + "properties": { + "spec": { + "description": "具体集群参数", + "$ref": "#/components/schemas/AutopilotClusterInformationSpec" + }, + "metadata": { + "description": "集群基本信息,包含与名称相关的字段", + "$ref": "#/components/schemas/AutopilotClusterMetadataForUpdate" + } + }, + "description": "", + "type": "object" + }, + "AutopilotClusterMetadataForUpdate": { + "properties": { + "alias": { + "type": "string", + "description": "集群显示名。", + "minLength": 4, + "maxLength": 128 + } + }, + "type": "object" + }, + "AutopilotClusterInformationSpec": { + "properties": { + "description": { + "type": "string", + "description": "集群的描述信息。", + "maxLength": 200, + "pattern": "[^\\~\\$\\%\\^\\&\\*\\<\\>\\[\\]\\{\\}\\(\\)\\'\\\"\\#\\\\]" + }, + "customSan": { + "$ref": "#/components/schemas/AutopilotCustomSan" + }, + "eniNetwork": { + "description": "云原生网络2.0网络配置,包含集群的容器子网信息。", + "$ref": "#/components/schemas/AutopilotEniNetworkUpdate" + } + }, + "description": "", + "type": "object" + }, + "AutopilotEniNetworkUpdate": { + "properties": { + "subnets": { + "type": "array", + "description": "IPv4子网ID列表。", + "items": { + "description": "IPv4子网ID", + "$ref": "#/components/schemas/AutopilotNetworkSubnet" + }, + "maxItems": 20 } }, - "type" : "object" + "type": "object" }, - "SnapshotTaskMetadata" : { - "properties" : { - "uid" : { - "type" : "string", - "description" : "任务的ID。" + "MigrateNodesTask": { + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”。" }, - "creationTimestamp" : { - "type" : "string", - "description" : "任务的创建时间。" + "kind": { + "type": "string", + "description": "API类型,固定值“MigrateNodesTask”。" }, - "updateTimestamp" : { - "type" : "string", - "description" : "任务的更新时间。" + "spec": { + "description": "配置信息", + "$ref": "#/components/schemas/MigrateNodesSpec" + }, + "status": { + "description": "任务状态", + "$ref": "#/components/schemas/TaskStatus" } }, - "type" : "object" + "type": "object" }, - "SnapshotClusterTaskResponseBody" : { - "properties" : { - "apiVersion" : { - "type" : "string", - "description" : "api版本,默认为v3.1" - }, - "kind" : { - "type" : "string", - "description" : "任务类型" + "MigrateNodeExtendParam": { + "properties": { + "maxPods": { + "type": "integer", + "format": "int32", + "description": "节点最大允许创建的实例数(Pod),该数量包含系统默认实例,取值范围为16~256。" }, - "metadata" : { - "description" : "备份任务元数据信息", - "$ref" : "#/components/schemas/SnapshotTaskMetadata" + "DockerLVMConfigOverride": { + "type": "string", + "description": "Docker数据盘配置项(已废弃,请使用storage字段)。" + }, + "alpha.cce/preInstall": { + "type": "string", + "description": "安装前执行脚本", + "maxLength": 2048 }, - "items" : { - "type" : "array", - "description" : "备份任务列表", - "items" : { - "$ref" : "#/components/schemas/SnapshotTask" - } + "alpha.cce/postInstall": { + "type": "string", + "description": "安装后执行脚本", + "maxLength": 2048 }, - "status" : { - "description" : "备份任务状态", - "$ref" : "#/components/schemas/SnapshotTaskStatus" - } - }, - "type" : "object" - }, - "SnapshotSpec" : { - "properties" : { - "items" : { - "type" : "array", - "description" : "备份任务详情", - "items" : { - "$ref" : "#/components/schemas/SnapshotSpecItems" - } + "alpha.cce/NodeImageID": { + "type": "string", + "description": "指定待切换目标操作系统所使用的用户镜像ID。" } }, - "type" : "object" + "type": "object" + }, + "MigrateNodesSpec": { + "required": [ + "os", + "login", + "nodes" + ], + "properties": { + "os": { + "type": "string", + "description": "操作系统类型,须精确到版本号。" + }, + "extendParam": { + "description": "迁移节点时的扩展参数", + "$ref": "#/components/schemas/MigrateNodeExtendParam" + }, + "login": { + "description": "节点的登录方式。密钥对和密码登录方式二者必选其一。", + "$ref": "#/components/schemas/Login" + }, + "runtime": { + "description": "容器运行时", + "$ref": "#/components/schemas/Runtime" + }, + "nodes": { + "type": "array", + "description": "待操作节点列表", + "items": { + "$ref": "#/components/schemas/NodeItem" + } + } + }, + "type": "object" + }, + "ScaleNodePoolOptions": { + "description": "节点池伸缩选项配置", + "properties": { + "scalableChecking": { + "type": "string", + "description": "扩容状态检查策略: instant(同步检查), async(异步检查)。默认同步检查instant", + "default": "instant" + }, + "billingConfigOverride": { + "description": "节点池扩容时覆盖节点的默认计费模式配置", + "$ref": "#/components/schemas/ScaleUpBillingConfigOverride" + } + }, + "type": "object" + }, + "ScaleNodePoolSpec": { + "description": "伸缩节点池请求详细参数", + "required": [ + "desiredNodeCount", + "scaleGroups" + ], + "properties": { + "desiredNodeCount": { + "type": "integer", + "description": "节点池期望节点数" + }, + "scaleGroups": { + "type": "array", + "description": "扩缩容的节点池,只能填一个伸缩组,如果要伸缩默认伸缩组填default", + "items": { + "type": "string", + "description": "伸缩组名称" + } + }, + "options": { + "description": "节点池伸缩选项配置", + "$ref": "#/components/schemas/ScaleNodePoolOptions" + } + }, + "type": "object" + }, + "ScaleUpBillingConfigOverride": { + "description": "节点池扩容时覆盖节点的默认计费模式配置", + "required": [ + "billingMode" + ], + "properties": { + "billingMode": { + "type": "integer", + "description": "节点计费类型,0(按需),1(包周期)" + }, + "extendParam": { + "description": "节点池扩容时节点的计费配置", + "$ref": "#/components/schemas/ScaleUpExtendParam" + } + }, + "type": "object" + }, + "ScaleNodePoolRequestBody": { + "description": "伸缩节点池的请求体", + "required": [ + "kind", + "apiVersion", + "spec" + ], + "properties": { + "kind": { + "type": "string", + "description": "API类型,固定值“NodePool”。", + "default": "NodePool" + }, + "apiVersion": { + "type": "string", + "description": "API版本,固定值“v3”。", + "default": "v3" + }, + "spec": { + "description": "伸缩节点池请求详细参数", + "$ref": "#/components/schemas/ScaleNodePoolSpec" + } + }, + "type": "object" + }, + "ScaleUpExtendParam": { + "description": "节点池扩容时节点的计费配置", + "required": [ + "periodNum", + "periodType" + ], + "properties": { + "periodNum": { + "type": "integer", + "description": "包周期时长, 包月1-9, 包年1-3" + }, + "periodType": { + "type": "string", + "description": "包周期类型, year(包年), month(包月)" + }, + "isAutoRenew": { + "type": "boolean", + "description": "是否自动续费,可选参数,如果不填写,以节点池isAutoRenew属性为准。" + }, + "isAutoPay": { + "type": "boolean", + "description": "是否自动付费,可选参数,如果不填写,以节点池isAutoPay属性为准。" + } + }, + "type": "object" + }, + "ChartRespList": { + "type": "object", + "description": "模板列表", + "items": { + "$ref": "#/components/schemas/ChartResp" + } }, - "ShowNodePoolConfigurationDetailsRespBody" : { - "type" : "object", - "description" : "获取指定节点池配置参数列表返回体", - "additionalProperties" : { - "type" : "array", - "description" : "配置参数,由key/value组成。", - "items" : { - "$ref" : "#/components/schemas/PackageOptions" - } + "UpdateClusterConfigurationsBody": { + "description": "更新指定集群配置参数内容请求体", + "required": [ + "kind", + "apiVersion", + "metadata", + "spec" + ], + "properties": { + "apiVersion": { + "type": "string", + "description": "API版本,固定值**v3**" + }, + "kind": { + "type": "string", + "description": "API类型,固定值**Configuration**" + }, + "metadata": { + "description": "Configuration的元数据信息", + "$ref": "#/components/schemas/ConfigurationMetadata" + }, + "spec": { + "description": "Configuration的规格信息", + "$ref": "#/components/schemas/ClusterConfigurationsSpec" + } + }, + "type": "object" + } + }, + "securitySchemes": {} + }, + "paths": { + "/ContinueUpgradeClusterTask": { + "post": { + "tags": [ + "集群升级" + ], + "summary": "继续执行集群升级任务", + "description": "继续执行被暂停的集群升级任务。", + "operationId": "ContinueUpgradeClusterTask", + "responses": { + "200": { + "description": "表示继续执行集群升级任务操作下发成功。" + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + } + ] + }, + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ContinueUpgradeClusterTask", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgrade/continue" + }, + "/BatchDeleteAutopilotClusterTags": { + "post": { + "tags": [ + "标签管理(Autopilot)" + ], + "summary": "批量删除指定集群的资源标签", + "description": "该API用于批量删除指定集群的资源标签。", + "operationId": "BatchDeleteAutopilotClusterTags", + "responses": { + "204": { + "description": "No Content" + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDeleteClusterTagsRequestBody" + } + } + }, + "required": true } }, - "ClusterMetadataForUpdate" : { - "properties" : { - "alias" : { - "type" : "string", - "description" : "集群显示名。", - "minLength" : 4, - "maxLength" : 128 + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "BatchDeleteAutopilotClusterTags", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/tags/delete" + }, + "/AwakeCluster": { + "post": { + "tags": [ + "集群管理" + ], + "summary": "集群唤醒", + "description": "集群唤醒用于唤醒已休眠的集群,唤醒后,将继续收取控制节点资源费用。", + "operationId": "AwakeCluster", + "deprecated": false, + "responses": { + "200": { + "description": "表示集群唤醒任务下发成功,需持续查询集群状态,当集群状态变为Available后表示唤醒成功" } }, - "type" : "object" - }, - "ClusterInformationSpec" : { - "properties" : { - "description" : { - "type" : "string", - "description" : "集群的描述信息。", - "maxLength" : 200, - "pattern" : "[^\\~\\$\\%\\^\\&\\*\\<\\>\\[\\]\\{\\}\\(\\)\\'\\\"\\#\\\\]" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "customSan" : { - "$ref" : "#/components/schemas/CustomSan" + { + "$ref": "#/components/parameters/param_path_clusterid" }, - "containerNetwork" : { - "description" : "容器网络参数,包含容器网段的信息。", - "$ref" : "#/components/schemas/ContainerNetworkUpdate" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "eniNetwork" : { - "description" : "云原生网络2.0网络配置,包含CCE Turbo集群的容器子网信息。", - "$ref" : "#/components/schemas/EniNetworkUpdate" - }, - "hostNetwork" : { - "description" : "节点网络参数,包含了Node节点默认安群组设置", - "properties" : { - "SecurityGroup" : { - "type" : "string", - "description" : "集群默认Node节点安全组需要放通部分端口来保证正常通信,详细设置请参考[集群安全组规则配置](https://support.huaweicloud.com/cce_faq/cce_faq_00265.html)。" + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] + }, + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "AwakeCluster", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/awake" + }, + "/ShowChartValues": { + "get": { + "tags": [ + "模板管理" + ], + "summary": "获取模板Values", + "description": "获取模板Values", + "operationId": "ShowChartValues", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChartValue" + } } } - }, - "deletionProtection" : { - "type" : "boolean", - "description" : "集群删除保护,默认为false关闭,如果开启后用户将无法删除该集群。", - "default" : false } }, - "description" : "", - "type" : "object" - }, - "ClusterInformation" : { - "required" : [ "spec" ], - "properties" : { - "spec" : { - "description" : "具体集群参数", - "$ref" : "#/components/schemas/ClusterInformationSpec" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_chart_id" }, - "metadata" : { - "description" : "集群基本信息,包含与名称相关的字段", - "$ref" : "#/components/schemas/ClusterMetadataForUpdate" - } - }, - "description" : "", - "type" : "object" - }, - "ContainerNetworkUpdate" : { - "properties" : { - "cidrs" : { - "type" : "array", - "description" : "容器网络网段列表。1.21及新版本集群,当集群网络类型为vpc-router时,支持增量添加容器网段,最多配置20个。", - "items" : { - "description" : "容器网络网段", - "$ref" : "#/components/schemas/ContainerCIDR" - }, - "maxItems" : 20 + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" } - }, - "type" : "object" + ] }, - "EniNetworkUpdate" : { - "properties" : { - "subnets" : { - "type" : "array", - "description" : "IPv4子网ID列表。1.19.10及以上版本的CCE Turbo集群支持多容器子网,同时支持增量更新容器子网列表。", - "items" : { - "description" : "IPv4子网ID", - "$ref" : "#/components/schemas/NetworkSubnet" - }, - "maxItems" : 20 + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowChartValues", + "x-url": "{endpoint}/v2/charts/{chart_id}/values" + }, + "/UpgradeWorkFlowUpdate": { + "patch": { + "tags": [ + "集群升级" + ], + "summary": "更新指定集群升级引导任务状态", + "description": "该API用于更新指定集群升级引导任务状态,当前仅适用于取消升级流程", + "operationId": "UpgradeWorkFlowUpdate", + "responses": { + "200": { + "description": "表示更新集群升级引导任务状态成功", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeWorkFlow" + } + } + } } }, - "type" : "object" - }, - "UpgradeInfoSpec" : { - "description" : "升级配置相关信息", - "properties" : { - "lastUpgradeInfo" : { - "description" : "上次集群升级信息", - "$ref" : "#/components/schemas/UpgradeInfoStatus" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "versionInfo" : { - "description" : "版本信息", - "$ref" : "#/components/schemas/UpgradeVersionInfo" + { + "$ref": "#/components/parameters/param_path_clusterid" }, - "upgradeFeatureGates" : { - "description" : "集群升级特性开关", - "$ref" : "#/components/schemas/UpgradeFeatureGates" - } - }, - "type" : "object" - }, - "UpgradeVersionInfo" : { - "description" : "版本信息", - "properties" : { - "release" : { - "type" : "string", - "description" : "正式版本号,如:v1.19.10" + { + "$ref": "#/components/parameters/param_path_upgradeworkflowid" }, - "patch" : { - "type" : "string", - "description" : "补丁版本号,如r0" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "suggestPatch" : { - "type" : "string", - "description" : "推荐升级的目标补丁版本号,如r0" + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeWorkFlowUpdateRequestBody" + } + } }, - "targetVersions" : { - "type" : "array", - "description" : "升级目标版本集合", - "items" : { - "type" : "string", - "description" : "目标版本" + "required": true + } + }, + "x-method": "patch", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UpgradeWorkFlowUpdate", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgradeworkflows/{upgrade_workflow_id}" + }, + "/UpdateAddonInstance": { + "put": { + "tags": [ + "插件管理" + ], + "summary": "更新AddonInstance", + "description": "更新插件实例的功能。", + "operationId": "UpdateAddonInstance", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddonInstance" + } + } } } }, - "type" : "object" - }, - "UpgradeInfoStatus" : { - "description" : "升级状态信息", - "properties" : { - "phase" : { - "type" : "string", - "description" : "升级任务状态." + "parameters": [ + { + "name": "id", + "in": "path", + "description": "插件实例id", + "required": true, + "schema": { + "description": "插件实例id", + "type": "string", + "maxLength": 255, + "minLength": 1 + } }, - "progress" : { - "type" : "string", - "description" : "升级任务进度" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "completionTime" : { - "type" : "string", - "description" : "升级任务结束时间" + { + "$ref": "#/components/parameters/param_header_x_auth_token" } - }, - "type" : "object" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstanceRequest" + } + } + }, + "required": true + } }, - "UpgradeInfoResponseBody" : { - "properties" : { - "kind" : { - "type" : "string", - "description" : "类型" + "x-method": "put", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UpdateAddonInstance", + "x-url": "{endpoint}/api/v3/addons/{id}" + }, + "/UpdateNode": { + "put": { + "tags": [ + "节点管理" + ], + "summary": "更新指定的节点", + "description": "该API用于更新指定的节点。", + "operationId": "UpdateNode", + "deprecated": false, + "responses": { + "200": { + "description": "表示更新指定节点成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Node" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "apiVersion" : { - "type" : "string", - "description" : "API版本" + { + "$ref": "#/components/parameters/param_path_clusterid" }, - "metadata" : { - "description" : "基本信息,为集合类的元素类型,包含一组由不同名称定义的属性", - "$ref" : "#/components/schemas/Metadata" + { + "$ref": "#/components/parameters/param_path_nodeid" }, - "spec" : { - "description" : "升级配置相关信息", - "$ref" : "#/components/schemas/UpgradeInfoSpec" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "status" : { - "description" : "升级状态信息", - "$ref" : "#/components/schemas/UpgradeInfoStatus" + { + "$ref": "#/components/parameters/param_header_x_auth_token" } - }, - "type" : "object" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterNodeInformation" + } + } + }, + "required": true + } }, - "UpgradeFeatureGates" : { - "description" : "集群升级特性开关", - "properties" : { - "supportUpgradePageV4" : { - "type" : "boolean", - "description" : "集群升级Console界面是否支持V4版本,该字段一般由CCE Console使用。" + "x-method": "put", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UpdateNode", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/{node_id}" + }, + "/UpgradeNodePool": { + "post": { + "tags": [ + "节点池管理" + ], + "summary": "同步节点池", + "description": "该API用于同步节点池中已有节点的配置", + "operationId": "UpgradeNodePool", + "deprecated": false, + "responses": { + "200": { + "description": "表示获取任务信息成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeNodepoolJobResult" + } + } + } } }, - "type" : "object" - }, - "PrecheckClusterResponseBody" : { - "description" : "升级前检查返回体", - "properties" : { - "apiVersion" : { - "type" : "string", - "description" : "API版本" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "kind" : { - "type" : "string", - "description" : "资源类型" + { + "$ref": "#/components/parameters/param_path_clusterid" }, - "metadata" : { - "description" : "升级前检查元数据", - "$ref" : "#/components/schemas/PrecheckCluserResponseMetadata" + { + "$ref": "#/components/parameters/param_path_nodepool_id" }, - "spec" : { - "description" : "spec是集合类的元素类型,您对需要升级前检查的配置信息的主体部分都在spec中给出。CCE通过spec的描述来执行检查。", - "$ref" : "#/components/schemas/PrecheckSpec" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "status" : { - "description" : "集群升级前检查状态", - "$ref" : "#/components/schemas/PrecheckStatus" + { + "$ref": "#/components/parameters/param_header_x_auth_token" } - }, - "type" : "object" - }, - "PrecheckClusterRequestBody" : { - "required" : [ "kind", "apiVersion", "spec" ], - "properties" : { - "apiVersion" : { - "type" : "string", - "description" : "API版本,默认为v3" - }, - "kind" : { - "type" : "string", - "description" : "资源类型,默认为PreCheckTask" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeNodePool" + } + } }, - "spec" : { - "description" : "spec是集合类的元素类型,您对需要升级前检查的配置信息的主体部分都在spec中给出。CCE通过spec的描述来执行检查。", - "$ref" : "#/components/schemas/PrecheckSpec" - } - }, - "type" : "object" - }, - "PrecheckCluserResponseMetadata" : { - "description" : "升级前检查元数据", - "properties" : { - "uid" : { - "description" : "检查任务ID", - "type" : "string" - } - }, - "type" : "object" + "required": true + } }, - "CertRevokeConfigRequestBody" : { - "properties" : { - "userId" : { - "type" : "string", - "description" : "用户ID" - }, - "agencyId" : { - "type" : "string", - "description" : "委托用户ID" + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UpgradeNodePool", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools/{nodepool_id}/operation/upgrade" + }, + "/CreateNodePool": { + "post": { + "tags": [ + "节点池管理" + ], + "summary": "创建节点池", + "description": "该API用于在指定集群下创建节点池。仅支持集群在处于可用、扩容、缩容状态时调用。", + "operationId": "CreateNodePool", + "deprecated": false, + "responses": { + "201": { + "description": "表示在指定集群下创建节点池的作业下发成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateNodePoolResp" + } + } + } } }, - "type" : "object" - }, - "JobSpec" : { - "properties" : { - "type" : { - "type" : "string", - "description" : "任务的类型,例:“CreateCluster”- 创建集群。" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "clusterUID" : { - "type" : "string", - "description" : "任务所在的集群的ID。" + { + "$ref": "#/components/parameters/param_path_clusterid" }, - "resourceID" : { - "type" : "string", - "description" : "任务操作的资源ID。" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "resourceName" : { - "type" : "string", - "description" : "任务操作的资源名称。" - }, - "extendParam" : { - "type" : "object", - "description" : "扩展参数。", - "additionalProperties" : { - "type" : "string" + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodePool" + } } }, - "subJobs" : { - "type" : "array", - "description" : "子任务的列表。", - "items" : { - "description" : "子任务的详细信息", - "$ref" : "#/components/schemas/Job" + "required": true + } + }, + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "CreateNodePool", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools" + }, + "/DeleteAutopilotRelease": { + "delete": { + "tags": [ + "模板管理(Autopilot)" + ], + "summary": "删除指定模板实例", + "description": "删除指定模板实例", + "operationId": "DeleteAutopilotRelease", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } } } - }, - "description" : "", - "type" : "object" + } }, - "JobMetadata" : { - "properties" : { - "uid" : { - "type" : "string", - "description" : "任务的ID。" - }, - "creationTimestamp" : { - "type" : "string", - "description" : "任务的创建时间。" - }, - "updateTimestamp" : { - "type" : "string", - "description" : "任务的更新时间。" + "x-method": "delete", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "DeleteAutopilotRelease", + "x-url": "{endpoint}/autopilot/cam/v3/clusters/{cluster_id}/namespace/{namespace}/releases/{name}" + }, + "/ListAutopilotReleases": { + "get": { + "tags": [ + "模板管理(Autopilot)" + ], + "summary": "获取模板实例列表", + "description": "获取模板实例列表", + "operationId": "ListAutopilotReleases", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReleaseResp" + } + } + } + } } }, - "description" : "", - "type" : "object" - }, - "Job" : { - "properties" : { - "kind" : { - "type" : "string", - "description" : "API类型,固定值“Job”,该值不可修改。", - "default" : "Job" - }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”,该值不可修改。", - "default" : "v3" + "parameters": [ + { + "$ref": "#/components/parameters/param_header_content_type" }, - "metadata" : { - "description" : "任务元数据。", - "$ref" : "#/components/schemas/JobMetadata" + { + "$ref": "#/components/parameters/param_header_x_auth_token" }, - "spec" : { - "description" : "任务详细参数。", - "$ref" : "#/components/schemas/JobSpec" + { + "$ref": "#/components/parameters/param_path_clusterid" }, - "status" : { - "description" : "任务状态信息。", - "$ref" : "#/components/schemas/JobStatus" - } - }, - "description" : "", - "type" : "object" - }, - "JobStatus" : { - "properties" : { - "phase" : { - "type" : "string", - "description" : "任务的状态,有如下四种状态:" + { + "name": "chart_id", + "in": "query", + "description": "模板ID", + "schema": { + "description": "模板ID", + "type": "string" + } }, - "reason" : { - "type" : "string", - "description" : "任务变为当前状态的原因" + { + "name": "namespace", + "in": "query", + "description": "模板对应的命名空间", + "schema": { + "description": "模板对应的命名空间", + "type": "string" + } } - }, - "description" : "", - "type" : "object" + ] }, - "UpgradePath" : { - "description" : "升级路径", - "properties" : { - "version" : { - "type" : "string", - "description" : "集群版本,v1.19及以下集群形如v1.19.16-r20,v1.21及以上形如v1.21,v1.23,详细请参考CCE集群版本号说明。" - }, - "platformVersion" : { - "type" : "string", - "description" : "CCE集群平台版本号,表示集群版本(version)下的内部版本。用于跟踪某一集群版本内的迭代,集群版本内唯一,跨集群版本重新计数。" - }, - "targetVersions" : { - "type" : "array", - "description" : "可升级的目标版本集合", - "items" : { - "type" : "string", - "description" : "可升级的目标版本,如v1.25.1-r0,关于版本号格式请参考CCE集群版本号说明。" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListAutopilotReleases", + "x-url": "{endpoint}/autopilot/cam/v3/clusters/{cluster_id}/releases" + }, + "/CreateClusterMasterSnapshot": { + "post": { + "tags": [ + "集群升级" + ], + "summary": "集群备份", + "description": "集群备份", + "operationId": "CreateClusterMasterSnapshot", + "responses": { + "200": { + "description": "表示创建集群备份任务成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotClusterResponseBody" + } + } } } }, - "type" : "object" - }, - "ClusterUpgradePathsResponseBody" : { - "description" : "集群升级特性开关配置返回体", - "properties" : { - "apiVersion" : { - "type" : "string", - "description" : "API版本" - }, - "kind" : { - "type" : "string", - "description" : "资源类型" - }, - "metadata" : { - "description" : "基本信息,为集合类的元素类型,包含一组由不同名称定义的属性", - "$ref" : "#/components/schemas/Metadata" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "upgradePaths" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UpgradePath" - }, - "description" : "升级路径集合" + { + "$ref": "#/components/parameters/param_path_clusterid" } - }, - "type" : "object" + ] }, - "PersistentVolumeClaimStatus" : { - "properties" : { - "accessModes" : { - "type" : "array", - "description" : "显示volume实际具有的访问模式。", - "items" : { - "type" : "string", - "description" : "" + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "CreateClusterMasterSnapshot", + "x-url": "{endpoint}/api/v3.1/projects/{project_id}/clusters/{cluster_id}/operation/snapshot" + }, + "/UploadAutopilotChart": { + "post": { + "tags": [ + "模板管理(Autopilot)" + ], + "summary": "上传模板", + "description": "上传模板", + "operationId": "UploadAutopilotChart", + "deprecated": false, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChartResp" + } + } } - }, - "capacity" : { - "type" : "string", - "description" : "底层卷的实际资源" - }, - "phase" : { - "type" : "string", - "description" : "PersistentVolumeClaim当前所处的状态" } }, - "description" : "", - "type" : "object" - }, - "PersistentVolumeClaim" : { - "required" : [ "apiVersion", "kind", "metadata", "spec" ], - "properties" : { - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值**v1**", - "default" : "v1" + "parameters": [ + { + "$ref": "#/components/parameters/param_header_content_type" }, - "kind" : { - "type" : "string", - "description" : "API类型,固定值**PersistentVolumeClaim**", - "default" : "PersistentVolumeClaim" + { + "$ref": "#/components/parameters/param_header_x_auth_token" }, - "metadata" : { - "description" : "metadata是集群对象的元数据定义,是集合类的元素类型,包含一组由不同名称定义的属性。", - "$ref" : "#/components/schemas/PersistentVolumeClaimMetadata" - }, - "spec" : { - "description" : "spec是集合类的元素类型,用户对需要管理的集群对象进行详细描述的主体部分都在spec中给出。系统通过spec的描述来创建或更新对象。", - "$ref" : "#/components/schemas/PersistentVolumeClaimSpec" + { + "name": "parameters", + "in": "formData", + "description": "上传模板的配置参数,示例如下:\"{\\\"override\\\":true,\\\"skip_lint\\\":true,\\\"source\\\":\\\"package\\\"}\"", + "required": false, + "schema": { + "description": "上传模板的配置参数,示例如下:\"{\\\"override\\\":true,\\\"skip_lint\\\":true,\\\"source\\\":\\\"package\\\"}\"", + "type": "string" + } }, - "status" : { - "description" : "status是当前PersistentVolumeClaim的状态信息,创建时不需要添加status参数。", - "$ref" : "#/components/schemas/PersistentVolumeClaimStatus" + { + "name": "content", + "in": "formData", + "description": "模板包文件", + "required": true, + "schema": { + "description": "模板包文件", + "type": "file" + } } - }, - "description" : "", - "type" : "object" + ] }, - "PersistentVolumeClaimMetadata" : { - "required" : [ "name" ], - "properties" : { - "name" : { - "type" : "string", - "example" : "例:my-pvc", - "description" : "PersistentVolumeClaim名称,可以包含小写字母、数字、连字符和点,开头和结尾必须是字母或数字,最长253个字符,同一namespace下name不能重复。" - }, - "labels" : { - "type" : "string", - "description" : "PersistentVolumeClaim标签,key/value对格式。" + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UploadAutopilotChart", + "x-url": "{endpoint}/autopilot/v2/charts" + }, + "/ShowClusterSupportConfiguration": { + "get": { + "tags": [ + "配置管理" + ], + "summary": "根据集群版本类型等查询集群支持的详细配置项,用于集群创建时指定", + "description": "该API用于根据集群版本类型等查询集群支持的详细配置项,用于集群创建时指定。", + "operationId": "ShowClusterSupportConfiguration", + "responses": { + "200": { + "description": "表示获取指定集群配置参数列表成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterConfigDetailRespBody" + } + } + } } }, - "description" : "metadata是集群对象的元数据定义,是集合类的元素类型,包含一组由不同名称定义的属性。", - "type" : "object" - }, - "PersistentVolumeClaimSpec" : { - "required" : [ "accessModes", "storageType", "volumeID" ], - "properties" : { - "volumeID" : { - "type" : "string", - "description" : "资源需为已经存在的存储资源" - }, - "storageType" : { - "type" : "string", - "description" : "云存储的类型,和volumeID搭配使用。即volumeID和storageType必须同时被配置。" + "parameters": [ + { + "$ref": "#/components/parameters/param_query_clusterid" }, - "accessModes" : { - "type" : "array", - "description" : "指定volume应该具有的访问模式,列表中仅第一个配置参数有效。", - "items" : { - "type" : "string", - "description" : "", - "enum" : [ "ReadOnlyMany", "ReadWriteMany" ] - } + { + "$ref": "#/components/parameters/param_query_cluster_type" }, - "storageClassName" : { - "type" : "string", - "description" : "PVC的StorageClass名称" + { + "$ref": "#/components/parameters/param_query_cluster_version" }, - "volumeName" : { - "type" : "string", - "description" : "PVC绑定的PV名称" + { + "$ref": "#/components/parameters/param_query_network_mode" }, - "resources" : { - "description" : "资源需求和限制", - "$ref" : "#/components/schemas/ResourceRequirements" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "volumeMode" : { - "type" : "string", - "description" : "PVC指定的PV类型" + { + "$ref": "#/components/parameters/param_header_x_auth_token" } - }, - "description" : "", - "type" : "object" - }, - "ResourceRequirements" : { - "properties" : { - "limits" : { - "description" : "资源限制,创建时指定无效", - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - }, - "requests" : { - "description" : "资源需求,创建时指定无效", - "type" : "object", - "additionalProperties" : { - "type" : "string" + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowClusterSupportConfiguration", + "x-url": "{endpoint}/api/v3/clusters/configuration/detail" + }, + "/DownloadAutopilotChart": { + "get": { + "tags": [ + "模板管理(Autopilot)" + ], + "summary": "下载模板", + "description": "下载模板", + "operationId": "DownloadAutopilotChart", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "file" + } + } } } }, - "type" : "object" - }, - "CreateUpgradeWorkFlowRequestBody" : { - "required" : [ "apiVersion", "kind", "spec" ], - "properties" : { - "kind" : { - "type" : "string", - "pattern" : "WorkFlowTask", - "description" : "API类型,固定值“WorkFlowTask”,该值不可修改。", - "default" : "WorkFlowTask" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_chart_id" }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”,该值不可修改。", - "default" : "v3", - "pattern" : "v3" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "spec" : { - "$ref" : "#/components/schemas/WorkFlowSpec" + { + "$ref": "#/components/parameters/param_header_x_auth_token" } - }, - "type" : "object" + ] }, - "ReinstallVolumeSpec" : { - "description" : "服务器重装云硬盘配置", - "properties" : { - "imageID" : { - "type" : "string", - "format" : "uuid", - "description" : "用户自定义镜像ID" - }, - "cmkID" : { - "type" : "string", - "description" : "用户主密钥ID。默认为空时,表示云硬盘不加密。" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "DownloadAutopilotChart", + "x-url": "{endpoint}/autopilot/v2/charts/{chart_id}/archive" + }, + "/ShowNodePool": { + "get": { + "tags": [ + "节点池管理" + ], + "summary": "获取指定的节点池", + "description": "该API用于获取指定节点池的详细信息。", + "operationId": "ShowNodePool", + "deprecated": false, + "responses": { + "200": { + "description": "表示获取指定节点池成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodePoolResp" + } + } + } } }, - "type" : "object" - }, - "ReinstallNodeSpec" : { - "description" : "节点重装配置参数", - "required" : [ "os", "login" ], - "properties" : { - "os" : { - "type" : "string", - "description" : "操作系统。指定自定义镜像场景将以IMS镜像的实际操作系统版本为准。请选择当前集群支持的操作系统版本,例如EulerOS 2.5、CentOS 7.6、EulerOS 2.8。" - }, - "login" : { - "description" : "节点的登录方式。密钥对和密码登录方式二者必选其一。", - "$ref" : "#/components/schemas/Login" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "name" : { - "type" : "string", - "description" : "节点名称" + { + "$ref": "#/components/parameters/param_path_clusterid" }, - "serverConfig" : { - "description" : "服务器配置", - "$ref" : "#/components/schemas/ReinstallServerConfig" + { + "$ref": "#/components/parameters/param_path_nodepool_id" }, - "volumeConfig" : { - "description" : "卷管理配置", - "$ref" : "#/components/schemas/ReinstallVolumeConfig" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "runtimeConfig" : { - "description" : "容器运行时配置", - "$ref" : "#/components/schemas/ReinstallRuntimeConfig" - }, - "k8sOptions" : { - "description" : "Kubernetes节点配置", - "$ref" : "#/components/schemas/ReinstallK8sOptionsConfig" - }, - "lifecycle" : { - "description" : "节点自定义生命周期配置", - "$ref" : "#/components/schemas/NodeLifecycleConfig" - }, - "initializedConditions" : { - "type" : "array", - "description" : "自定义初始化标记。", - "maxItems" : 2, - "items" : { - "pattern" : "^[A-Za-z0-9]+$", - "minLength" : 1, - "maxLength" : 20, - "type" : "string" - } + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowNodePool", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools/{nodepool_id}" + }, + "/UpdateChart": { + "put": { + "tags": [ + "模板管理" + ], + "summary": "更新模板", + "description": "更新模板", + "operationId": "UpdateChart", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChartResp" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_chart_id" }, - "extendParam" : { - "description" : "重装拓展参数,已废弃", - "$ref" : "#/components/schemas/ReinstallExtendParam" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "hostnameConfig" : { - "$ref" : "#/components/schemas/HostnameConfig", - "description" : "K8S节点名称配置参数,支持的集群版本为v1.23.6-r0到v1.25或者v1.25.2-r0及以上。" + { + "$ref": "#/components/parameters/param_header_x_auth_token" }, - "securityReinforcementType" : { - "type" : "string", - "description" : "**参数解释**:", - "enum" : [ "null", "cybersecurity" ] - } - }, - "type" : "object" - }, - "ResetNode" : { - "description" : "重置节点参数。集群内已有节点通过重置进行重新安装并接入集群。", - "required" : [ "nodeID", "spec" ], - "properties" : { - "nodeID" : { - "type" : "string", - "format" : "uuid", - "description" : "节点ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)。" + { + "name": "parameters", + "in": "formData", + "description": "上传模板的配置参数,示例如下:\"{\\\"override\\\":true,\\\"skip_lint\\\":true,\\\"source\\\":\\\"package\\\"}\"", + "required": false, + "schema": { + "description": "上传模板的配置参数,示例如下:\"{\\\"override\\\":true,\\\"skip_lint\\\":true,\\\"source\\\":\\\"package\\\"}\"", + "type": "string" + } }, - "spec" : { - "description" : "节点重装配置参数。节点池内节点不支持外部指定,将以节点池配置进行重装,默认节点池中节点此参数必选。", - "$ref" : "#/components/schemas/ReinstallNodeSpec" + { + "name": "content", + "in": "formData", + "description": "模板包文件", + "required": true, + "schema": { + "description": "模板包文件", + "type": "file" + } } - }, - "type" : "object" + ] }, - "ReinstallRuntimeConfig" : { - "description" : "节点重装场景容器运行时配置", - "properties" : { - "dockerBaseSize" : { - "type" : "integer", - "format" : "int32", - "minimum" : 10, - "maximum" : 500, - "description" : "节点上单容器的可用磁盘空间大小,单位G。" - }, - "runtime" : { - "$ref" : "#/components/schemas/Runtime", - "description" : "容器运行时, 默认场景:" - } - }, - "type" : "object" - }, - "NodeLifecycleConfig" : { - "description" : "节点自定义生命周期配置", - "properties" : { - "preInstall" : { - "type" : "string", - "description" : "安装前执行脚本", - "maxLength" : 2048 - }, - "postInstall" : { - "type" : "string", - "description" : "安装后执行脚本", - "maxLength" : 2048 - } - }, - "type" : "object" - }, - "ReinstallServerConfig" : { - "description" : "节点重装场景服务器配置", - "properties" : { - "userTags" : { - "type" : "array", - "description" : "云服务器标签,键必须唯一,CCE支持的最大用户自定义标签数量依region而定,自定义标签数上限为5个。", - "items" : { - "$ref" : "#/components/schemas/UserTag" - } - }, - "rootVolume" : { - "description" : "系统盘重装配置", - "$ref" : "#/components/schemas/ReinstallVolumeSpec" + "x-method": "put", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UpdateChart", + "x-url": "{endpoint}/v2/charts/{chart_id}" + }, + "/AddNodesToNodePool": { + "post": { + "tags": [ + "节点管理" + ], + "summary": "自定义节点池纳管节点", + "description": "该API用于在指定集群自定义节点池下纳管节点。竞价实例不支持纳管。", + "operationId": "AddNodesToNodePool", + "deprecated": false, + "responses": { + "200": { + "description": "表示在指定集群自定义节点池下纳管节点的作业下发成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReinstallJobResult" + } + } + } } }, - "type" : "object" - }, - "ReinstallK8sOptionsConfig" : { - "description" : "节点重装场景Kubernetes节点配置", - "properties" : { - "labels" : { - "type" : "object", - "description" : "格式为key/value键值对。键值对个数不超过20条。", - "additionalProperties" : { - "type" : "string", - "maxLength" : 63 - } + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "taints" : { - "type" : "array", - "description" : "支持给创建出来的节点加Taints来设置反亲和性,taints配置不超过20条。每条Taints包含以下3个参数:", - "items" : { - "$ref" : "#/components/schemas/Taint" - }, - "maxItems" : 20 + { + "$ref": "#/components/parameters/param_path_clusterid" }, - "maxPods" : { - "type" : "integer", - "format" : "int32", - "description" : "节点最大允许创建的实例数(Pod),该数量包含系统默认实例,取值范围为16~256。" + { + "$ref": "#/components/parameters/param_path_nodepool_id" }, - "nicMultiqueue" : { - "type" : "string", - "description" : "- 弹性网卡队列数配置,默认配置示例如下:" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "nicThreshold" : { - "type" : "string", - "description" : "- 弹性网卡预绑定比例配置,默认配置示例如下:" + { + "$ref": "#/components/parameters/param_header_x_auth_token" } - }, - "type" : "object" - }, - "ReinstallVolumeConfig" : { - "description" : "节点重装场景服务器相关配置", - "properties" : { - "lvmConfig" : { - "type" : "string", - "description" : "Docker数据盘配置项。" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddNodesToNodePoolList" + } + } }, - "storage" : { - "$ref" : "#/components/schemas/Storage" + "required": true + } + }, + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "AddNodesToNodePool", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools/{nodepool_id}/nodes/add" + }, + "/HibernateCluster": { + "post": { + "tags": [ + "集群管理" + ], + "summary": "集群休眠", + "description": "集群休眠用于将运行中的集群置于休眠状态,休眠后,将不再收取控制节点资源费用。", + "operationId": "HibernateCluster", + "deprecated": false, + "responses": { + "200": { + "description": "表示集群休眠任务下发成功,需持续查询集群状态,当集群状态变为Hibernation后表示休眠成功" } }, - "type" : "object" - }, - "ResetNodeList" : { - "description" : "纳管节点参数。满足条件的已有服务器,支持通过纳管节点方式安装并接入集群,重置过程将清理节点上系统盘、数据盘数据,并作为新节点接入Kuberntes集群,请提前备份迁移关键数据。其中节点池内节点重置时不支持外部指定配置,将以节点池配置进行校验并重装,以保证同节点池节点一致性。", - "required" : [ "apiVersion", "kind", "nodeList" ], - "properties" : { - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”。" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "kind" : { - "type" : "string", - "description" : "API类型,固定值“List”。" + { + "$ref": "#/components/parameters/param_path_clusterid" }, - "nodeList" : { - "type" : "array", - "description" : "重置节点列表", - "items" : { - "$ref" : "#/components/schemas/ResetNode" - } + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" } - }, - "type" : "object" + ] }, - "ReinstallExtendParam" : { - "description" : "重装拓展参数,已废弃。", - "properties" : { - "alpha.cce/NodeImageID" : { - "type" : "string", - "format" : "uuid", - "description" : "指定待切换目标操作系统所使用的用户镜像ID,已废弃。" + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "HibernateCluster", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/hibernate" + }, + "/CreateNode": { + "post": { + "tags": [ + "节点管理" + ], + "summary": "创建节点", + "description": "该API用于在指定集群下创建节点。", + "operationId": "CreateNode", + "deprecated": false, + "responses": { + "201": { + "description": "表示在指定集群下创建节点的作业下发成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Node" + } + } + } } }, - "type" : "object" - }, - "ClusterUpgradeFeatureGatesResponseBody" : { - "description" : "集群升级特性开关配置返回体", - "properties" : { - "apiVersion" : { - "type" : "string", - "description" : "API版本" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "kind" : { - "type" : "string", - "description" : "资源类型" + { + "$ref": "#/components/parameters/param_path_clusterid" }, - "metadata" : { - "description" : "基本信息,为集合类的元素类型,包含一组由不同名称定义的属性", - "$ref" : "#/components/schemas/Metadata" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "upgradeFeatureGates" : { - "type" : "object", - "description" : "特性开关信息,格式为key/value键值对。", - "additionalProperties" : { - "type" : "string" + { + "$ref": "#/components/parameters/param_header_x_auth_token" + }, + { + "name": "nodepoolScaleUp", + "in": "query", + "description": "标明是否为nodepool下发的请求。若不为“NodepoolScaleUp”将自动更新对应节点池的实例数", + "required": false, + "schema": { + "description": "标明是否为nodepool下发的请求。若不为“NodepoolScaleUp”将自动更新对应节点池的实例数", + "type": "string", + "enum": [ + "NodepoolScaleUp" + ] } } - }, - "type" : "object" - }, - "CreateImageCacheRequestBody" : { - "required" : [ "name", "images", "building_config" ], - "properties" : { - "name" : { - "type" : "string", - "description" : "**参数解释:**", - "example" : "test-imagecache1", - "minLength" : 1, - "maxLength" : 128, - "pattern" : "^[a-z]([a-z0-9-]*[a-z0-9])?$" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodeCreateRequest" + } + } }, - "images" : { - "type" : "array", - "description" : "镜像缓存中的容器镜像列表。", - "items" : { - "type" : "string", - "description" : "**参数解释:**", - "minLength" : 1, - "maxLength" : 1024 - }, - "maxItems" : 20, - "minItems" : 1, - "example" : [ "swr.region.com/test/nginx:v1", "busybox:latest" ] - }, - "image_cache_size" : { - "type" : "integer", - "format" : "int32", - "description" : "**参数解释:**", - "default" : 20, - "example" : 25, - "minimum" : 20, - "maximum" : 400 - }, - "retention_days" : { - "type" : "integer", - "format" : "int32", - "description" : "**参数解释:**", - "minimum" : 0, - "maximum" : 10000, - "default" : 0, - "example" : 7 - }, - "building_config" : { - "description" : "构建镜像缓存的配置信息。", - "$ref" : "#/components/schemas/ImageCacheBuildingConfig" - } - }, - "description" : "创建镜像缓存-respuest结构体。", - "type" : "object" - }, - "CreateImageCacheResponseBody" : { - "required" : [ "image_cache" ], - "properties" : { - "image_cache" : { - "description" : "镜像缓存信息。", - "$ref" : "#/components/schemas/ImageCacheDetail" - } - }, - "description" : "创建镜像缓存-response结构体。", - "type" : "object" - }, - "QuotaResp" : { - "required" : [ "quotas" ], - "properties" : { - "quotas" : { - "type" : "object", - "description" : "模板配额", - "properties" : { - "resources" : { - "type" : "array", - "description" : "资源", - "items" : { - "properties" : { - "type" : { - "type" : "string", - "description" : "类型", - "example" : "Charts" - }, - "quota" : { - "type" : "integer", - "description" : "配额", - "example" : 200 - }, - "used" : { - "type" : "integer", - "description" : "已使用量", - "example" : 2 - } - } + "required": true + } + }, + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "CreateNode", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes" + }, + "/ShowChart": { + "get": { + "tags": [ + "模板管理" + ], + "summary": "获取模板", + "description": "获取模板", + "operationId": "ShowChart", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChartResp" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_chart_id" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowChart", + "x-url": "{endpoint}/v2/charts/{chart_id}" + }, + "/ListAutopilotClusters": { + "get": { + "tags": [ + "集群管理(Autopilot)" + ], + "summary": "获取指定项目下的集群", + "description": "该API用于获取指定项目下所有集群的详细信息。", + "operationId": "ListAutopilotClusters", + "deprecated": false, + "responses": { + "200": { + "description": "表示获取集群列表成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutopilotClusterList" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + }, + { + "name": "detail", + "in": "query", + "description": "查询集群详细信息。", + "required": false, + "schema": { + "description": "查询集群详细信息。", + "type": "string" + } + }, + { + "name": "status", + "in": "query", + "description": "集群状态,取值如下", + "required": false, + "schema": { + "description": "集群状态,取值如下", + "type": "string", + "enum": [ + "Available", + "Unavailable", + "Creating", + "Deleting", + "Upgrading", + "RollingBack", + "RollbackFailed", + "Error" + ] + } + }, + { + "name": "type", + "in": "query", + "description": "集群类型:", + "required": false, + "schema": { + "description": "集群类型:", + "type": "string", + "enum": [ + "VirtualMachine" + ] + } + }, + { + "name": "version", + "in": "query", + "description": "集群版本过滤", + "required": false, + "schema": { + "example": "v1.15.11", + "description": "集群版本过滤", + "type": "string", + "maxLength": 20, + "minLength": 0 + } + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListAutopilotClusters", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters" + }, + "/UpdateAutopilotMaintenanceWindow": { + "put": { + "tags": [ + "集群升级(Autopilot)" + ], + "summary": "更新集群维护窗口", + "description": "该API用于更新集群维护窗口。", + "operationId": "UpdateAutopilotMaintenanceWindow", + "responses": { + "200": { + "description": "更新集群维护窗口成功", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MaintenanceWindow" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MaintenanceWindow" + } + } + }, + "required": true + } + }, + "x-method": "put", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UpdateAutopilotMaintenanceWindow", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/maintenancewindows" + }, + "/ShowVersion": { + "get": { + "tags": [ + "API版本信息" + ], + "summary": "查询API版本信息列表", + "description": "该API用于查询CCE服务当前支持的API版本信息列表。", + "operationId": "ShowVersion", + "responses": { + "200": { + "description": "表示查询API版本信息列表成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIVersionList" } } } } - }, - "description" : "quota of charts", - "type" : "object" + } }, - "ClusterLogConfig" : { - "type" : "object", - "properties" : { - "ttl_in_days" : { - "type" : "integer", - "format" : "int32", - "example" : 7, - "description" : "存储时长" - }, - "log_configs" : { - "items" : { - "properties" : { - "name" : { - "type" : "string", - "example" : "audit", - "description" : "日志类型" - }, - "enable" : { - "type" : "boolean", - "example" : false, - "description" : "是否采集" - }, - "type" : { - "type" : "string", - "description" : "组件类型" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowVersion", + "x-url": "{endpoint}/" + }, + "/RemoveNode": { + "put": { + "tags": [ + "节点管理" + ], + "summary": "节点移除", + "description": "该API用于在指定集群下移除节点。", + "operationId": "RemoveNode", + "deprecated": false, + "responses": { + "200": { + "description": "表示在指定集群下移除节点的作业下发成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RemoveNodesTask" } } - }, - "type" : "array", - "description" : "日志配置项" + } } - } - }, - "PrecheckClusterTaskResponseBody" : { - "properties" : { - "apiVersion" : { - "type" : "string", - "description" : "api版本,默认为v3" - }, - "kind" : { - "type" : "string", - "description" : "资源类型,默认为PreCheckTask" + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "metadata" : { - "description" : "升级前检查任务元数据信息", - "$ref" : "#/components/schemas/PrecheckTaskMetadata" + { + "$ref": "#/components/parameters/param_path_clusterid" }, - "spec" : { - "description" : "升级前检查任务信息", - "$ref" : "#/components/schemas/PrecheckSpec" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "status" : { - "description" : "升级前检查任务状态", - "$ref" : "#/components/schemas/PrecheckStatus" + { + "$ref": "#/components/parameters/param_header_x_auth_token" } - }, - "type" : "object" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RemoveNodesTask" + } + } + }, + "required": true + } }, - "Context" : { - "properties" : { - "cluster" : { - "type" : "string", - "description" : "上下文cluster信息。" + "x-method": "put", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "RemoveNode", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/operation/remove" + }, + "/ListImageCaches": { + "get": { + "tags": [ + "镜像缓存管理" + ], + "summary": "查询镜像缓存列表", + "description": "查询镜像缓存列表", + "operationId": "ListImageCaches", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListImageCacheResponseBody" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/ListImageCachesParam_header_content_type" }, - "user" : { - "type" : "string", - "description" : "上下文user信息。" + { + "$ref": "#/components/parameters/ListImageCachesParam_header_x_auth_token" + }, + { + "name": "name", + "in": "query", + "description": "**参数解释:**", + "required": false, + "schema": { + "description": "**参数解释:**", + "type": "string", + "maxLength": 128, + "minLength": 0 + } + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListImageCaches", + "x-url": "{endpoint}/v5/imagecaches" + }, + "/ListUpgradeClusterTasks": { + "get": { + "tags": [ + "集群升级" + ], + "summary": "获取集群升级任务详情列表", + "description": "获取集群升级任务详情列表", + "operationId": "ListUpgradeClusterTasks", + "responses": { + "200": { + "description": "表示获取集群升级任务详情列表成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeTaskListResponseBody" + } + } + } } }, - "type" : "object" - }, - "ClusterCert" : { - "properties" : { - "server" : { - "type" : "string", - "description" : "服务器地址。" - }, - "certificate-authority-data" : { - "type" : "string", - "description" : "证书授权数据。" - }, - "insecure-skip-tls-verify" : { - "type" : "boolean", - "description" : "不校验服务端证书,在 cluster 类型为 externalCluster 时,该值为 true。" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListUpgradeClusterTasks", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgrade/tasks" + }, + "/UpdateAutopilotChart": { + "put": { + "tags": [ + "模板管理(Autopilot)" + ], + "summary": "更新模板", + "description": "更新模板", + "operationId": "UpdateAutopilotChart", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChartResp" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_chart_id" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + }, + { + "name": "parameters", + "in": "formData", + "description": "上传模板的配置参数,示例如下:\"{\\\"override\\\":true,\\\"skip_lint\\\":true,\\\"source\\\":\\\"package\\\"}\"", + "required": false, + "schema": { + "description": "上传模板的配置参数,示例如下:\"{\\\"override\\\":true,\\\"skip_lint\\\":true,\\\"source\\\":\\\"package\\\"}\"", + "type": "string" + } + }, + { + "name": "content", + "in": "formData", + "description": "模板包文件", + "required": true, + "schema": { + "description": "模板包文件", + "type": "file" + } + } + ] + }, + "x-method": "put", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UpdateAutopilotChart", + "x-url": "{endpoint}/autopilot/v2/charts/{chart_id}" + }, + "/ShowAutopilotAddonInstance": { + "get": { + "tags": [ + "插件管理(Autopilot)" + ], + "summary": "获取AddonInstance详情", + "description": "获取插件实例详情。", + "operationId": "ShowAutopilotAddonInstance", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddonInstance" + } + } + } } }, - "type" : "object" - }, - "ClusterCertResponseBody" : { - "properties" : { - "kind" : { - "type" : "string", - "description" : "API类型,固定值“Config”,该值不可修改。", - "default" : "Config" - }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v1”。" + "parameters": [ + { + "$ref": "#/components/parameters/param_header_content_type" }, - "preferences" : { - "type" : "object", - "description" : "当前未使用该字段,当前默认为空。" + { + "$ref": "#/components/parameters/param_header_x_auth_token" }, - "clusters" : { - "type" : "array", - "description" : "集群列表。", - "items" : { - "$ref" : "#/components/schemas/Clusters" - } + { + "name": "id", + "in": "path", + "description": "插件实例id", + "required": true, + "schema": { + "description": "插件实例id", + "type": "string", + "maxLength": 255, + "minLength": 1 + } }, - "users" : { - "type" : "array", - "description" : "存放了指定用户的一些证书信息和ClientKey信息。", - "items" : { - "$ref" : "#/components/schemas/Users" + { + "name": "cluster_id", + "in": "query", + "description": "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", + "required": false, + "schema": { + "description": "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", + "type": "string", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" } - }, - "contexts" : { - "type" : "array", - "description" : "上下文列表。", - "items" : { - "$ref" : "#/components/schemas/Contexts" - } - }, - "current-context" : { - "type" : "string", - "description" : "当前上下文,若存在publicIp(虚拟机弹性IP)时为 external; 若不存在publicIp为 internal。" - } - }, - "type" : "object" - }, - "User" : { - "properties" : { - "client-certificate-data" : { - "type" : "string", - "description" : "客户端证书。" - }, - "client-key-data" : { - "type" : "string", - "description" : "包含来自TLS客户端密钥文件的PEM编码数据。" } - }, - "type" : "object" + ] }, - "Users" : { - "properties" : { - "name" : { - "type" : "string", - "description" : "当前为固定值“user“。" - }, - "user" : { - "description" : "存放了指定用户的一些证书信息和ClientKey信息。", - "$ref" : "#/components/schemas/User" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowAutopilotAddonInstance", + "x-url": "{endpoint}/autopilot/v3/addons/{id}" + }, + "/CreateAutopilotRelease": { + "post": { + "tags": [ + "模板管理(Autopilot)" + ], + "summary": "创建模板实例", + "description": "创建模板实例", + "operationId": "CreateAutopilotRelease", + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReleaseResp" + } + } + } } }, - "type" : "object" - }, - "Contexts" : { - "properties" : { - "name" : { - "type" : "string", - "description" : "上下文的名称。" + "parameters": [ + { + "$ref": "#/components/parameters/param_header_content_type" }, - "context" : { - "description" : "上下文信息。", - "$ref" : "#/components/schemas/Context" - } - }, - "type" : "object" - }, - "Clusters" : { - "properties" : { - "name" : { - "type" : "string", - "description" : "集群名字。" + { + "$ref": "#/components/parameters/param_header_x_auth_token" }, - "cluster" : { - "description" : "集群信息。", - "$ref" : "#/components/schemas/ClusterCert" - } - }, - "type" : "object" - }, - "CertDuration" : { - "required" : [ "duration" ], - "properties" : { - "duration" : { - "type" : "integer", - "format" : "int32", - "description" : "集群证书有效时间,单位为天,最小值为1,最大值为1825(5*365,1年固定计365天,忽略闰年影响);若填-1则为最大值5年。", - "minimum" : 1, - "maximum" : 1825 + { + "$ref": "#/components/parameters/param_path_clusterid" } - }, - "description" : "集群证书有效期", - "type" : "object" - }, - "PartitionReqBody" : { - "type" : "object", - "description" : "集群分区信息", - "properties" : { - "kind" : { - "type" : "string", - "example" : "Partition", - "description" : "资源类型" - }, - "apiVersion" : { - "type" : "string", - "example" : "v3", - "description" : "API版本" - }, - "metadata" : { - "description" : "分区的元数据信息", - "properties" : { - "name" : { - "type" : "string", - "example" : "partitionName", - "description" : "分区名称" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateReleaseReqBody" } } }, - "spec" : { - "description" : "分区的配置信息", - "properties" : { - "hostNetwork" : { - "description" : "分区子网", - "properties" : { - "subnetID" : { - "type" : "string", - "example" : "subnetID", - "description" : "子网ID" - } + "required": true + } + }, + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "CreateAutopilotRelease", + "x-url": "{endpoint}/autopilot/cam/v3/clusters/{cluster_id}/releases" + }, + "/DeleteNodePool": { + "delete": { + "tags": [ + "节点池管理" + ], + "summary": "删除节点池", + "description": "该API用于删除指定的节点池。", + "operationId": "DeleteNodePool", + "deprecated": false, + "responses": { + "200": { + "description": "表示删除节点池作业下发成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteNodePoolResp" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_path_nodepool_id" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] + }, + "x-method": "delete", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "DeleteNodePool", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools/{nodepool_id}" + }, + "/ListClusters": { + "get": { + "tags": [ + "集群管理" + ], + "summary": "获取指定项目下的集群", + "description": "该API用于获取指定项目下所有集群的详细信息。", + "operationId": "ListClusters", + "deprecated": false, + "responses": { + "200": { + "description": "表示获取集群列表成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterList" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + }, + { + "name": "detail", + "in": "query", + "description": "查询集群详细信息。", + "required": false, + "schema": { + "description": "查询集群详细信息。", + "type": "string" + } + }, + { + "name": "status", + "in": "query", + "description": "集群状态,取值如下", + "required": false, + "schema": { + "description": "集群状态,取值如下", + "type": "string", + "enum": [ + "Available", + "Unavailable", + "ScalingUp", + "ScalingDown", + "Creating", + "Deleting", + "Upgrading", + "Resizing", + "RollingBack", + "RollbackFailed", + "Hibernating", + "Hibernation", + "Awaking", + "Empty" + ] + } + }, + { + "name": "type", + "in": "query", + "description": "集群类型:", + "required": false, + "schema": { + "description": "集群类型:", + "type": "string", + "enum": [ + "VirtualMachine", + "ARM64" + ] + } + }, + { + "name": "version", + "in": "query", + "description": "集群版本过滤", + "required": false, + "schema": { + "example": "v1.15.11", + "description": "集群版本过滤", + "type": "string", + "maxLength": 20, + "minLength": 0 + } + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListClusters", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters" + }, + "/LockNodepoolNodeScaleDown": { + "post": { + "tags": [ + "节点管理" + ], + "summary": "节点开启缩容保护。", + "description": "该API用于节点开启缩容保护,开启缩容保护的节点无法通过修改节点池个数的方式被缩容。", + "operationId": "LockNodepoolNodeScaleDown", + "responses": { + "200": { + "description": "表示节点开启缩容保护成功。" + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LockNodeScaledownRequestBody" + } + } + }, + "required": true + } + }, + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "LockNodepoolNodeScaleDown", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/locknodescaledown" + }, + "/ShowAutopilotRelease": { + "get": { + "tags": [ + "模板管理(Autopilot)" + ], + "summary": "获取指定模板实例", + "description": "获取指定模板实例", + "operationId": "ShowAutopilotRelease", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReleaseResp" } - }, - "containerNetwork" : { - "items" : { - "properties" : { - "subnetID" : { - "type" : "string", - "example" : "subnetID", - "description" : "子网ID" - } - } - }, - "description" : "分区容器子网", - "type" : "array" - }, - "publicBorderGroup" : { - "type" : "string", - "example" : "publicBorderGroup", - "description" : "群组" - }, - "category" : { - "type" : "string", - "example" : "category", - "description" : "类别" } } } } }, - "ClusterConfigurationsSpec" : { - "description" : "Configuration的规格信息", - "required" : [ "packages" ], - "properties" : { - "packages" : { - "type" : "array", - "items" : { - "properties" : { - "name" : { - "type" : "string", - "description" : "组件名称" - }, - "configurations" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ConfigurationItem" - }, - "description" : "组件配置项详情" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowAutopilotRelease", + "x-url": "{endpoint}/autopilot/cam/v3/clusters/{cluster_id}/namespace/{namespace}/releases/{name}" + }, + "/CreateRelease": { + "post": { + "tags": [ + "模板管理" + ], + "summary": "创建模板实例", + "description": "创建模板实例", + "operationId": "CreateRelease", + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReleaseResp" } } - }, - "description" : "组件配置项列表" + } } }, - "type" : "object" - }, - "ClusterConfigRespBody" : { - "description" : "获取指定集群配置参数内容返回体", - "properties" : { - "apiVersion" : { - "type" : "string", - "description" : "API版本" - }, - "kind" : { - "type" : "string", - "description" : "API类型,固定值**Configuration**" + "parameters": [ + { + "$ref": "#/components/parameters/param_header_content_type" }, - "metadata" : { - "description" : "Configuration的元数据信息", - "$ref" : "#/components/schemas/ConfigurationMetadata" + { + "$ref": "#/components/parameters/param_header_x_auth_token" }, - "spec" : { - "description" : "Configuration的规格信息", - "$ref" : "#/components/schemas/ClusterConfigurationsSpec" - }, - "status" : { - "description" : "Configuration的状态信息", - "type" : "object" + { + "$ref": "#/components/parameters/param_path_clusterid" } - }, - "type" : "object" - }, - "ConfigurationMetadata" : { - "required" : [ "name" ], - "properties" : { - "name" : { - "type" : "string", - "description" : "Configuration名称" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateReleaseReqBody" + } + } }, - "labels" : { - "type" : "object", - "description" : "Configuration标签,key/value对格式。", - "additionalProperties" : { - "type" : "string", - "description" : "" + "required": true + } + }, + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "CreateRelease", + "x-url": "{endpoint}/cce/cam/v3/clusters/{cluster_id}/releases" + }, + "/ListPartitions": { + "get": { + "tags": [ + "集群管理" + ], + "summary": "获取分区列表", + "description": "获取分区列表", + "operationId": "ListPartitions", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PartitionList" + } + } } } - }, - "description" : "metadata字段数据结构说明", - "type" : "object" + } }, - "UpgradeCluserResponseMetadata" : { - "description" : "升级任务元数据", - "properties" : { - "uid" : { - "description" : "升级任务ID,可通过调用获取集群升级任务详情API查询进展", - "type" : "string" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListPartitions", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/partitions" + }, + "/UpdateAutopilotAddonInstance": { + "put": { + "tags": [ + "插件管理(Autopilot)" + ], + "summary": "更新AddonInstance", + "description": "更新插件实例的功能。", + "operationId": "UpdateAutopilotAddonInstance", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddonInstance" + } + } + } } }, - "type" : "object" - }, - "ClusterUpgradeAction" : { - "required" : [ "strategy", "targetVersion" ], - "properties" : { - "addons" : { - "description" : "插件配置列表", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/UpgradeAddonConfig" + "parameters": [ + { + "name": "id", + "in": "path", + "description": "插件实例id", + "required": true, + "schema": { + "description": "插件实例id", + "type": "string", + "maxLength": 255, + "minLength": 1 } }, - "nodeOrder" : { - "description" : "节点池内节点升级顺序配置。", - "type" : "object", - "additionalProperties" : { - "description" : "对应节点池内的节点升级顺序配置", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/NodePriority" - } - } + { + "$ref": "#/components/parameters/param_header_content_type" }, - "nodePoolOrder" : { - "description" : "节点池升级顺序配置,key/value对格式。", - "type" : "object", - "additionalProperties" : { - "type" : "integer", - "default" : 0, - "description" : "节点池的优先级,默认值为0,优先级最低,数值越大优先级越高" + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstanceRequest" + } } }, - "strategy" : { - "description" : "升级策略", - "$ref" : "#/components/schemas/UpgradeStrategy" - }, - "targetVersion" : { - "description" : "目标集群版本,例如\"v1.23\"", - "type" : "string" - }, - "isOnlyUpgrade" : { - "description" : "是否在集群升级流程中执行升级前检查。默认为false,表示会执行升级前检查,如果您在集群升级编排中调用了升级前检查的API,则升级时可用将该字段置为false,不再额外执行一次检查", - "type" : "boolean" - } - }, - "type" : "object" + "required": true + } }, - "UpgradeResponseSpec" : { - "description" : "升级任务元数据", - "properties" : { - "clusterUpgradeAction" : { - "description" : "集群升级配置", - "$ref" : "#/components/schemas/ClusterUpgradeResponseAction" + "x-method": "put", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UpdateAutopilotAddonInstance", + "x-url": "{endpoint}/autopilot/v3/addons/{id}" + }, + "/ListAutopilotPreCheckTasks": { + "get": { + "tags": [ + "集群升级(Autopilot)" + ], + "summary": "获取集群升级前检查任务详情列表", + "description": "获取集群升级前检查任务详情列表", + "operationId": "ListAutopilotPreCheckTasks", + "responses": { + "200": { + "description": "表示获取集群升级前检查任务详情列表成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrecheckClusterTaskListResponseBody" + } + } + } } }, - "type" : "object" - }, - "UpgradeAddonConfig" : { - "required" : [ "addonTemplateName", "operation", "version" ], - "properties" : { - "addonTemplateName" : { - "description" : "插件名称", - "type" : "string" - }, - "operation" : { - "description" : "执行动作,当前升级场景支持操作为\"patch\"", - "type" : "string" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "version" : { - "description" : "目标插件版本号", - "type" : "string" - }, - "values" : { - "type" : "object", - "description" : "插件参数列表,Key:Value格式" + { + "$ref": "#/components/parameters/param_path_clusterid" } - }, - "type" : "object" + ] }, - "ClusterUpgradeResponseAction" : { - "properties" : { - "version" : { - "description" : "当前集群版本", - "type" : "string" - }, - "targetVersion" : { - "description" : "目标集群版本,例如\"v1.23\"", - "type" : "string" - }, - "targetPlatformVersion" : { - "description" : "目标集群的平台版本号,表示集群版本(version)下的内部版本,不支持用户指定。", - "type" : "string" - }, - "strategy" : { - "description" : "升级策略", - "$ref" : "#/components/schemas/UpgradeStrategy" - }, - "config" : { - "description" : "升级过程中指定的集群配置", - "type" : "object" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListAutopilotPreCheckTasks", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/precheck/tasks" + }, + "/ShowImageCache": { + "get": { + "tags": [ + "镜像缓存管理" + ], + "summary": "查询镜像缓存详情", + "description": "查询镜像缓存详情", + "operationId": "ShowImageCache", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetImageCacheResponseBody" + } + } + } } }, - "type" : "object" - }, - "UpgradeClusterResponseBody" : { - "description" : "原地升级配置", - "properties" : { - "metadata" : { - "description" : "升级任务元数据信息", - "$ref" : "#/components/schemas/UpgradeCluserResponseMetadata" + "parameters": [ + { + "$ref": "#/components/parameters/ShowImageCacheParam_header_content_type" }, - "spec" : { - "description" : "升级配置信息", - "$ref" : "#/components/schemas/UpgradeResponseSpec" - } - }, - "type" : "object" - }, - "UpgradeClusterRequestMetadata" : { - "required" : [ "apiVersion", "kind" ], - "properties" : { - "apiVersion" : { - "type" : "string", - "description" : "api版本,默认为v3" + { + "$ref": "#/components/parameters/ShowImageCacheParam_header_x_auth_token" }, - "kind" : { - "type" : "string", - "description" : "资源类型,默认为UpgradeTask" + { + "name": "image_cache_id", + "in": "path", + "description": "**参数解释:**", + "required": true, + "schema": { + "description": "**参数解释:**", + "type": "string", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + } } - }, - "type" : "object" + ] }, - "UpgradeSpec" : { - "properties" : { - "clusterUpgradeAction" : { - "description" : "集群升级配置", - "$ref" : "#/components/schemas/ClusterUpgradeAction" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowImageCache", + "x-url": "{endpoint}/v5/imagecaches/{image_cache_id}" + }, + "/DeleteRelease": { + "delete": { + "tags": [ + "模板管理" + ], + "summary": "删除指定模板实例", + "description": "删除指定模板实例", + "operationId": "DeleteRelease", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } } - }, - "type" : "object" + } }, - "NodePriority" : { - "required" : [ "nodeSelector", "priority" ], - "description" : "节点优先级批量配置", - "properties" : { - "nodeSelector" : { - "description" : "节点标签选择器,选择一批节点", - "$ref" : "#/components/schemas/NodeSelector" - }, - "priority" : { - "type" : "integer", - "default" : 0, - "description" : "该批次节点的优先级,默认值为0,优先级最低,数值越大优先级越高" + "x-method": "delete", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "DeleteRelease", + "x-url": "{endpoint}/cce/cam/v3/clusters/{cluster_id}/namespace/{namespace}/releases/{name}" + }, + "/RollbackAutopilotAddonInstance": { + "post": { + "tags": [ + "插件管理(Autopilot)" + ], + "summary": "回滚AddonInstance", + "description": "将插件实例回滚到升级前的版本。只有在当前插件实例版本支持回滚到升级前的版本(status.isRollbackable为true),且插件实例状态为running(运行中)、available(可用)、abnormal(不可用)、upgradeFailed(升级失败)、rollbackFailed(回滚失败)时支持回滚。", + "operationId": "RollbackAutopilotAddonInstance", + "deprecated": false, + "responses": { + "200": { + "description": "插件实例回滚成功", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddonInstance" + } + } + } } }, - "type" : "object" - }, - "UpgradeClusterRequestBody" : { - "required" : [ "metadata", "spec" ], - "properties" : { - "metadata" : { - "description" : "升级元数据", - "$ref" : "#/components/schemas/UpgradeClusterRequestMetadata" + "parameters": [ + { + "name": "id", + "in": "path", + "description": "插件实例ID", + "required": true, + "schema": { + "description": "插件实例ID", + "type": "string", + "maxLength": 255, + "minLength": 1 + } }, - "spec" : { - "description" : "升级配置信息", - "$ref" : "#/components/schemas/UpgradeSpec" + { + "$ref": "#/components/parameters/param_header_x_auth_token" } - }, - "type" : "object" - }, - "NodeSelector" : { - "description" : "节点标签选择器,匹配Kubernetes中nodeSelector相关约束", - "required" : [ "key", "operator" ], - "properties" : { - "key" : { - "type" : "string", - "description" : "标签键" - }, - "value" : { - "type" : "array", - "description" : "标签值列表", - "items" : { - "type" : "string", - "description" : "标签值" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddonInstanceRollbackRequest" + } } }, - "operator" : { - "type" : "string", - "description" : "标签逻辑运算符" - } - }, - "type" : "object" + "required": true + } }, - "InPlaceRollingUpdate" : { - "description" : "原地升级配置", - "properties" : { - "userDefinedStep" : { - "type" : "integer", - "description" : "节点升级步长,取值范围为[1, 40],建议取值20" + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "RollbackAutopilotAddonInstance", + "x-url": "{endpoint}/autopilot/v3/addons/{id}/operation/rollback" + }, + "/ListNodes": { + "get": { + "tags": [ + "节点管理" + ], + "summary": "获取集群下所有节点", + "description": "该API用于通过集群ID获取指定集群下所有节点的详细信息。", + "operationId": "ListNodes", + "deprecated": false, + "responses": { + "200": { + "description": "表示获取集群下的节点列表成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodeList" + } + } + } } }, - "type" : "object" - }, - "UpgradeStrategy" : { - "required" : [ "type" ], - "description" : "升级配置", - "properties" : { - "type" : { - "description" : "升级策略类型,当前仅支持原地升级类型\"inPlaceRollingUpdate\"", - "type" : "string" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" }, - "inPlaceRollingUpdate" : { - "description" : "原地升级配置,指定原地升级策略类型时必选。", - "$ref" : "#/components/schemas/InPlaceRollingUpdate" + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" } - }, - "type" : "object" + ] }, - "DomainQuotaResponse" : { - "properties" : { - "quotas" : { - "type" : "array", - "description" : "资源", - "items" : { - "$ref" : "#/components/schemas/QuotaResource" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListNodes", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes" + }, + "/ShowNode": { + "get": { + "tags": [ + "节点管理" + ], + "summary": "获取指定的节点", + "description": "该API用于通过节点ID获取指定节点的详细信息。", + "operationId": "ShowNode", + "deprecated": false, + "responses": { + "200": { + "description": "表示获取集群下指定的节点成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Node" + } + } } } }, - "type" : "object" - }, - "QuotaResource" : { - "properties" : { - "quotaKey" : { - "type" : "string", - "description" : "资源类型" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "quotaLimit" : { - "type" : "integer", - "format" : "int32", - "description" : "配额值" + { + "$ref": "#/components/parameters/param_path_clusterid" }, - "used" : { - "type" : "integer", - "format" : "int32", - "description" : "已创建的资源个数" + { + "$ref": "#/components/parameters/param_path_nodeid" }, - "unit" : { - "type" : "string", - "description" : "单位" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "regionId" : { - "type" : "string", - "description" : "局点ID。若资源不涉及此参数,则不返回该参数。" - }, - "availabilityZoneId" : { - "type" : "string", - "description" : "可用区ID。若资源不涉及此参数,则不返回该参数。" + { + "$ref": "#/components/parameters/param_header_x_auth_token" } - }, - "type" : "object" + ] }, - "MasterEIPRequest" : { - "required" : [ "spec" ], - "properties" : { - "spec" : { - "$ref" : "#/components/schemas/MasterEIPRequestSpec", - "description" : "绑定、解绑集群公网apiserver地址的请求配置参数" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowNode", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/{node_id}" + }, + "/BatchCreateClusterTags": { + "post": { + "tags": [ + "标签管理" + ], + "summary": "批量添加指定集群的资源标签", + "description": "该API用于批量添加指定集群的资源标签。", + "operationId": "BatchCreateClusterTags", + "responses": { + "204": { + "description": "No Content" } }, - "type" : "object" - }, - "MasterEIPResponseSpec" : { - "properties" : { - "action" : { - "type" : "string", - "description" : "绑定动作", - "enum" : [ "bind" ] + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "spec" : { - "description" : "待绑定的弹性IP配置属性", - "properties" : { - "id" : { - "type" : "string", - "description" : "弹性网卡ID" - }, - "eip" : { - "description" : "EIP的详细信息", - "$ref" : "#/components/schemas/EipSpec" - }, - "IsDynamic" : { - "type" : "boolean", - "description" : "是否动态创建" + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchCreateClusterTagsRequestBody" } } }, - "elasticIp" : { - "type" : "string", - "description" : "弹性公网IP" - } - }, - "type" : "object" + "required": true + } }, - "MasterEIPRequestSpec" : { - "properties" : { - "action" : { - "type" : "string", - "description" : "绑定或解绑动作,必选参数。", - "enum" : [ "bind", "unbind" ] - }, - "spec" : { - "description" : "待绑定的弹性IP配置属性", - "properties" : { - "id" : { - "type" : "string", - "description" : "弹性网卡ID,绑定时必选,解绑时该字段无效" + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "BatchCreateClusterTags", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/tags/create" + }, + "/CreateAutopilotCluster": { + "post": { + "tags": [ + "集群管理(Autopilot)" + ], + "summary": "创建集群", + "description": "该API用于创建一个空集群(即只有控制节点Master,没有工作节点Node)。", + "operationId": "CreateAutopilotCluster", + "deprecated": false, + "responses": { + "201": { + "description": "表示创建集群作业下发成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutopilotCluster" + } } } - }, - "bandwidth" : { - "type" : "string", - "description" : "带宽(字段已失效,暂不推荐使用)" - }, - "elasticIp" : { - "type" : "string", - "description" : "弹性网卡IP(字段已失效,暂不推荐使用)" } }, - "type" : "object" - }, - "MasterEIPResponse" : { - "properties" : { - "metadata" : { - "$ref" : "#/components/schemas/Metadata", - "description" : "基本信息,为集合类的元素类型,包含一组由不同名称定义的属性" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "spec" : { - "$ref" : "#/components/schemas/MasterEIPResponseSpec", - "description" : "绑定集群公网apiserver地址的配置信息" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "status" : { - "description" : "状态信息", - "properties" : { - "privateEndpoint" : { - "type" : "string", - "description" : "集群访问的PrivateIP(HA集群返回VIP)" - }, - "publicEndpoint" : { - "type" : "string", - "description" : "集群访问的PublicIP" + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutopilotCluster" } } - } - }, - "type" : "object" + }, + "required": true + } }, - "EipSpec" : { - "properties" : { - "bandwidth" : { - "description" : "带宽信息", - "properties" : { - "size" : { - "type" : "integer", - "description" : "带宽大小" - }, - "sharetype" : { - "type" : "string", - "description" : "带宽类型", - "enum" : [ "PER", "WHOLE" ] + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "CreateAutopilotCluster", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters" + }, + "/ListAutopilotAddonTemplates": { + "get": { + "tags": [ + "插件管理(Autopilot)" + ], + "summary": "查询AddonTemplates列表", + "description": "插件模板查询接口,查询插件信息。", + "operationId": "ListAutopilotAddonTemplates", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddonTemplates" + } } } } }, - "type" : "object" - }, - "ShowCluster" : { - "required" : [ "apiVersion", "kind", "metadata", "spec" ], - "properties" : { - "kind" : { - "type" : "string", - "description" : "API类型,固定值“Cluster”或“cluster”,该值不可修改。", - "default" : "Cluster" - }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”,该值不可修改。", - "default" : "v3" + "parameters": [ + { + "$ref": "#/components/parameters/param_header_content_type" }, - "metadata" : { - "description" : "集群的基本信息,为集合类的元素类型,包含一组由不同名称定义的属性。", - "$ref" : "#/components/schemas/ClusterMetadata" + { + "$ref": "#/components/parameters/param_header_x_auth_token" }, - "spec" : { - "description" : "spec是集合类的元素类型,您对需要管理的集群对象进行详细描述的主体部分都在spec中给出。CCE通过spec的描述来创建或更新对象。", - "$ref" : "#/components/schemas/ClusterSpec" - }, - "status" : { - "description" : "集群状态信息", - "$ref" : "#/components/schemas/ClusterStatus" + { + "name": "addon_template_name", + "in": "query", + "description": "指定的插件名称或插件别名,不填写则查询列表。", + "required": false, + "schema": { + "description": "指定的插件名称或插件别名,不填写则查询列表。", + "type": "string", + "maxLength": 30, + "minLength": 2, + "pattern": "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])+$" + } } - }, - "description" : "", - "type" : "object" - }, - "NodePools" : { - "required" : [ "kind" ], - "properties" : { - "kind" : { - "type" : "string", - "description" : "API type. The value is fixed to List." - }, - "apiVersion" : { - "type" : "string", - "description" : "API version. The value is fixed to v3." - }, - "items" : { - "type" : "array", - "description" : "/", - "items" : { - "description" : "", - "$ref" : "#/components/schemas/NodePoolResp" + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListAutopilotAddonTemplates", + "x-url": "{endpoint}/autopilot/v3/addontemplates" + }, + "/ShowAutopilotMaintenanceWindow": { + "get": { + "tags": [ + "集群升级(Autopilot)" + ], + "summary": "获取集群维护窗口", + "description": "该API用于获取集群维护窗口。", + "operationId": "ShowAutopilotMaintenanceWindow", + "responses": { + "200": { + "description": "获取集群维护窗口成功", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MaintenanceWindow" + } + } } } }, - "description" : "", - "type" : "object" - }, - "AddNode" : { - "description" : "纳管节点参数。集群内已有节点支持通过重置进行重新安装并接入集群。", - "required" : [ "serverID", "spec" ], - "properties" : { - "serverID" : { - "type" : "string", - "format" : "uuid", - "description" : "服务器ID,获取方式请参见ECS/BMS相关资料。" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "spec" : { - "description" : "节点重装配置参数。当前不支持纳管节点接入节点池。", - "$ref" : "#/components/schemas/ReinstallNodeSpec" - } - }, - "type" : "object" - }, - "AddNodeList" : { - "description" : "重置节点参数。集群内已有节点,支持通过重置节点方式进行重新安装并接入集群,纳管过程将清理节点上系统盘、数据盘数据,并作为新节点接入Kuberntes集群,请提前备份迁移关键数据。", - "required" : [ "apiVersion", "kind", "nodeList" ], - "properties" : { - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”。" + { + "$ref": "#/components/parameters/param_path_clusterid" }, - "kind" : { - "type" : "string", - "description" : "API类型,固定值“List”。" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "nodeList" : { - "type" : "array", - "description" : "纳管节点列表", - "items" : { - "$ref" : "#/components/schemas/AddNode" - } + { + "$ref": "#/components/parameters/param_header_x_auth_token" } - }, - "type" : "object" + ] }, - "UpdateReleaseReqBody" : { - "description" : "更新模板实例的请求体", - "required" : [ "chart_id", "action", "parameters", "values" ], - "properties" : { - "chart_id" : { - "type" : "string", - "description" : "模板ID", - "example" : "af4b699e-018c-11ec-b8b0-0255ac100b05" - }, - "action" : { - "type" : "string", - "description" : "更新操作,升级为upgrade,回退为rollback", - "enum" : [ "upgrade", "rollback" ] - }, - "parameters" : { - "$ref" : "#/components/schemas/ReleaseReqBodyParams" - }, - "values" : { - "type" : "object", - "description" : "模板实例的值", - "properties" : { - "imagePullPolicy" : { - "type" : "string", - "example" : "IfNotPresent", - "description" : "镜像拉取策略" - }, - "imageTag" : { - "type" : "string", - "example" : "v2", - "description" : "镜像标签" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowAutopilotMaintenanceWindow", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/maintenancewindows" + }, + "/SyncNode": { + "get": { + "tags": [ + "节点管理" + ], + "summary": "同步节点", + "description": "该API用于同步节点。", + "operationId": "SyncNode", + "deprecated": false, + "responses": { + "200": { + "description": "表示同步节点成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncNodeResp" + } } } } }, - "type" : "object" - }, - "AddonInstances" : { - "required" : [ "apiVersion", "items", "kind" ], - "properties" : { - "kind" : { - "type" : "string", - "description" : "API类型,固定值“Addon”,该值不可修改。", - "default" : "Addon" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”,该值不可修改。", - "default" : "v3" + { + "$ref": "#/components/parameters/param_path_clusterid" }, - "items" : { - "type" : "array", - "description" : "插件实例列表", - "items" : { - "$ref" : "#/components/schemas/AddonInstance" - } - } - }, - "description" : "插件实例列表-response结构体", - "type" : "object" - }, - "OpenAPIResponse" : { - "properties" : { - "metadata" : { - "$ref" : "#/components/schemas/Metadata", - "description" : "基本信息,为集合类的元素类型,包含一组由不同名称定义的属性" + { + "$ref": "#/components/parameters/param_path_nodeid" }, - "spec" : { - "description" : "集群访问地址的配置参数信息", - "$ref" : "#/components/schemas/OpenAPISpec" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "status" : { - "description" : "状态信息", - "properties" : { - "privateEndpoint" : { - "type" : "string", - "description" : "集群访问的PrivateIP(HA集群返回VIP)" - }, - "publicEndpoint" : { - "type" : "string", - "description" : "集群访问的PublicIP" - } - } - } - }, - "type" : "object" - }, - "OpenAPISpec" : { - "properties" : { - "spec" : { - "description" : "集群访问的地址", - "properties" : { - "eip" : { - "description" : "EIP的详细信息", - "$ref" : "#/components/schemas/EipSpec" - }, - "IsDynamic" : { - "type" : "boolean", - "description" : "是否动态创建" + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "SyncNode", + "x-url": "{endpoint}/api/v2/projects/{project_id}/clusters/{cluster_id}/nodes/{node_id}/sync" + }, + "/CreatePostCheck": { + "post": { + "tags": [ + "集群升级" + ], + "summary": "集群升级后确认", + "description": "集群升级后确认,该接口建议配合Console使用,主要用于升级步骤完成后,客户确认集群状态和业务正常后做反馈。", + "operationId": "CreatePostCheck", + "responses": { + "200": { + "description": "集群升级后确认成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostcheckClusterResponseBody" + } } } } }, - "type" : "object" - }, - "SyncNodesResp" : { - "type" : "object" - }, - "UpgradePlanResponseBody" : { - "required" : [ "kind", "apiVersion", "items" ], - "properties" : { - "kind" : { - "type" : "string", - "pattern" : "List", - "description" : "API类型,固定值“List”,该值不可修改。", - "default" : "List" - }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”,该值不可修改。", - "pattern" : "v3", - "default" : "v3" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "items" : { - "type" : "array", - "description" : "自动升级计划", - "$ref" : "#/components/schemas/UpgradePlan" + { + "$ref": "#/components/parameters/param_path_clusterid" } - }, - "type" : "object" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostcheckClusterRequestBody" + } + } + }, + "required": true + } }, - "UpgradePlan" : { - "required" : [ "kind", "apiVersion", "metadata", "spec", "status" ], - "properties" : { - "kind" : { - "type" : "string", - "pattern" : "UpgradePlan", - "description" : "API类型,固定值“UpgradePlan”,该值不可修改。", - "default" : "UpgradePlan" - }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”,该值不可修改。", - "pattern" : "v3", - "default" : "v3" - }, - "metadata" : { - "description" : "自动升级计划的元数据信息", - "$ref" : "#/components/schemas/Metadata" - }, - "spec" : { - "description" : "自动升级计划主体", - "$ref" : "#/components/schemas/UpgradePlanSpec" - }, - "status" : { - "description" : "自动升级计划的当前状态", - "$ref" : "#/components/schemas/UpgradePlanStatus" - } - }, - "type" : "object" - }, - "UpgradePlanStatus" : { - "required" : [ "phase" ], - "properties" : { - "phase" : { - "type" : "string", - "description" : "自动升级计划状态", - "default" : "Pending", - "enum" : [ "Pending", "Enqueued", "Upgrading", "Success", "Failed", "Skipped" ] - } - }, - "type" : "object" - }, - "UpgradePlanSpec" : { - "required" : [ "clusterID", "clusterVersion", "targetVersion", "notBefore", "notAfter", "notBeforeDeadline" ], - "properties" : { - "clusterID" : { - "type" : "string", - "description" : "集群ID", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - }, - "clusterVersion" : { - "type" : "string", - "description" : "当前集群版本", - "pattern" : "^v\\d\\.\\d\\.\\d-r\\d$", - "example" : "v1.23.4-r0" - }, - "targetVersion" : { - "type" : "string", - "description" : "本次集群升级的目标版本", - "pattern" : "^v\\d\\.\\d\\.\\d-r\\d$", - "example" : "v1.25.2-r0" - }, - "notBefore" : { - "type" : "string", - "description" : "自动升级计划的最早时间(UTC时间),需要早于notBeforeDeadline", - "example" : "2025-01-06 16:00:00 +0000 UTC" - }, - "notAfter" : { - "type" : "string", - "description" : "自动升级计划的最晚时间(UTC时间)", - "example" : "2025-01-06 20:00:00 +0000 UTC" - }, - "notBeforeDeadline" : { - "type" : "string", - "description" : "自动升级计划开始的截止时间(UTC时间)", - "example" : "2025-01-30 16:00:00 +0000 UTC" - } - }, - "type" : "object" - }, - "ResizeClusterResponseBody" : { - "description" : "变更集群规格的返回体", - "required" : [ "jobID" ], - "properties" : { - "jobID" : { - "type" : "string", - "description" : "任务ID" - }, - "orderID" : { - "type" : "string", - "description" : "包周期集群变更规格订单ID" - } - }, - "type" : "object" - }, - "ResizeClusterRequestBody" : { - "description" : "变更集群规格的请求体", - "required" : [ "flavorResize" ], - "properties" : { - "flavorResize" : { - "type" : "string", - "description" : "要变更的目标规格。仅支持变更集群最大节点规模,不支持变更控制节点数,且不支持降低集群规格。例如原集群规格为cce.s2.medium,仅支持变更至cce.s2.large及以上规格,不支持变更至cce.s2.small或cce.s1.medium。" - }, - "extendParam" : { - "type" : "object", - "properties" : { - "decMasterFlavor" : { - "type" : "string", - "description" : "专属云CCE集群可指定控制节点的规格" - }, - "isAutoPay" : { - "type" : "string", - "description" : "是否自动扣款" + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "CreatePostCheck", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/postcheck" + }, + "/ListAutopilotClusterMasterSnapshotTasks": { + "get": { + "tags": [ + "集群升级(Autopilot)" + ], + "summary": "获取集群备份任务详情列表", + "description": "获取集群备份任务详情列表", + "operationId": "ListAutopilotClusterMasterSnapshotTasks", + "responses": { + "200": { + "description": "表示获取集群备份任务详情列表成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotClusterTaskResponseBody" + } } } } }, - "type" : "object" - }, - "UnlockNodeScaledownRequestBody" : { - "required" : [ "apiVersion", "kind" ], - "properties" : { - "apiVersion" : { - "type" : "string", - "description" : "**参数解释**:" - }, - "kind" : { - "type" : "string", - "description" : "**参数解释**:" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "nodeList" : { - "type" : "array", - "description" : "**参数解释**:", - "items" : { - "type" : "string" - }, - "minItems" : 0, - "maxItems" : 50 - } - }, - "type" : "object" - }, - "DelayUpgradePlanRequestBody" : { - "required" : [ "notBefore" ], - "properties" : { - "notBefore" : { - "type" : "string", - "format" : "date", - "description" : "新的自动升级计划启动时间,必须早于notBeforeDeadline", - "example" : "2025-02-01 16:00:00 +0000 UTC" + { + "$ref": "#/components/parameters/param_path_clusterid" } - }, - "type" : "object" + ] }, - "NodePoolUpdate" : { - "required" : [ "metadata", "spec" ], - "properties" : { - "metadata" : { - "description" : "节点池的元数据信息", - "$ref" : "#/components/schemas/NodePoolMetadataUpdate" - }, - "spec" : { - "description" : "节点池的规格描述", - "$ref" : "#/components/schemas/NodePoolSpecUpdate" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListAutopilotClusterMasterSnapshotTasks", + "x-url": "{endpoint}/autopilot/v3.1/projects/{project_id}/clusters/{cluster_id}/operation/snapshot/tasks" + }, + "/ShowNodePoolConfigurationDetails": { + "get": { + "tags": [ + "配置管理" + ], + "summary": "查询指定节点池支持配置的参数列表", + "description": "该API用于查询CCE服务下指定节点池支持配置的参数列表。", + "operationId": "ShowNodePoolConfigurationDetails", + "responses": { + "200": { + "description": "表示获取指定节点池配置参数列表成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShowNodePoolConfigurationDetailsRespBody" + } + } + } } }, - "description" : "", - "type" : "object" - }, - "UpdateNodePoolResp" : { - "required" : [ "kind", "apiVersion", "metadata", "spec" ], - "properties" : { - "kind" : { - "type" : "string", - "description" : "API类型,固定值“NodePool”。", - "default" : "NodePool" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”。", - "default" : "v3" + { + "$ref": "#/components/parameters/param_path_clusterid" }, - "metadata" : { - "description" : "节点池的元数据信息", - "$ref" : "#/components/schemas/NodePoolMetadata" + { + "$ref": "#/components/parameters/param_path_nodepool_id" }, - "spec" : { - "description" : "节点池的规格描述", - "$ref" : "#/components/schemas/NodePoolSpec" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "status" : { - "description" : "节点池状态", - "$ref" : "#/components/schemas/UpdateNodePoolStatus" + { + "$ref": "#/components/parameters/param_header_x_auth_token" } - }, - "description" : "", - "type" : "object" + ] }, - "NodeSpecUpdate" : { - "required" : [ "taints", "k8sTags", "userTags" ], - "properties" : { - "flavor" : { - "type" : "string", - "description" : "**参数解释:**", - "minLength" : 1, - "maxLength" : 50, - "pattern" : "^[A-Za-z0-9-_.]+$" - }, - "os" : { - "type" : "string", - "description" : "**参数解释**:" - }, - "login" : { - "description" : "**参数解释**:", - "$ref" : "#/components/schemas/Login" - }, - "rootVolumeUpdate" : { - "description" : "**参数解释**:", - "$ref" : "#/components/schemas/Volume" - }, - "dataVolumesUpdate" : { - "type" : "array", - "description" : "**参数解释**:", - "items" : { - "$ref" : "#/components/schemas/Volume" - } - }, - "storage" : { - "$ref" : "#/components/schemas/Storage" - }, - "runtime" : { - "$ref" : "#/components/schemas/Runtime", - "description" : "**参数解释**:" - }, - "taints" : { - "type" : "array", - "description" : "**参数解释**:", - "items" : { - "$ref" : "#/components/schemas/Taint" - }, - "maxItems" : 20 - }, - "k8sTags" : { - "type" : "object", - "description" : "**参数解释**:", - "additionalProperties" : { - "type" : "string", - "maxLength" : 63 - } - }, - "ecsGroupId" : { - "type" : "string", - "description" : "**参数解释**:", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - }, - "userTags" : { - "type" : "array", - "description" : "**参数解释**:", - "items" : { - "$ref" : "#/components/schemas/UserTag" - } - }, - "nodeNameTemplate" : { - "type" : "object", - "description" : "**参数解释**:", - "properties" : { - "nodeNamePrefix" : { - "type" : "string", - "pattern" : "^[a-z]([-.a-z0-9]*[-.a-z0-9])?$", - "description" : "**参数解释**:", - "example" : "prefix" - }, - "nodeNameSuffix" : { - "type" : "string", - "pattern" : "^[-.a-z0-9]*[a-z0-9]$", - "description" : "**参数解释**:", - "example" : "suffix" - } - } - }, - "initializedConditions" : { - "type" : "array", - "description" : "**参数解释**:", - "maxItems" : 2, - "items" : { - "pattern" : "^[A-Za-z0-9]+$", - "minLength" : 1, - "maxLength" : 20, - "type" : "string" - } - }, - "serverEnterpriseProjectID" : { - "type" : "string", - "description" : "**参数解释**:" - }, - "nodeNicSpecUpdate" : { - "description" : "**参数解释**:", - "properties" : { - "primaryNic" : { - "description" : "**参数解释**:", - "properties" : { - "subnetId" : { - "type" : "string", - "description" : "**参数解释**:", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$", - "example" : "ca964acf-8468-4735-8229-97940ef6c881" - }, - "subnetList" : { - "type" : "array", - "description" : "**参数解释**:", - "items" : { - "type" : "string", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - }, - "example" : [ "7e767d10-7548-4df5-ad72-aeac1d08bd8a" ] - } + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowNodePoolConfigurationDetails", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools/{nodepool_id}/configuration/detail" + }, + "/UpdateCluster": { + "put": { + "tags": [ + "集群管理" + ], + "summary": "更新指定的集群", + "description": "该API用于更新指定的集群。", + "operationId": "UpdateCluster", + "deprecated": false, + "responses": { + "200": { + "description": "表示更新指定集群成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Cluster" } } } - }, - "extendParam" : { - "$ref" : "#/components/schemas/NodePoolUpdateExtendParam", - "description" : "**参数解释**:" } }, - "type" : "object" - }, - "UpdateNodePoolStatus" : { - "properties" : { - "currentNode" : { - "type" : "integer", - "format" : "int32", - "description" : "当前节点池中所有节点数量(不含删除中的节点)。" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "creatingNode" : { - "type" : "integer", - "format" : "int32", - "description" : "当前节点池中处于创建流程中的节点数量。" + { + "$ref": "#/components/parameters/param_path_clusterid" }, - "deletingNode" : { - "type" : "integer", - "format" : "int32", - "description" : "当前节点池中删除中的节点数量。" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "phase" : { - "type" : "string", - "description" : "节点池状态。", - "enum" : [ "Synchronizing", "Synchronized", "SoldOut", "Deleting", "Error" ] - }, - "conditions" : { - "description" : "节点池当前详细状态列表,详情参见Condition类型定义。", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/NodePoolCondition", - "description" : "节点池详细状态。" + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterInformation" + } } }, - "scaleGroupStatuses" : { - "description" : "伸缩组当前详细状态信息,详情参见ScaleGroupStatus类型定义", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ScaleGroupStatus" + "required": true + } + }, + "x-method": "put", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UpdateCluster", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}" + }, + "/ShowClusterUpgradeInfo": { + "get": { + "tags": [ + "集群升级" + ], + "summary": "获取集群升级相关信息", + "description": "获取集群升级相关信息", + "operationId": "ShowClusterUpgradeInfo", + "responses": { + "200": { + "description": "表示获取集群升级相关信息成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeInfoResponseBody" + } + } } } }, - "description" : "", - "type" : "object" - }, - "NodePoolSpecUpdate" : { - "required" : [ "initialNodeCount" ], - "properties" : { - "nodeTemplate" : { - "description" : "**参数解释:**", - "$ref" : "#/components/schemas/NodeSpecUpdate" - }, - "initialNodeCount" : { - "type" : "integer", - "format" : "int32", - "description" : "**参数解释:**" - }, - "ignoreInitialNodeCount" : { - "type" : "boolean", - "description" : "**参数解释:**" - }, - "autoscaling" : { - "description" : "弹性伸缩参数。仅按需计费的节点池支持弹性伸缩。", - "$ref" : "#/components/schemas/NodePoolNodeAutoscaling" - }, - "nodeManagementUpdate" : { - "description" : "**参数解释:**", - "$ref" : "#/components/schemas/NodeManagement" - }, - "taintPolicyOnExistingNodes" : { - "type" : "string", - "description" : "**参数解释:**" - }, - "labelPolicyOnExistingNodes" : { - "type" : "string", - "description" : "**参数解释:**" - }, - "userTagsPolicyOnExistingNodes" : { - "type" : "string", - "description" : "**参数解释:**" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "extensionScaleGroups" : { - "description" : "节点池扩展伸缩组配置列表,详情参见ExtensionScaleGroup类型定义", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ExtensionScaleGroup" - } + { + "$ref": "#/components/parameters/param_path_clusterid" } - }, - "description" : "", - "type" : "object" + ] }, - "NodePoolMetadataUpdate" : { - "required" : [ "name" ], - "properties" : { - "name" : { - "type" : "string", - "description" : "节点池名称。", - "minLength" : 1, - "maxLength" : 50 + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowClusterUpgradeInfo", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/upgradeinfo" + }, + "/CreateAutopilotPreCheck": { + "post": { + "tags": [ + "集群升级(Autopilot)" + ], + "summary": "集群升级前检查", + "description": "集群升级前检查", + "operationId": "CreateAutopilotPreCheck", + "responses": { + "200": { + "description": "执行集群升级前检查成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrecheckClusterResponseBody" + } + } + } } }, - "description" : "", - "type" : "object" - }, - "NodePoolUpdateExtendParam" : { - "description" : "**参数解释**:", - "properties" : { - "agency_name" : { - "type" : "string", - "description" : "**参数解释**:" - }, - "alpha.cce/preInstall" : { - "type" : "string", - "description" : "**参数解释**:" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "alpha.cce/postInstall" : { - "type" : "string", - "description" : "**参数解释**:" + { + "$ref": "#/components/parameters/param_path_clusterid" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrecheckClusterRequestBody" + } + } }, - "securityReinforcementType" : { - "type" : "string", - "description" : "**参数解释**:", - "enum" : [ "null", "cybersecurity" ] + "required": true + } + }, + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "CreateAutopilotPreCheck", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/precheck" + }, + "/BatchCreateAutopilotClusterTags": { + "post": { + "tags": [ + "标签管理(Autopilot)" + ], + "summary": "批量添加指定集群的资源标签", + "description": "该API用于批量添加指定集群的资源标签。", + "operationId": "BatchCreateAutopilotClusterTags", + "responses": { + "204": { + "description": "No Content" } }, - "type" : "object" - }, - "UpgradeWorkFlowList" : { - "properties" : { - "kind" : { - "type" : "string", - "description" : "API类型,固定值“List”,该值不可修改。", - "default" : "List", - "pattern" : "List" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”,该值不可修改。", - "default" : "v3", - "pattern" : "v3" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "items" : { - "$ref" : "#/components/schemas/UpgradeWorkFlow" + { + "$ref": "#/components/parameters/param_header_x_auth_token" } - }, - "type" : "object" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchCreateClusterTagsRequestBody" + } + } + }, + "required": true + } }, - "DeleteImageCacheResponseBody" : { - "required" : [ "image_cache" ], - "properties" : { - "image_cache" : { - "description" : "镜像缓存信息。", - "$ref" : "#/components/schemas/ImageCacheDetail" + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "BatchCreateAutopilotClusterTags", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/tags/create" + }, + "/RevokeKubernetesClusterCert": { + "post": { + "tags": [ + "集群管理" + ], + "summary": "吊销用户的集群证书", + "description": "该API用于吊销指定集群的用户证书", + "operationId": "RevokeKubernetesClusterCert", + "deprecated": false, + "responses": { + "200": { + "description": "吊销用户集群证书成功" } }, - "description" : "删除镜像缓存-response结构体。", - "type" : "object" - }, - "AutopilotShowCluster" : { - "required" : [ "apiVersion", "kind", "metadata", "spec" ], - "properties" : { - "kind" : { - "type" : "string", - "description" : "API类型,固定值“Cluster”或“cluster”,该值不可修改。", - "default" : "Cluster" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”,该值不可修改。", - "default" : "v3" + { + "$ref": "#/components/parameters/param_path_clusterid" }, - "metadata" : { - "description" : "集群的基本信息,为集合类的元素类型,包含一组由不同名称定义的属性。", - "$ref" : "#/components/schemas/AutopilotClusterMetadata" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "spec" : { - "description" : "spec是集合类的元素类型,您对需要管理的集群对象进行详细描述的主体部分都在spec中给出。CCE通过spec的描述来创建或更新对象。", - "$ref" : "#/components/schemas/AutopilotClusterSpec" - }, - "status" : { - "description" : "集群状态信息", - "$ref" : "#/components/schemas/AutopilotClusterStatus" + { + "$ref": "#/components/parameters/param_header_x_auth_token" } - }, - "description" : "", - "type" : "object" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertRevokeConfigRequestBody" + } + } + }, + "required": true + } }, - "AutopilotClusterInformation" : { - "required" : [ "spec" ], - "properties" : { - "spec" : { - "description" : "具体集群参数", - "$ref" : "#/components/schemas/AutopilotClusterInformationSpec" + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "RevokeKubernetesClusterCert", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/clustercertrevoke" + }, + "/ShowJob": { + "get": { + "tags": [ + "集群管理" + ], + "summary": "获取任务信息", + "description": "该API用于获取任务信息。通过某一任务请求下发后返回的jobID来查询指定任务的进度。", + "operationId": "ShowJob", + "deprecated": false, + "responses": { + "200": { + "description": "表示获取任务信息成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Job" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_jobid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowJob", + "x-url": "{endpoint}/api/v3/projects/{project_id}/jobs/{job_id}" + }, + "/ListAutopilotClusterUpgradePaths": { + "get": { + "tags": [ + "集群升级(Autopilot)" + ], + "summary": "获取集群升级路径", + "description": "获取集群升级路径", + "operationId": "ListAutopilotClusterUpgradePaths", + "responses": { + "200": { + "description": "表示获取集群升级路径信息成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterUpgradePathsResponseBody" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListAutopilotClusterUpgradePaths", + "x-url": "{endpoint}/autopilot/v3/clusterupgradepaths" + }, + "/ListAutopilotUpgradeClusterTasks": { + "get": { + "tags": [ + "集群升级(Autopilot)" + ], + "summary": "获取集群升级任务详情列表", + "description": "获取集群升级任务详情列表", + "operationId": "ListAutopilotUpgradeClusterTasks", + "responses": { + "200": { + "description": "表示获取集群升级任务详情列表成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeTaskListResponseBody" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListAutopilotUpgradeClusterTasks", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgrade/tasks" + }, + "/ShowReleaseHistory": { + "get": { + "tags": [ + "模板管理" + ], + "summary": "查询指定模板实例历史记录", + "description": "查询指定模板实例历史记录", + "operationId": "ShowReleaseHistory", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReleaseResp" + } + } + } + } + } + } + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowReleaseHistory", + "x-url": "{endpoint}/cce/cam/v3/clusters/{cluster_id}/namespace/{namespace}/releases/{name}/history" + }, + "/CreateCloudPersistentVolumeClaims": { + "post": { + "tags": [ + "存储管理" + ], + "summary": "创建PVC(待废弃)", + "description": "该API用于在指定的Namespace下通过云存储服务中的云存储(EVS、SFS、OBS)去创建PVC(PersistentVolumeClaim)。该API待废弃,请使用Kubernetes PVC相关接口。", + "operationId": "CreateCloudPersistentVolumeClaims", + "deprecated": false, + "responses": { + "201": { + "description": "创建PersistentVolumeClaim作业下发成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PersistentVolumeClaim" + } + } + } + } + }, + "parameters": [ + { + "name": "namespace", + "in": "path", + "description": "指定PersistentVolumeClaim所在的命名空间。", + "required": true, + "schema": { + "description": "指定PersistentVolumeClaim所在的命名空间。", + "type": "string", + "maxLength": 63, + "minLength": 1, + "pattern": "[a-z0-9]([-a-z0-9]*[a-z0-9])?" + } + }, + { + "$ref": "#/components/parameters/param_header_content_type" }, - "metadata" : { - "description" : "集群基本信息,包含与名称相关的字段", - "$ref" : "#/components/schemas/AutopilotClusterMetadataForUpdate" + { + "$ref": "#/components/parameters/param_header_x_auth_token" + }, + { + "$ref": "#/components/parameters/param_header_x_cluster_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PersistentVolumeClaim" + } + } + }, + "required": true + } + }, + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "CreateCloudPersistentVolumeClaims", + "x-url": "{endpoint}/api/v1/namespaces/{namespace}/cloudpersistentvolumeclaims" + }, + "/CreateUpgradeWorkFlow": { + "post": { + "tags": [ + "集群升级" + ], + "summary": "开启集群升级流程引导任务", + "description": "该API用于创建一个集群升级流程引导任务。请在调用本接口完成引导任务创建之后,通过集群升级前检查开始检查任务。", + "operationId": "CreateUpgradeWorkFlow", + "responses": { + "201": { + "description": "表示在指定集群下创建升级流程成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeWorkFlow" + } + } + } } }, - "description" : "", - "type" : "object" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateUpgradeWorkFlowRequestBody" + } + } + }, + "required": true + } }, - "AutopilotClusterMetadataForUpdate" : { - "properties" : { - "alias" : { - "type" : "string", - "description" : "集群显示名。", - "minLength" : 4, - "maxLength" : 128 + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "CreateUpgradeWorkFlow", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgradeworkflows" + }, + "/ResetNode": { + "post": { + "tags": [ + "节点管理" + ], + "summary": "重置节点", + "description": "该API用于在指定集群下重置节点。", + "operationId": "ResetNode", + "deprecated": false, + "responses": { + "200": { + "description": "表示在指定集群下重置节点的作业下发成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReinstallJobResult" + } + } + } } }, - "type" : "object" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetNodeList" + } + } + }, + "required": true + } }, - "AutopilotClusterInformationSpec" : { - "properties" : { - "description" : { - "type" : "string", - "description" : "集群的描述信息。", - "maxLength" : 200, - "pattern" : "[^\\~\\$\\%\\^\\&\\*\\<\\>\\[\\]\\{\\}\\(\\)\\'\\\"\\#\\\\]" + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ResetNode", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/reset" + }, + "/ListClusterUpgradeFeatureGates": { + "get": { + "tags": [ + "集群升级" + ], + "summary": "获取集群升级特性开关配置", + "description": "获取集群升级特性开关配置", + "operationId": "ListClusterUpgradeFeatureGates", + "responses": { + "200": { + "description": "表示获取集群升级路径信息成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterUpgradeFeatureGatesResponseBody" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListClusterUpgradeFeatureGates", + "x-url": "{endpoint}/api/v3/clusterupgradefeaturegates" + }, + "/ListAddonTemplates": { + "get": { + "tags": [ + "插件管理" + ], + "summary": "查询AddonTemplates列表", + "description": "插件模板查询接口,查询插件信息。", + "operationId": "ListAddonTemplates", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddonTemplates" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + }, + { + "name": "addon_template_name", + "in": "query", + "description": "指定的插件名称或插件别名,不填写则查询列表。", + "required": false, + "schema": { + "description": "指定的插件名称或插件别名,不填写则查询列表。", + "type": "string", + "maxLength": 30, + "minLength": 2, + "pattern": "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])+$" + } + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListAddonTemplates", + "x-url": "{endpoint}/api/v3/addontemplates" + }, + "/DeleteCloudPersistentVolumeClaims": { + "delete": { + "tags": [ + "存储管理" + ], + "summary": "删除PVC(待废弃)", + "description": "该API用于删除指定Namespace下的PVC(PersistentVolumeClaim)对象,并可以选择保留后端的云存储。该API待废弃,请使用Kubernetes PVC相关接口。", + "operationId": "DeleteCloudPersistentVolumeClaims", + "deprecated": false, + "responses": { + "200": { + "description": "删除指定PersistentVolumeClaim作业下发成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PersistentVolumeClaim" + } + } + } + } + }, + "parameters": [ + { + "name": "name", + "in": "path", + "description": "需要删除的PersistentVolumClaim的名称。", + "required": true, + "schema": { + "description": "需要删除的PersistentVolumClaim的名称。", + "type": "string" + } + }, + { + "name": "namespace", + "in": "path", + "description": "指定PersistentVolumeClaim所在的命名空间。", + "required": true, + "schema": { + "description": "指定PersistentVolumeClaim所在的命名空间。", + "type": "string" + } + }, + { + "name": "deleteVolume", + "in": "query", + "description": "删除PersistentVolumeClaim后是否保留后端关联的云存储。false表示不删除,true表示删除,默认为false。", + "schema": { + "description": "删除PersistentVolumeClaim后是否保留后端关联的云存储。false表示不删除,true表示删除,默认为false。", + "type": "string" + } + }, + { + "name": "storageType", + "in": "query", + "description": "云存储的类型,和deleteVolume搭配使用。即deleteVolume和storageType必须同时配置。", + "schema": { + "description": "云存储的类型,和deleteVolume搭配使用。即deleteVolume和storageType必须同时配置。", + "type": "string" + } + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + }, + { + "$ref": "#/components/parameters/param_header_x_cluster_id" + } + ] + }, + "x-method": "delete", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "DeleteCloudPersistentVolumeClaims", + "x-url": "{endpoint}/api/v1/namespaces/{namespace}/cloudpersistentvolumeclaims/{name}" + }, + "/CreateImageCache": { + "post": { + "tags": [ + "镜像缓存管理" + ], + "summary": "创建镜像缓存", + "description": "创建镜像缓存。创建过程会在指定集群中启动临时Pod进行镜像缓存构建,创建镜像缓存后,可在负载创建时通过使用镜像缓存功能大幅减少下载容器镜像的耗时,实现容器的快速启动。单租户创建镜像缓存数量上限为50。", + "operationId": "CreateImageCache", + "deprecated": false, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateImageCacheResponseBody" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/CreateImageCacheParam_header_content_type" + }, + { + "$ref": "#/components/parameters/CreateImageCacheParam_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateImageCacheRequestBody" + } + } + }, + "required": true + } + }, + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "CreateImageCache", + "x-url": "{endpoint}/v5/imagecaches" + }, + "/ShowAutopilotUserChartsQuotas": { + "get": { + "tags": [ + "模板管理(Autopilot)" + ], + "summary": "获取用户模板配额", + "description": "获取用户模板配额", + "operationId": "ShowAutopilotUserChartsQuotas", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuotaResp" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "customSan" : { - "$ref" : "#/components/schemas/AutopilotCustomSan" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "eniNetwork" : { - "description" : "云原生网络2.0网络配置,包含集群的容器子网信息。", - "$ref" : "#/components/schemas/AutopilotEniNetworkUpdate" - } - }, - "description" : "", - "type" : "object" + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowAutopilotUserChartsQuotas", + "x-url": "{endpoint}/autopilot/v2/charts/{project_id}/quotas" + }, + "/PauseUpgradeClusterTask": { + "post": { + "tags": [ + "集群升级" + ], + "summary": "暂停集群升级任务", + "description": "暂停集群升级任务。", + "operationId": "PauseUpgradeClusterTask", + "responses": { + "200": { + "description": "表示暂停集群升级任务下发成功。" + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + } + ] + }, + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "PauseUpgradeClusterTask", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgrade/pause" + }, + "/ShowRelease": { + "get": { + "tags": [ + "模板管理" + ], + "summary": "获取指定模板实例", + "description": "获取指定模板实例", + "operationId": "ShowRelease", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReleaseResp" + } + } + } + } + } + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowRelease", + "x-url": "{endpoint}/cce/cam/v3/clusters/{cluster_id}/namespace/{namespace}/releases/{name}" + }, + "/DeleteChart": { + "delete": { + "tags": [ + "模板管理" + ], + "summary": "删除模板", + "description": "删除模板", + "operationId": "DeleteChart", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_chart_id" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] }, - "AutopilotEniNetworkUpdate" : { - "properties" : { - "subnets" : { - "type" : "array", - "description" : "IPv4子网ID列表。", - "items" : { - "description" : "IPv4子网ID", - "$ref" : "#/components/schemas/AutopilotNetworkSubnet" + "x-method": "delete", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "DeleteChart", + "x-url": "{endpoint}/v2/charts/{chart_id}" + }, + "/ShowClusterConfig": { + "get": { + "tags": [ + "集群管理" + ], + "summary": "查询集群日志配置信息", + "description": "获取集群组件上报的LTS的配置信息", + "operationId": "ShowClusterConfig", + "responses": { + "200": { + "description": "集群日志配置信息", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterLogConfig" + } + } + } + } + }, + "parameters": [ + { + "name": "type", + "in": "query", + "description": "组件类型 , 合法取值为control,audit,system-addon。不填写则查询全部类型。", + "required": false, + "schema": { + "description": "组件类型 , 合法取值为control,audit,system-addon。不填写则查询全部类型。", + "type": "string", + "enum": [ + "control", + "audit", + "system-addon" + ] + } + }, + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowClusterConfig", + "x-url": "{endpoint}/api/v3/projects/{project_id}/cluster/{cluster_id}/log-configs" + }, + "/ShowPreCheck": { + "get": { + "tags": [ + "集群升级" + ], + "summary": "获取集群升级前检查任务详情", + "description": "获取集群升级前检查任务详情,任务ID由调用集群检查API后从响应体中uid字段获取。", + "operationId": "ShowPreCheck", + "responses": { + "200": { + "description": "表示获取集群升级前检查任务详情成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrecheckClusterTaskResponseBody" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_path_taskid" + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowPreCheck", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/precheck/tasks/{task_id}" + }, + "/CreateKubernetesClusterCert": { + "post": { + "tags": [ + "集群管理" + ], + "summary": "获取集群证书", + "description": "该API用于获取指定集群的证书信息。", + "operationId": "CreateKubernetesClusterCert", + "deprecated": false, + "responses": { + "200": { + "description": "表示成功获取指定集群的证书。证书文件格式参见kubernetes v1.Config结构", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterCertResponseBody" + } + } }, - "maxItems" : 20 + "headers": { + "Port-ID": { + "type": "string", + "description": "集群控制节点端口ID" + } + } } }, - "type" : "object" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertDuration" + } + } + }, + "required": true + } }, - "MigrateNodesTask" : { - "required" : [ "spec" ], - "properties" : { - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”。" + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "CreateKubernetesClusterCert", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/clustercert" + }, + "/ShowAutopilotUpgradeClusterTask": { + "get": { + "tags": [ + "集群升级(Autopilot)" + ], + "summary": "获取集群升级任务详情", + "description": "获取集群升级任务详情,任务ID由调用集群升级API后从响应体中uid字段获取。", + "operationId": "ShowAutopilotUpgradeClusterTask", + "responses": { + "200": { + "description": "表示获取集群升级任务详情成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeTaskResponseBody" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "kind" : { - "type" : "string", - "description" : "API类型,固定值“MigrateNodesTask”。" + { + "$ref": "#/components/parameters/param_path_clusterid" }, - "spec" : { - "description" : "配置信息", - "$ref" : "#/components/schemas/MigrateNodesSpec" + { + "$ref": "#/components/parameters/param_path_taskid" + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowAutopilotUpgradeClusterTask", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgrade/tasks/{task_id}" + }, + "/CreatePartition": { + "post": { + "tags": [ + "集群管理" + ], + "summary": "创建分区", + "description": "创建分区", + "operationId": "CreatePartition", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Partition" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PartitionReqBody" + } + } }, - "status" : { - "description" : "任务状态", - "$ref" : "#/components/schemas/TaskStatus" + "required": true + } + }, + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "CreatePartition", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/partitions" + }, + "/ShowAutopilotReleaseHistory": { + "get": { + "tags": [ + "模板管理(Autopilot)" + ], + "summary": "查询指定模板实例历史记录", + "description": "查询指定模板实例历史记录", + "operationId": "ShowAutopilotReleaseHistory", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReleaseResp" + } + } + } + } + } + } + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowAutopilotReleaseHistory", + "x-url": "{endpoint}/autopilot/cam/v3/clusters/{cluster_id}/namespace/{namespace}/releases/{name}/history" + }, + "/DeleteAutopilotChart": { + "delete": { + "tags": [ + "模板管理(Autopilot)" + ], + "summary": "删除模板", + "description": "删除模板", + "operationId": "DeleteAutopilotChart", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } } }, - "type" : "object" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_chart_id" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] }, - "MigrateNodeExtendParam" : { - "properties" : { - "maxPods" : { - "type" : "integer", - "format" : "int32", - "description" : "节点最大允许创建的实例数(Pod),该数量包含系统默认实例,取值范围为16~256。" + "x-method": "delete", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "DeleteAutopilotChart", + "x-url": "{endpoint}/autopilot/v2/charts/{chart_id}" + }, + "/ShowUpgradeWorkFlow": { + "get": { + "tags": [ + "集群升级" + ], + "summary": "获取指定集群升级引导任务详情", + "description": "该API用于通过升级引导任务ID获取任务的详细信息。", + "operationId": "ShowUpgradeWorkFlow", + "responses": { + "200": { + "description": "表示获取指定集群升级引导任务详情成功", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeWorkFlow" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "DockerLVMConfigOverride" : { - "type" : "string", - "description" : "Docker数据盘配置项(已废弃,请使用storage字段)。" + { + "$ref": "#/components/parameters/param_path_clusterid" }, - "alpha.cce/preInstall" : { - "type" : "string", - "description" : "安装前执行脚本", - "maxLength" : 2048 + { + "$ref": "#/components/parameters/param_path_upgradeworkflowid" }, - "alpha.cce/postInstall" : { - "type" : "string", - "description" : "安装后执行脚本", - "maxLength" : 2048 + { + "$ref": "#/components/parameters/param_header_content_type" }, - "alpha.cce/NodeImageID" : { - "type" : "string", - "description" : "指定待切换目标操作系统所使用的用户镜像ID。" + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowUpgradeWorkFlow", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgradeworkflows/{upgrade_workflow_id}" + }, + "/ShowNodePoolConfigurations": { + "get": { + "tags": [ + "配置管理" + ], + "summary": "查询指定节点池支持配置的参数内容", + "description": "该API用于查询指定节点池支持配置的参数内容。", + "operationId": "ShowNodePoolConfigurations", + "responses": { + "200": { + "description": "表示获取指定节点池配置参数内容成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterConfigRespBody" + } + } + } } }, - "type" : "object" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_path_nodepool_id" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] }, - "MigrateNodesSpec" : { - "required" : [ "os", "login", "nodes" ], - "properties" : { - "os" : { - "type" : "string", - "description" : "操作系统类型,须精确到版本号。" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowNodePoolConfigurations", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools/{nodepool_id}/configuration" + }, + "/DeleteNode": { + "delete": { + "tags": [ + "节点管理" + ], + "summary": "删除节点", + "description": "该API用于删除指定的节点。", + "operationId": "DeleteNode", + "deprecated": false, + "responses": { + "200": { + "description": "表示删除节点作业下发成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Node" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" }, - "extendParam" : { - "description" : "迁移节点时的扩展参数", - "$ref" : "#/components/schemas/MigrateNodeExtendParam" + { + "$ref": "#/components/parameters/param_path_nodeid" }, - "login" : { - "description" : "节点的登录方式。密钥对和密码登录方式二者必选其一。", - "$ref" : "#/components/schemas/Login" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "runtime" : { - "description" : "容器运行时", - "$ref" : "#/components/schemas/Runtime" + { + "$ref": "#/components/parameters/param_header_x_auth_token" }, - "nodes" : { - "type" : "array", - "description" : "待操作节点列表", - "items" : { - "$ref" : "#/components/schemas/NodeItem" + { + "name": "nodepoolScaleDown", + "in": "query", + "description": "标明是否为nodepool下发的请求。若不为“NoScaleDown”将自动更新对应节点池的实例数", + "required": false, + "schema": { + "description": "标明是否为nodepool下发的请求。若不为“NoScaleDown”将自动更新对应节点池的实例数", + "type": "string", + "enum": [ + "NoScaleDown" + ] + } + } + ] + }, + "x-method": "delete", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "DeleteNode", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/{node_id}" + }, + "/UpdatePartition": { + "put": { + "tags": [ + "集群管理" + ], + "summary": "更新分区", + "description": "更新分区", + "operationId": "UpdatePartition", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Partition" + } + } } } }, - "type" : "object" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PartitionReqBody" + } + } + }, + "required": true + } }, - "ScaleNodePoolOptions" : { - "description" : "节点池伸缩选项配置", - "properties" : { - "scalableChecking" : { - "type" : "string", - "description" : "扩容状态检查策略: instant(同步检查), async(异步检查)。默认同步检查instant", - "default" : "instant" + "x-method": "put", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UpdatePartition", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/partitions/{partition_name}" + }, + "/UpgradeCluster": { + "post": { + "tags": [ + "集群升级" + ], + "summary": "集群升级", + "description": "集群升级。", + "operationId": "UpgradeCluster", + "responses": { + "200": { + "description": "表示集群升级任务下发成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeClusterResponseBody" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "billingConfigOverride" : { - "description" : "节点池扩容时覆盖节点的默认计费模式配置", - "$ref" : "#/components/schemas/ScaleUpBillingConfigOverride" + { + "$ref": "#/components/parameters/param_path_clusterid" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeClusterRequestBody" + } + } + }, + "required": true + } + }, + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UpgradeCluster", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgrade" + }, + "/CreateAutopilotKubernetesClusterCert": { + "post": { + "tags": [ + "集群管理(Autopilot)" + ], + "summary": "获取集群证书", + "description": "该API用于获取指定集群的证书信息。", + "operationId": "CreateAutopilotKubernetesClusterCert", + "deprecated": false, + "responses": { + "200": { + "description": "表示成功获取指定集群的证书。证书文件格式参见kubernetes v1.Config结构", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterCertResponseBody" + } + } + }, + "headers": { + "Port-ID": { + "type": "string", + "description": "集群控制节点端口ID" + } + } } }, - "type" : "object" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertDuration" + } + } + }, + "required": true + } }, - "ScaleNodePoolSpec" : { - "description" : "伸缩节点池请求详细参数", - "required" : [ "desiredNodeCount", "scaleGroups" ], - "properties" : { - "desiredNodeCount" : { - "type" : "integer", - "description" : "节点池期望节点数" + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "CreateAutopilotKubernetesClusterCert", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/clustercert" + }, + "/RetryAutopilotUpgradeClusterTask": { + "post": { + "tags": [ + "集群升级(Autopilot)" + ], + "summary": "重试集群升级任务", + "description": "重新执行失败的集群升级任务。", + "operationId": "RetryAutopilotUpgradeClusterTask", + "responses": { + "200": { + "description": "表示重试集群升级任务下发成功。" + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "scaleGroups" : { - "type" : "array", - "description" : "扩缩容的节点池,只能填一个伸缩组,如果要伸缩默认伸缩组填default", - "items" : { - "type" : "string", - "description" : "伸缩组名称" + { + "$ref": "#/components/parameters/param_path_clusterid" + } + ] + }, + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "RetryAutopilotUpgradeClusterTask", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgrade/retry" + }, + "/CreateAutopilotPostCheck": { + "post": { + "tags": [ + "集群升级(Autopilot)" + ], + "summary": "集群升级后确认", + "description": "集群升级后确认,该接口建议配合Console使用,主要用于升级步骤完成后,客户确认集群状态和业务正常后做反馈。", + "operationId": "CreateAutopilotPostCheck", + "responses": { + "200": { + "description": "集群升级后确认成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostcheckClusterResponseBody" + } + } } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "options" : { - "description" : "节点池伸缩选项配置", - "$ref" : "#/components/schemas/ScaleNodePoolOptions" + { + "$ref": "#/components/parameters/param_path_clusterid" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostcheckClusterRequestBody" + } + } + }, + "required": true + } + }, + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "CreateAutopilotPostCheck", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/postcheck" + }, + "/ShowUpgradeClusterTask": { + "get": { + "tags": [ + "集群升级" + ], + "summary": "获取集群升级任务详情", + "description": "获取集群升级任务详情,任务ID由调用集群升级API后从响应体中uid字段获取。", + "operationId": "ShowUpgradeClusterTask", + "responses": { + "200": { + "description": "表示获取集群升级任务详情成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeTaskResponseBody" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_path_taskid" + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowUpgradeClusterTask", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgrade/tasks/{task_id}" + }, + "/ShowQuotas": { + "get": { + "tags": [ + "配额管理" + ], + "summary": "查询CCE服务下的资源配额", + "description": "该API用于查询CCE服务下的资源配额。", + "operationId": "ShowQuotas", + "responses": { + "200": { + "description": "表示获取资源配额成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainQuotaResponse" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowQuotas", + "x-url": "{endpoint}/api/v3/projects/{project_id}/quotas" + }, + "/UpdateClusterEip": { + "put": { + "tags": [ + "集群管理" + ], + "summary": "绑定、解绑集群公网apiserver地址", + "description": "该API用于通过集群ID绑定、解绑集群公网apiserver地址", + "operationId": "UpdateClusterEip", + "responses": { + "200": { + "description": "表示绑定集群公网apiserver地址成功,解绑成功无响应体。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MasterEIPResponse" + } + } + } } }, - "type" : "object" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MasterEIPRequest" + } + } + }, + "required": true + } }, - "ScaleUpBillingConfigOverride" : { - "description" : "节点池扩容时覆盖节点的默认计费模式配置", - "required" : [ "billingMode" ], - "properties" : { - "billingMode" : { - "type" : "integer", - "description" : "节点计费类型,0(按需),1(包周期)" + "x-method": "put", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UpdateClusterEip", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/mastereip" + }, + "/DownloadChart": { + "get": { + "tags": [ + "模板管理" + ], + "summary": "下载模板", + "description": "下载模板", + "operationId": "DownloadChart", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "file" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_chart_id" }, - "extendParam" : { - "description" : "节点池扩容时节点的计费配置", - "$ref" : "#/components/schemas/ScaleUpExtendParam" + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "DownloadChart", + "x-url": "{endpoint}/v2/charts/{chart_id}/archive" + }, + "/ShowCluster": { + "get": { + "tags": [ + "集群管理" + ], + "summary": "获取指定的集群", + "description": "该API用于获取指定集群的详细信息。", + "operationId": "ShowCluster", + "deprecated": false, + "responses": { + "200": { + "description": "表示获取指定集群成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShowCluster" + } + } + } } }, - "type" : "object" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + }, + { + "name": "detail", + "in": "query", + "description": "查询集群详细信息。", + "required": false, + "schema": { + "description": "查询集群详细信息。", + "type": "string" + } + } + ] }, - "ScaleNodePoolRequestBody" : { - "description" : "伸缩节点池的请求体", - "required" : [ "kind", "apiVersion", "spec" ], - "properties" : { - "kind" : { - "type" : "string", - "description" : "API类型,固定值“NodePool”。", - "default" : "NodePool" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowCluster", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}" + }, + "/CreateAutopilotMaintenanceWindow": { + "post": { + "tags": [ + "集群升级(Autopilot)" + ], + "summary": "创建集群维护窗口", + "description": "该API用于创建集群维护窗口。", + "operationId": "CreateAutopilotMaintenanceWindow", + "responses": { + "201": { + "description": "创建集群维护窗口成功", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MaintenanceWindow" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" }, - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值“v3”。", - "default" : "v3" + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MaintenanceWindow" + } + } }, - "spec" : { - "description" : "伸缩节点池请求详细参数", - "$ref" : "#/components/schemas/ScaleNodePoolSpec" + "required": true + } + }, + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "CreateAutopilotMaintenanceWindow", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/maintenancewindows" + }, + "/ShowPartition": { + "get": { + "tags": [ + "集群管理" + ], + "summary": "获取分区详情", + "description": "获取分区详情", + "operationId": "ShowPartition", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Partition" + } + } + } + } + } + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowPartition", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/partitions/{partition_name}" + }, + "/ListNodePools": { + "get": { + "tags": [ + "节点池管理" + ], + "summary": "获取集群下所有节点池", + "description": "该API用于获取集群下所有节点池。", + "operationId": "ListNodePools", + "deprecated": false, + "responses": { + "200": { + "description": "表示获取集群下所有节点池成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodePools" + } + } + } } }, - "type" : "object" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + }, + { + "name": "showDefaultNodePool", + "in": "query", + "description": "是否展示默认节点池。默认不展示,指定为“true”时展示默认节点池。", + "required": false, + "schema": { + "description": "是否展示默认节点池。默认不展示,指定为“true”时展示默认节点池。", + "type": "string" + } + } + ] }, - "ScaleUpExtendParam" : { - "description" : "节点池扩容时节点的计费配置", - "required" : [ "periodNum", "periodType" ], - "properties" : { - "periodNum" : { - "type" : "integer", - "description" : "包周期时长, 包月1-9, 包年1-3" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListNodePools", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools" + }, + "/ShowAutopilotChartValues": { + "get": { + "tags": [ + "模板管理(Autopilot)" + ], + "summary": "获取模板Values", + "description": "获取模板Values", + "operationId": "ShowAutopilotChartValues", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChartValue" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_chart_id" }, - "periodType" : { - "type" : "string", - "description" : "包周期类型, year(包年), month(包月)" + { + "$ref": "#/components/parameters/param_header_content_type" }, - "isAutoRenew" : { - "type" : "boolean", - "description" : "是否自动续费,可选参数,如果不填写,以节点池isAutoRenew属性为准。" + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowAutopilotChartValues", + "x-url": "{endpoint}/autopilot/v2/charts/{chart_id}/values" + }, + "/ListClusterMasterSnapshotTasks": { + "get": { + "tags": [ + "集群升级" + ], + "summary": "获取集群备份任务详情列表", + "description": "获取集群备份任务详情列表", + "operationId": "ListClusterMasterSnapshotTasks", + "responses": { + "200": { + "description": "表示获取集群备份任务详情列表成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotClusterTaskResponseBody" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "isAutoPay" : { - "type" : "boolean", - "description" : "是否自动付费,可选参数,如果不填写,以节点池isAutoPay属性为准。" + { + "$ref": "#/components/parameters/param_path_clusterid" + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListClusterMasterSnapshotTasks", + "x-url": "{endpoint}/api/v3.1/projects/{project_id}/clusters/{cluster_id}/operation/snapshot/tasks" + }, + "/AddNode": { + "post": { + "tags": [ + "节点管理" + ], + "summary": "纳管节点", + "description": "该API用于在指定集群下纳管节点。", + "operationId": "AddNode", + "deprecated": false, + "responses": { + "200": { + "description": "表示在指定集群下纳管节点的作业下发成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReinstallJobResult" + } + } + } } }, - "type" : "object" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddNodeList" + } + } + }, + "required": true + } }, - "ChartRespList" : { - "type" : "object", - "description" : "模板列表", - "items" : { - "$ref" : "#/components/schemas/ChartResp" + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "AddNode", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/add" + }, + "/UpdateAutopilotRelease": { + "put": { + "tags": [ + "模板管理(Autopilot)" + ], + "summary": "更新指定模板实例", + "description": "更新指定模板实例", + "operationId": "UpdateAutopilotRelease", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReleaseResp" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateReleaseReqBody" + } + } + }, + "required": true } }, - "UpdateClusterConfigurationsBody" : { - "description" : "更新指定集群配置参数内容请求体", - "required" : [ "kind", "apiVersion", "metadata", "spec" ], - "properties" : { - "apiVersion" : { - "type" : "string", - "description" : "API版本,固定值**v3**" + "x-method": "put", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UpdateAutopilotRelease", + "x-url": "{endpoint}/autopilot/cam/v3/clusters/{cluster_id}/namespace/{namespace}/releases/{name}" + }, + "/ListAddonInstances": { + "get": { + "tags": [ + "插件管理" + ], + "summary": "获取AddonInstance列表", + "description": "获取集群所有已安装插件实例", + "operationId": "ListAddonInstances", + "deprecated": false, + "responses": { + "200": { + "description": "ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddonInstances" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + }, + { + "name": "cluster_id", + "in": "query", + "description": "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", + "required": true, + "schema": { + "description": "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", + "type": "string", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + } + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListAddonInstances", + "x-url": "{endpoint}/api/v3/addons" + }, + "/UploadChart": { + "post": { + "tags": [ + "模板管理" + ], + "summary": "上传模板", + "description": "上传模板", + "operationId": "UploadChart", + "deprecated": false, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChartResp" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_header_content_type" }, - "kind" : { - "type" : "string", - "description" : "API类型,固定值**Configuration**" + { + "$ref": "#/components/parameters/param_header_x_auth_token" }, - "metadata" : { - "description" : "Configuration的元数据信息", - "$ref" : "#/components/schemas/ConfigurationMetadata" + { + "name": "parameters", + "in": "formData", + "description": "上传模板的配置参数,示例如下:\"{\\\"override\\\":true,\\\"skip_lint\\\":true,\\\"source\\\":\\\"package\\\"}\"", + "required": false, + "schema": { + "description": "上传模板的配置参数,示例如下:\"{\\\"override\\\":true,\\\"skip_lint\\\":true,\\\"source\\\":\\\"package\\\"}\"", + "type": "string" + } + }, + { + "name": "content", + "in": "formData", + "description": "模板包文件", + "required": true, + "schema": { + "description": "模板包文件", + "type": "file" + } + } + ] + }, + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UploadChart", + "x-url": "{endpoint}/v2/charts" + }, + "/ShowClusterEndpoints": { + "get": { + "tags": [ + "集群管理" + ], + "summary": "获取集群访问的地址", + "description": "该API用于通过集群ID获取集群访问的地址,包括PrivateIP(HA集群返回VIP)与PublicIP", + "operationId": "ShowClusterEndpoints", + "responses": { + "200": { + "description": "表示获取集群访问的地址成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAPIResponse" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "spec" : { - "description" : "Configuration的规格信息", - "$ref" : "#/components/schemas/ClusterConfigurationsSpec" + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowClusterEndpoints", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/openapi" + }, + "/CreateAutopilotClusterMasterSnapshot": { + "post": { + "tags": [ + "集群升级(Autopilot)" + ], + "summary": "集群备份", + "description": "集群备份", + "operationId": "CreateAutopilotClusterMasterSnapshot", + "responses": { + "200": { + "description": "表示创建集群备份任务成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotClusterResponseBody" + } + } + } } }, - "type" : "object" - } + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + } + ] + }, + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "CreateAutopilotClusterMasterSnapshot", + "x-url": "{endpoint}/autopilot/v3.1/projects/{project_id}/clusters/{cluster_id}/operation/snapshot" }, - "securitySchemes" : { } - }, - "paths" : { - "/ContinueUpgradeClusterTask" : { - "post" : { - "tags" : [ "集群升级" ], - "summary" : "继续执行集群升级任务", - "description" : "继续执行被暂停的集群升级任务。", - "operationId" : "ContinueUpgradeClusterTask", - "responses" : { - "200" : { - "description" : "表示继续执行集群升级任务操作下发成功。" - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - } ] - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ContinueUpgradeClusterTask", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgrade/continue" - }, - "/BatchDeleteAutopilotClusterTags" : { - "post" : { - "tags" : [ "标签管理(Autopilot)" ], - "summary" : "批量删除指定集群的资源标签", - "description" : "该API用于批量删除指定集群的资源标签。", - "operationId" : "BatchDeleteAutopilotClusterTags", - "responses" : { - "204" : { - "description" : "No Content" - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BatchDeleteClusterTagsRequestBody" - } - } - }, - "required" : true + "/BatchSyncNodes": { + "post": { + "tags": [ + "节点管理" + ], + "summary": "批量同步节点", + "description": "该API用于批量同步节点。", + "operationId": "BatchSyncNodes", + "deprecated": false, + "responses": { + "200": { + "description": "表示批量同步节点成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncNodesResp" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] + }, + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "BatchSyncNodes", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/sync" + }, + "/ListAutopilotUpgradePlans": { + "get": { + "tags": [ + "集群升级(Autopilot)" + ], + "summary": "获取自动升级计划", + "description": "该API用于获取集群自动升级计划。", + "operationId": "ListAutopilotUpgradePlans", + "responses": { + "200": { + "description": "获取指定集群下自动升级计划成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradePlanResponseBody" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListAutopilotUpgradePlans", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/upgradeplans" + }, + "/UpdateClusterLogConfig": { + "put": { + "tags": [ + "集群管理" + ], + "summary": "配置集群日志", + "description": "用户可以选择集群管理节点上哪些组件的日志上报LTS", + "operationId": "UpdateClusterLogConfig", + "responses": { + "200": { + "description": "表示集群日志配置成功", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterLogConfig" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterLogConfig" + } + } + }, + "required": true + } + }, + "x-method": "put", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UpdateClusterLogConfig", + "x-url": "{endpoint}/api/v3/projects/{project_id}/cluster/{cluster_id}/log-configs" + }, + "/ResizeCluster": { + "post": { + "tags": [ + "集群管理" + ], + "summary": "变更集群规格", + "description": "该API用于变更一个指定集群的规格。", + "operationId": "ResizeCluster", + "deprecated": false, + "responses": { + "201": { + "description": "表示按需集群规格变更作业下发成功", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResizeClusterResponseBody" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResizeClusterRequestBody" + } + } + }, + "required": true } }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "BatchDeleteAutopilotClusterTags", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/tags/delete" - }, - "/AwakeCluster" : { - "post" : { - "tags" : [ "集群管理" ], - "summary" : "集群唤醒", - "description" : "集群唤醒用于唤醒已休眠的集群,唤醒后,将继续收取控制节点资源费用。", - "operationId" : "AwakeCluster", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示集群唤醒任务下发成功,需持续查询集群状态,当集群状态变为Available后表示唤醒成功" - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "AwakeCluster", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/awake" - }, - "/ShowChartValues" : { - "get" : { - "tags" : [ "模板管理" ], - "summary" : "获取模板Values", - "description" : "获取模板Values", - "operationId" : "ShowChartValues", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ChartValue" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_chart_id" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowChartValues", - "x-url" : "{endpoint}/v2/charts/{chart_id}/values" - }, - "/UpgradeWorkFlowUpdate" : { - "patch" : { - "tags" : [ "集群升级" ], - "summary" : "更新指定集群升级引导任务状态", - "description" : "该API用于更新指定集群升级引导任务状态,当前仅适用于取消升级流程", - "operationId" : "UpgradeWorkFlowUpdate", - "responses" : { - "200" : { - "description" : "表示更新集群升级引导任务状态成功", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradeWorkFlow" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_path_upgradeworkflowid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradeWorkFlowUpdateRequestBody" - } - } - }, - "required" : true + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ResizeCluster", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/resize" + }, + "/CreatePreCheck": { + "post": { + "tags": [ + "集群升级" + ], + "summary": "集群升级前检查", + "description": "集群升级前检查", + "operationId": "CreatePreCheck", + "responses": { + "200": { + "description": "执行集群升级前检查成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrecheckClusterResponseBody" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrecheckClusterRequestBody" + } + } + }, + "required": true } }, - "x-method" : "patch", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UpgradeWorkFlowUpdate", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgradeworkflows/{upgrade_workflow_id}" - }, - "/UpdateAddonInstance" : { - "put" : { - "tags" : [ "插件管理" ], - "summary" : "更新AddonInstance", - "description" : "更新插件实例的功能。", - "operationId" : "UpdateAddonInstance", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AddonInstance" - } - } - } - } - }, - "parameters" : [ { - "name" : "id", - "in" : "path", - "description" : "插件实例id", - "required" : true, - "schema" : { - "description" : "插件实例id", - "type" : "string", - "maxLength" : 255, - "minLength" : 1 - } - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InstanceRequest" - } - } - }, - "required" : true + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "CreatePreCheck", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/precheck" + }, + "/UpgradeAutopilotWorkFlowUpdate": { + "patch": { + "tags": [ + "集群升级(Autopilot)" + ], + "summary": "更新指定集群升级引导任务状态", + "description": "该API用于更新指定集群升级引导任务状态,当前仅适用于取消升级流程", + "operationId": "UpgradeAutopilotWorkFlowUpdate", + "responses": { + "200": { + "description": "表示更新集群升级引导任务状态成功", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeWorkFlow" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_path_upgradeworkflowid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeWorkFlowUpdateRequestBody" + } + } + }, + "required": true } }, - "x-method" : "put", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UpdateAddonInstance", - "x-url" : "{endpoint}/api/v3/addons/{id}" - }, - "/UpdateNode" : { - "put" : { - "tags" : [ "节点管理" ], - "summary" : "更新指定的节点", - "description" : "该API用于更新指定的节点。", - "operationId" : "UpdateNode", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示更新指定节点成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Node" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_path_nodeid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ClusterNodeInformation" - } - } - }, - "required" : true + "x-method": "patch", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UpgradeAutopilotWorkFlowUpdate", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgradeworkflows/{upgrade_workflow_id}" + }, + "/RetryUpgradeClusterTask": { + "post": { + "tags": [ + "集群升级" + ], + "summary": "重试集群升级任务", + "description": "重新执行失败的集群升级任务。", + "operationId": "RetryUpgradeClusterTask", + "responses": { + "200": { + "description": "表示重试集群升级任务下发成功。" + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + } + ] + }, + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "RetryUpgradeClusterTask", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgrade/retry" + }, + "/ShowAutopilotClusterEndpoints": { + "get": { + "tags": [ + "集群管理(Autopilot)" + ], + "summary": "获取集群访问的地址", + "description": "该API用于通过集群ID获取集群访问的地址,包括PrivateIP(HA集群返回VIP)与PublicIP", + "operationId": "ShowAutopilotClusterEndpoints", + "responses": { + "200": { + "description": "表示获取集群访问的地址成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAPIResponse" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowAutopilotClusterEndpoints", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/openapi" + }, + "/DeleteAutopilotCluster": { + "delete": { + "tags": [ + "集群管理(Autopilot)" + ], + "summary": "删除集群", + "description": "该API用于删除一个指定的集群。", + "operationId": "DeleteAutopilotCluster", + "deprecated": false, + "responses": { + "200": { + "description": "表示删除指定集群作业下发成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutopilotCluster" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + }, + { + "name": "delete_efs", + "in": "query", + "description": "是否删除SFS Turbo(极速文件存储卷),", + "required": false, + "schema": { + "example": "delete_efs=true", + "description": "是否删除SFS Turbo(极速文件存储卷),", + "type": "string", + "default": "false", + "enum": [ + "true", + "block", + "try", + "false", + "skip" + ] + } + }, + { + "name": "delete_eni", + "in": "query", + "description": "是否删除eni ports(原生弹性网卡),", + "required": false, + "schema": { + "example": "delete_eni=true", + "description": "是否删除eni ports(原生弹性网卡),", + "type": "string", + "default": "block", + "enum": [ + "true", + "block", + "try", + "false", + "skip" + ] + } + }, + { + "name": "delete_net", + "in": "query", + "description": "是否删除elb(弹性负载均衡)等集群Service/Ingress相关资源。", + "required": false, + "schema": { + "example": "delete_net=true", + "description": "是否删除elb(弹性负载均衡)等集群Service/Ingress相关资源。", + "type": "string", + "default": "block", + "enum": [ + "true", + "block", + "try", + "false", + "skip" + ] + } + }, + { + "name": "delete_obs", + "in": "query", + "description": "是否删除obs(对象存储卷),", + "required": false, + "schema": { + "example": "delete_obs=true", + "description": "是否删除obs(对象存储卷),", + "type": "string", + "default": "false", + "enum": [ + "true", + "block", + "try", + "false", + "skip" + ] + } + }, + { + "name": "delete_sfs30", + "in": "query", + "description": "是否删除sfs3.0(文件存储卷3.0),", + "required": false, + "schema": { + "example": "delete_sfs30=true", + "description": "是否删除sfs3.0(文件存储卷3.0),", + "type": "string", + "default": "false", + "enum": [ + "true", + "block", + "try", + "false", + "skip" + ] + } + }, + { + "name": "lts_reclaim_policy", + "in": "query", + "description": "是否删除LTS资源(日志组/日志流)。", + "required": false, + "schema": { + "example": "lts_reclaim_policy=Delete_Log_Group", + "description": "是否删除LTS资源(日志组/日志流)。", + "type": "string", + "default": "Delete_Master_Log_Stream", + "enum": [ + "Delete_Log_Group", + "Delete_Master_Log_Stream", + "Retain" + ] + } + } + ] + }, + "x-method": "delete", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "DeleteAutopilotCluster", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}" + }, + "/CreateCluster": { + "post": { + "tags": [ + "集群管理" + ], + "summary": "创建集群", + "description": "该API用于创建一个空集群(即只有控制节点Master,没有工作节点Node)。请在调用本接口完成集群创建之后,通过[创建节点](cce_02_0242.xml)添加节点。", + "operationId": "CreateCluster", + "deprecated": false, + "responses": { + "201": { + "description": "表示创建集群作业下发成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Cluster" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Cluster" + } + } + }, + "required": true } }, - "x-method" : "put", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UpdateNode", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/{node_id}" - }, - "/UpgradeNodePool" : { - "post" : { - "tags" : [ "节点池管理" ], - "summary" : "同步节点池", - "description" : "该API用于同步节点池中已有节点的配置", - "operationId" : "UpgradeNodePool", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示获取任务信息成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradeNodepoolJobResult" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_path_nodepool_id" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradeNodePool" - } - } - }, - "required" : true + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "CreateCluster", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters" + }, + "/ListClusterUpgradePaths": { + "get": { + "tags": [ + "集群升级" + ], + "summary": "获取集群升级路径", + "description": "获取集群升级路径", + "operationId": "ListClusterUpgradePaths", + "responses": { + "200": { + "description": "表示获取集群升级路径信息成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterUpgradePathsResponseBody" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListClusterUpgradePaths", + "x-url": "{endpoint}/api/v3/clusterupgradepaths" + }, + "/DeleteAutopilotAddonInstance": { + "delete": { + "tags": [ + "插件管理(Autopilot)" + ], + "summary": "删除AddonInstance", + "description": "删除插件实例的功能。", + "operationId": "DeleteAutopilotAddonInstance", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + }, + { + "name": "id", + "in": "path", + "description": "插件实例id", + "required": true, + "schema": { + "description": "插件实例id", + "type": "string", + "maxLength": 255, + "minLength": 1 + } + }, + { + "name": "cluster_id", + "in": "query", + "description": "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", + "required": false, + "schema": { + "description": "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", + "type": "string", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + } + } + ] + }, + "x-method": "delete", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "DeleteAutopilotAddonInstance", + "x-url": "{endpoint}/autopilot/v3/addons/{id}" + }, + "/UnlockNodepoolNodeScaleDown": { + "post": { + "tags": [ + "节点管理" + ], + "summary": "节点关闭缩容保护。", + "description": "该API用于节点关闭缩容保护,关闭缩容保护的节点可以通过修改节点池个数的方式被缩容,只允许按需节点关闭缩容保护。", + "operationId": "UnlockNodepoolNodeScaleDown", + "responses": { + "200": { + "description": "表示节点关闭缩容保护成功。" + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnlockNodeScaledownRequestBody" + } + } + }, + "required": true } }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UpgradeNodePool", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools/{nodepool_id}/operation/upgrade" + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UnlockNodepoolNodeScaleDown", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/unlocknodescaledown" }, - "/CreateNodePool" : { - "post" : { - "tags" : [ "节点池管理" ], - "summary" : "创建节点池", - "description" : "该API用于在指定集群下创建节点池。仅支持集群在处于可用、扩容、缩容状态时调用。", - "operationId" : "CreateNodePool", - "deprecated" : false, - "responses" : { - "201" : { - "description" : "表示在指定集群下创建节点池的作业下发成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CreateNodePoolResp" + "/DeleteAddonInstance": { + "delete": { + "tags": [ + "插件管理" + ], + "summary": "删除AddonInstance", + "description": "删除插件实例的功能。", + "operationId": "DeleteAddonInstance", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" } } } } }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NodePool" - } + "parameters": [ + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + }, + { + "name": "id", + "in": "path", + "description": "插件实例id", + "required": true, + "schema": { + "description": "插件实例id", + "type": "string", + "maxLength": 255, + "minLength": 1 } }, - "required" : true - } + { + "name": "cluster_id", + "in": "query", + "description": "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", + "required": false, + "schema": { + "description": "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", + "type": "string", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + } + } + ] }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "CreateNodePool", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools" + "x-method": "delete", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "DeleteAddonInstance", + "x-url": "{endpoint}/api/v3/addons/{id}" }, - "/DeleteAutopilotRelease" : { - "delete" : { - "tags" : [ "模板管理(Autopilot)" ], - "summary" : "删除指定模板实例", - "description" : "删除指定模板实例", - "operationId" : "DeleteAutopilotRelease", - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "type" : "string" + "/CreateAutopilotUpgradeWorkFlow": { + "post": { + "tags": [ + "集群升级(Autopilot)" + ], + "summary": "开启集群升级流程引导任务", + "description": "该API用于创建一个集群升级流程引导任务。请在调用本接口完成引导任务创建之后,通过集群升级前检查开始检查任务。", + "operationId": "CreateAutopilotUpgradeWorkFlow", + "responses": { + "201": { + "description": "表示在指定集群下创建升级流程成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeWorkFlow" } } } } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateUpgradeWorkFlowRequestBody" + } + } + }, + "required": true } }, - "x-method" : "delete", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "DeleteAutopilotRelease", - "x-url" : "{endpoint}/autopilot/cam/v3/clusters/{cluster_id}/namespace/{namespace}/releases/{name}" - }, - "/ListAutopilotReleases" : { - "get" : { - "tags" : [ "模板管理(Autopilot)" ], - "summary" : "获取模板实例列表", - "description" : "获取模板实例列表", - "operationId" : "ListAutopilotReleases", - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ReleaseResp" - } + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "CreateAutopilotUpgradeWorkFlow", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgradeworkflows" + }, + "/ListAutopilotClusterUpgradeFeatureGates": { + "get": { + "tags": [ + "集群升级(Autopilot)" + ], + "summary": "获取集群升级特性开关配置", + "description": "获取集群升级特性开关配置", + "operationId": "ListAutopilotClusterUpgradeFeatureGates", + "responses": { + "200": { + "description": "表示获取集群升级路径信息成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterUpgradeFeatureGatesResponseBody" } } } } }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "name" : "chart_id", - "in" : "query", - "description" : "模板ID", - "schema" : { - "description" : "模板ID", - "type" : "string" - } - }, { - "name" : "namespace", - "in" : "query", - "description" : "模板对应的命名空间", - "schema" : { - "description" : "模板对应的命名空间", - "type" : "string" - } - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListAutopilotReleases", - "x-url" : "{endpoint}/autopilot/cam/v3/clusters/{cluster_id}/releases" - }, - "/CreateClusterMasterSnapshot" : { - "post" : { - "tags" : [ "集群升级" ], - "summary" : "集群备份", - "description" : "集群备份", - "operationId" : "CreateClusterMasterSnapshot", - "responses" : { - "200" : { - "description" : "表示创建集群备份任务成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SnapshotClusterResponseBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - } ] - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "CreateClusterMasterSnapshot", - "x-url" : "{endpoint}/api/v3.1/projects/{project_id}/clusters/{cluster_id}/operation/snapshot" - }, - "/UploadAutopilotChart" : { - "post" : { - "tags" : [ "模板管理(Autopilot)" ], - "summary" : "上传模板", - "description" : "上传模板", - "operationId" : "UploadAutopilotChart", - "deprecated" : false, - "responses" : { - "201" : { - "description" : "Created", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ChartResp" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "name" : "parameters", - "in" : "formData", - "description" : "上传模板的配置参数,示例如下:\"{\\\"override\\\":true,\\\"skip_lint\\\":true,\\\"source\\\":\\\"package\\\"}\"", - "required" : false, - "schema" : { - "description" : "上传模板的配置参数,示例如下:\"{\\\"override\\\":true,\\\"skip_lint\\\":true,\\\"source\\\":\\\"package\\\"}\"", - "type" : "string" - } - }, { - "name" : "content", - "in" : "formData", - "description" : "模板包文件", - "required" : true, - "schema" : { - "description" : "模板包文件", - "type" : "file" - } - } ] - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UploadAutopilotChart", - "x-url" : "{endpoint}/autopilot/v2/charts" - }, - "/ShowClusterSupportConfiguration" : { - "get" : { - "tags" : [ "配置管理" ], - "summary" : "根据集群版本类型等查询集群支持的详细配置项,用于集群创建时指定", - "description" : "该API用于根据集群版本类型等查询集群支持的详细配置项,用于集群创建时指定。", - "operationId" : "ShowClusterSupportConfiguration", - "responses" : { - "200" : { - "description" : "表示获取指定集群配置参数列表成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ClusterConfigDetailRespBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_query_clusterid" - }, { - "$ref" : "#/components/parameters/param_query_cluster_type" - }, { - "$ref" : "#/components/parameters/param_query_cluster_version" - }, { - "$ref" : "#/components/parameters/param_query_network_mode" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowClusterSupportConfiguration", - "x-url" : "{endpoint}/api/v3/clusters/configuration/detail" - }, - "/DownloadAutopilotChart" : { - "get" : { - "tags" : [ "模板管理(Autopilot)" ], - "summary" : "下载模板", - "description" : "下载模板", - "operationId" : "DownloadAutopilotChart", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "type" : "file" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_chart_id" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "DownloadAutopilotChart", - "x-url" : "{endpoint}/autopilot/v2/charts/{chart_id}/archive" - }, - "/ShowNodePool" : { - "get" : { - "tags" : [ "节点池管理" ], - "summary" : "获取指定的节点池", - "description" : "该API用于获取指定节点池的详细信息。", - "operationId" : "ShowNodePool", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示获取指定节点池成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NodePoolResp" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_path_nodepool_id" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowNodePool", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools/{nodepool_id}" - }, - "/UpdateChart" : { - "put" : { - "tags" : [ "模板管理" ], - "summary" : "更新模板", - "description" : "更新模板", - "operationId" : "UpdateChart", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ChartResp" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_chart_id" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "name" : "parameters", - "in" : "formData", - "description" : "上传模板的配置参数,示例如下:\"{\\\"override\\\":true,\\\"skip_lint\\\":true,\\\"source\\\":\\\"package\\\"}\"", - "required" : false, - "schema" : { - "description" : "上传模板的配置参数,示例如下:\"{\\\"override\\\":true,\\\"skip_lint\\\":true,\\\"source\\\":\\\"package\\\"}\"", - "type" : "string" - } - }, { - "name" : "content", - "in" : "formData", - "description" : "模板包文件", - "required" : true, - "schema" : { - "description" : "模板包文件", - "type" : "file" - } - } ] - }, - "x-method" : "put", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UpdateChart", - "x-url" : "{endpoint}/v2/charts/{chart_id}" - }, - "/AddNodesToNodePool" : { - "post" : { - "tags" : [ "节点管理" ], - "summary" : "自定义节点池纳管节点", - "description" : "该API用于在指定集群自定义节点池下纳管节点。竞价实例不支持纳管。", - "operationId" : "AddNodesToNodePool", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示在指定集群自定义节点池下纳管节点的作业下发成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ReinstallJobResult" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_path_nodepool_id" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AddNodesToNodePoolList" - } - } - }, - "required" : true - } - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "AddNodesToNodePool", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools/{nodepool_id}/nodes/add" - }, - "/HibernateCluster" : { - "post" : { - "tags" : [ "集群管理" ], - "summary" : "集群休眠", - "description" : "集群休眠用于将运行中的集群置于休眠状态,休眠后,将不再收取控制节点资源费用。", - "operationId" : "HibernateCluster", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示集群休眠任务下发成功,需持续查询集群状态,当集群状态变为Hibernation后表示休眠成功" - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "HibernateCluster", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/hibernate" - }, - "/CreateNode" : { - "post" : { - "tags" : [ "节点管理" ], - "summary" : "创建节点", - "description" : "该API用于在指定集群下创建节点。", - "operationId" : "CreateNode", - "deprecated" : false, - "responses" : { - "201" : { - "description" : "表示在指定集群下创建节点的作业下发成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Node" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "name" : "nodepoolScaleUp", - "in" : "query", - "description" : "标明是否为nodepool下发的请求。若不为“NodepoolScaleUp”将自动更新对应节点池的实例数", - "required" : false, - "schema" : { - "description" : "标明是否为nodepool下发的请求。若不为“NodepoolScaleUp”将自动更新对应节点池的实例数", - "type" : "string", - "enum" : [ "NodepoolScaleUp" ] - } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NodeCreateRequest" - } - } - }, - "required" : true - } - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "CreateNode", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes" - }, - "/ShowChart" : { - "get" : { - "tags" : [ "模板管理" ], - "summary" : "获取模板", - "description" : "获取模板", - "operationId" : "ShowChart", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ChartResp" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_chart_id" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowChart", - "x-url" : "{endpoint}/v2/charts/{chart_id}" - }, - "/ListAutopilotClusters" : { - "get" : { - "tags" : [ "集群管理(Autopilot)" ], - "summary" : "获取指定项目下的集群", - "description" : "该API用于获取指定项目下所有集群的详细信息。", - "operationId" : "ListAutopilotClusters", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示获取集群列表成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AutopilotClusterList" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "name" : "detail", - "in" : "query", - "description" : "查询集群详细信息。", - "required" : false, - "schema" : { - "description" : "查询集群详细信息。", - "type" : "string" - } - }, { - "name" : "status", - "in" : "query", - "description" : "集群状态,取值如下", - "required" : false, - "schema" : { - "description" : "集群状态,取值如下", - "type" : "string", - "enum" : [ "Available", "Unavailable", "Creating", "Deleting", "Upgrading", "RollingBack", "RollbackFailed", "Error" ] - } - }, { - "name" : "type", - "in" : "query", - "description" : "集群类型:", - "required" : false, - "schema" : { - "description" : "集群类型:", - "type" : "string", - "enum" : [ "VirtualMachine" ] - } - }, { - "name" : "version", - "in" : "query", - "description" : "集群版本过滤", - "required" : false, - "schema" : { - "example" : "v1.15.11", - "description" : "集群版本过滤", - "type" : "string", - "maxLength" : 20, - "minLength" : 0 - } - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListAutopilotClusters", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters" - }, - "/UpdateAutopilotMaintenanceWindow" : { - "put" : { - "tags" : [ "集群升级(Autopilot)" ], - "summary" : "更新集群维护窗口", - "description" : "该API用于更新集群维护窗口。", - "operationId" : "UpdateAutopilotMaintenanceWindow", - "responses" : { - "200" : { - "description" : "更新集群维护窗口成功", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/MaintenanceWindow" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/MaintenanceWindow" - } - } - }, - "required" : true - } + "parameters": [ + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] }, - "x-method" : "put", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UpdateAutopilotMaintenanceWindow", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/maintenancewindows" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListAutopilotClusterUpgradeFeatureGates", + "x-url": "{endpoint}/autopilot/v3/clusterupgradefeaturegates" }, - "/ShowVersion" : { - "get" : { - "tags" : [ "API版本信息" ], - "summary" : "查询API版本信息列表", - "description" : "该API用于查询CCE服务当前支持的API版本信息列表。", - "operationId" : "ShowVersion", - "responses" : { - "200" : { - "description" : "表示查询API版本信息列表成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/APIVersionList" + "/ShowAutopilotUpgradeWorkFlow": { + "get": { + "tags": [ + "集群升级(Autopilot)" + ], + "summary": "获取指定集群升级引导任务详情", + "description": "该API用于通过升级引导任务ID获取任务的详细信息。", + "operationId": "ShowAutopilotUpgradeWorkFlow", + "responses": { + "200": { + "description": "表示获取指定集群升级引导任务详情成功", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeWorkFlow" } } } } - } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_path_upgradeworkflowid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowVersion", - "x-url" : "{endpoint}/" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowAutopilotUpgradeWorkFlow", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgradeworkflows/{upgrade_workflow_id}" }, - "/RemoveNode" : { - "put" : { - "tags" : [ "节点管理" ], - "summary" : "节点移除", - "description" : "该API用于在指定集群下移除节点。", - "operationId" : "RemoveNode", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示在指定集群下移除节点的作业下发成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RemoveNodesTask" + "/UpdateAutopilotUpgradePlan": { + "put": { + "tags": [ + "集群升级(Autopilot)" + ], + "summary": "延期自动升级计划", + "description": "该API用于延期集群自动升级计划。", + "operationId": "UpdateAutopilotUpgradePlan", + "responses": { + "200": { + "description": "表示在指定集群下延期自动升级计划成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradePlan" } } } } }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RemoveNodesTask" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_path_upgrade_plan_id" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DelayUpgradePlanRequestBody" } } }, - "required" : true - } - }, - "x-method" : "put", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "RemoveNode", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/operation/remove" - }, - "/ListImageCaches" : { - "get" : { - "tags" : [ "镜像缓存管理" ], - "summary" : "查询镜像缓存列表", - "description" : "查询镜像缓存列表", - "operationId" : "ListImageCaches", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ListImageCacheResponseBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/ListImageCachesParam_header_content_type" - }, { - "$ref" : "#/components/parameters/ListImageCachesParam_header_x_auth_token" - }, { - "name" : "name", - "in" : "query", - "description" : "**参数解释:**", - "required" : false, - "schema" : { - "description" : "**参数解释:**", - "type" : "string", - "maxLength" : 128, - "minLength" : 0 - } - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListImageCaches", - "x-url" : "{endpoint}/v5/imagecaches" - }, - "/ListUpgradeClusterTasks" : { - "get" : { - "tags" : [ "集群升级" ], - "summary" : "获取集群升级任务详情列表", - "description" : "获取集群升级任务详情列表", - "operationId" : "ListUpgradeClusterTasks", - "responses" : { - "200" : { - "description" : "表示获取集群升级任务详情列表成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradeTaskListResponseBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListUpgradeClusterTasks", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgrade/tasks" - }, - "/UpdateAutopilotChart" : { - "put" : { - "tags" : [ "模板管理(Autopilot)" ], - "summary" : "更新模板", - "description" : "更新模板", - "operationId" : "UpdateAutopilotChart", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ChartResp" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_chart_id" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "name" : "parameters", - "in" : "formData", - "description" : "上传模板的配置参数,示例如下:\"{\\\"override\\\":true,\\\"skip_lint\\\":true,\\\"source\\\":\\\"package\\\"}\"", - "required" : false, - "schema" : { - "description" : "上传模板的配置参数,示例如下:\"{\\\"override\\\":true,\\\"skip_lint\\\":true,\\\"source\\\":\\\"package\\\"}\"", - "type" : "string" - } - }, { - "name" : "content", - "in" : "formData", - "description" : "模板包文件", - "required" : true, - "schema" : { - "description" : "模板包文件", - "type" : "file" - } - } ] - }, - "x-method" : "put", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UpdateAutopilotChart", - "x-url" : "{endpoint}/autopilot/v2/charts/{chart_id}" - }, - "/ShowAutopilotAddonInstance" : { - "get" : { - "tags" : [ "插件管理(Autopilot)" ], - "summary" : "获取AddonInstance详情", - "description" : "获取插件实例详情。", - "operationId" : "ShowAutopilotAddonInstance", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AddonInstance" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "name" : "id", - "in" : "path", - "description" : "插件实例id", - "required" : true, - "schema" : { - "description" : "插件实例id", - "type" : "string", - "maxLength" : 255, - "minLength" : 1 - } - }, { - "name" : "cluster_id", - "in" : "query", - "description" : "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", - "required" : false, - "schema" : { - "description" : "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", - "type" : "string", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - } - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowAutopilotAddonInstance", - "x-url" : "{endpoint}/autopilot/v3/addons/{id}" - }, - "/CreateAutopilotRelease" : { - "post" : { - "tags" : [ "模板管理(Autopilot)" ], - "summary" : "创建模板实例", - "description" : "创建模板实例", - "operationId" : "CreateAutopilotRelease", - "responses" : { - "201" : { - "description" : "Created", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ReleaseResp" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CreateReleaseReqBody" - } - } - }, - "required" : true - } - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "CreateAutopilotRelease", - "x-url" : "{endpoint}/autopilot/cam/v3/clusters/{cluster_id}/releases" - }, - "/DeleteNodePool" : { - "delete" : { - "tags" : [ "节点池管理" ], - "summary" : "删除节点池", - "description" : "该API用于删除指定的节点池。", - "operationId" : "DeleteNodePool", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示删除节点池作业下发成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DeleteNodePoolResp" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_path_nodepool_id" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "delete", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "DeleteNodePool", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools/{nodepool_id}" - }, - "/ListClusters" : { - "get" : { - "tags" : [ "集群管理" ], - "summary" : "获取指定项目下的集群", - "description" : "该API用于获取指定项目下所有集群的详细信息。", - "operationId" : "ListClusters", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示获取集群列表成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ClusterList" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "name" : "detail", - "in" : "query", - "description" : "查询集群详细信息。", - "required" : false, - "schema" : { - "description" : "查询集群详细信息。", - "type" : "string" - } - }, { - "name" : "status", - "in" : "query", - "description" : "集群状态,取值如下", - "required" : false, - "schema" : { - "description" : "集群状态,取值如下", - "type" : "string", - "enum" : [ "Available", "Unavailable", "ScalingUp", "ScalingDown", "Creating", "Deleting", "Upgrading", "Resizing", "RollingBack", "RollbackFailed", "Hibernating", "Hibernation", "Awaking", "Empty" ] - } - }, { - "name" : "type", - "in" : "query", - "description" : "集群类型:", - "required" : false, - "schema" : { - "description" : "集群类型:", - "type" : "string", - "enum" : [ "VirtualMachine", "ARM64" ] - } - }, { - "name" : "version", - "in" : "query", - "description" : "集群版本过滤", - "required" : false, - "schema" : { - "example" : "v1.15.11", - "description" : "集群版本过滤", - "type" : "string", - "maxLength" : 20, - "minLength" : 0 - } - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListClusters", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters" - }, - "/LockNodepoolNodeScaleDown" : { - "post" : { - "tags" : [ "节点管理" ], - "summary" : "节点开启缩容保护。", - "description" : "该API用于节点开启缩容保护,开启缩容保护的节点无法通过修改节点池个数的方式被缩容。", - "operationId" : "LockNodepoolNodeScaleDown", - "responses" : { - "200" : { - "description" : "表示节点开启缩容保护成功。" - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/LockNodeScaledownRequestBody" - } - } - }, - "required" : true + "required": true } }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "LockNodepoolNodeScaleDown", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/locknodescaledown" + "x-method": "put", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UpdateAutopilotUpgradePlan", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/upgradeplans/{upgrade_plan_id}" }, - "/ShowAutopilotRelease" : { - "get" : { - "tags" : [ "模板管理(Autopilot)" ], - "summary" : "获取指定模板实例", - "description" : "获取指定模板实例", - "operationId" : "ShowAutopilotRelease", - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ReleaseResp" + "/CreateAddonInstance": { + "post": { + "tags": [ + "插件管理" + ], + "summary": "创建AddonInstance", + "description": "根据提供的插件模板,安装插件实例。", + "operationId": "CreateAddonInstance", + "deprecated": false, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddonInstance" } } } } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstanceRequest" + } + } + }, + "required": true } }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowAutopilotRelease", - "x-url" : "{endpoint}/autopilot/cam/v3/clusters/{cluster_id}/namespace/{namespace}/releases/{name}" + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "CreateAddonInstance", + "x-url": "{endpoint}/api/v3/addons" }, - "/CreateRelease" : { - "post" : { - "tags" : [ "模板管理" ], - "summary" : "创建模板实例", - "description" : "创建模板实例", - "operationId" : "CreateRelease", - "responses" : { - "201" : { - "description" : "Created", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ReleaseResp" + "/CreateAutopilotAddonInstance": { + "post": { + "tags": [ + "插件管理(Autopilot)" + ], + "summary": "创建AddonInstance", + "description": "根据提供的插件模板,安装插件实例。", + "operationId": "CreateAutopilotAddonInstance", + "deprecated": false, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddonInstance" } } } } }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CreateReleaseReqBody" + "parameters": [ + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstanceRequest" } } }, - "required" : true + "required": true } }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "CreateRelease", - "x-url" : "{endpoint}/cce/cam/v3/clusters/{cluster_id}/releases" + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "CreateAutopilotAddonInstance", + "x-url": "{endpoint}/autopilot/v3/addons" }, - "/ListPartitions" : { - "get" : { - "tags" : [ "集群管理" ], - "summary" : "获取分区列表", - "description" : "获取分区列表", - "operationId" : "ListPartitions", - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PartitionList" + "/UpdateNodePool": { + "put": { + "tags": [ + "节点池管理" + ], + "summary": "更新指定节点池", + "description": "该API用于更新指定的节点池。仅支持集群在处于可用、扩容、缩容状态时调用。", + "operationId": "UpdateNodePool", + "deprecated": false, + "responses": { + "200": { + "description": "表示更新指定节点池成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateNodePoolResp" } } } } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_path_nodepool_id" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodePoolUpdate" + } + } + }, + "required": true } }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListPartitions", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/partitions" - }, - "/UpdateAutopilotAddonInstance" : { - "put" : { - "tags" : [ "插件管理(Autopilot)" ], - "summary" : "更新AddonInstance", - "description" : "更新插件实例的功能。", - "operationId" : "UpdateAutopilotAddonInstance", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AddonInstance" - } - } - } - } - }, - "parameters" : [ { - "name" : "id", - "in" : "path", - "description" : "插件实例id", - "required" : true, - "schema" : { - "description" : "插件实例id", - "type" : "string", - "maxLength" : 255, - "minLength" : 1 - } - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InstanceRequest" - } - } - }, - "required" : true + "x-method": "put", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UpdateNodePool", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools/{nodepool_id}" + }, + "/DeleteCluster": { + "delete": { + "tags": [ + "集群管理" + ], + "summary": "删除集群", + "description": "该API用于删除一个指定的集群。", + "operationId": "DeleteCluster", + "deprecated": false, + "responses": { + "200": { + "description": "表示删除指定集群作业下发成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Cluster" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + }, + { + "name": "delete_efs", + "in": "query", + "description": "是否删除SFS Turbo(极速文件存储卷),", + "required": false, + "schema": { + "example": "delete_efs=true", + "description": "是否删除SFS Turbo(极速文件存储卷),", + "type": "string", + "default": "false", + "enum": [ + "true", + "block", + "try", + "false", + "skip" + ] + } + }, + { + "name": "delete_eni", + "in": "query", + "description": "是否删除eni ports(原生弹性网卡),", + "required": false, + "schema": { + "example": "delete_eni=true", + "description": "是否删除eni ports(原生弹性网卡),", + "type": "string", + "default": "block", + "enum": [ + "true", + "block", + "try", + "false", + "skip" + ] + } + }, + { + "name": "delete_evs", + "in": "query", + "description": "是否删除evs(云硬盘),", + "required": false, + "schema": { + "example": "delete_evs=true", + "description": "是否删除evs(云硬盘),", + "type": "string", + "default": "false", + "enum": [ + "true", + "block", + "try", + "false", + "skip" + ] + } + }, + { + "name": "delete_net", + "in": "query", + "description": "是否删除elb(弹性负载均衡)等集群Service/Ingress相关资源。", + "required": false, + "schema": { + "example": "delete_net=true", + "description": "是否删除elb(弹性负载均衡)等集群Service/Ingress相关资源。", + "type": "string", + "default": "block", + "enum": [ + "true", + "block", + "try", + "false", + "skip" + ] + } + }, + { + "name": "delete_obs", + "in": "query", + "description": "是否删除obs(对象存储卷),", + "required": false, + "schema": { + "example": "delete_obs=true", + "description": "是否删除obs(对象存储卷),", + "type": "string", + "default": "false", + "enum": [ + "true", + "block", + "try", + "false", + "skip" + ] + } + }, + { + "name": "delete_sfs", + "in": "query", + "description": "是否删除sfs(文件存储卷),", + "required": false, + "schema": { + "example": "delete_sfs=true", + "description": "是否删除sfs(文件存储卷),", + "type": "string", + "default": "false", + "enum": [ + "true", + "block", + "try", + "false", + "skip" + ] + } + }, + { + "name": "delete_sfs30", + "in": "query", + "description": "是否删除sfs3.0(文件存储卷3.0),", + "required": false, + "schema": { + "example": "delete_sfs30=true", + "description": "是否删除sfs3.0(文件存储卷3.0),", + "type": "string", + "default": "false", + "enum": [ + "true", + "block", + "try", + "false", + "skip" + ] + } + }, + { + "name": "lts_reclaim_policy", + "in": "query", + "description": "是否删除LTS LogStream(日志流),", + "required": false, + "schema": { + "example": "lts_reclaim_policy=true", + "description": "是否删除LTS LogStream(日志流),", + "type": "string", + "default": "false", + "enum": [ + "true", + "block", + "try", + "false", + "skip" + ] + } + }, + { + "name": "tobedeleted", + "in": "query", + "description": "是否使用包周期集群删除参数预置模式(仅对包周期集群生效)。", + "required": false, + "schema": { + "example": "tobedeleted=true", + "description": "是否使用包周期集群删除参数预置模式(仅对包周期集群生效)。", + "type": "string", + "enum": [ + "true" + ] + } + }, + { + "name": "ondemand_node_policy", + "in": "query", + "description": "集群下所有按需节点处理策略,", + "required": false, + "schema": { + "example": "ondemand_node_policy=delete", + "description": "集群下所有按需节点处理策略,", + "type": "string", + "enum": [ + "delete", + "reset", + "retain" + ] + } + }, + { + "name": "periodic_node_policy", + "in": "query", + "description": "集群下所有包周期节点处理策略,", + "required": false, + "schema": { + "example": "periodic_node_policy=reset", + "description": "集群下所有包周期节点处理策略,", + "type": "string", + "enum": [ + "reset", + "retain" + ] + } + } + ] + }, + "x-method": "delete", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "DeleteCluster", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}" + }, + "/UpdateAutopilotClusterEip": { + "put": { + "tags": [ + "集群管理(Autopilot)" + ], + "summary": "绑定、解绑集群公网apiserver地址", + "description": "该API用于通过集群ID绑定、解绑集群公网apiserver地址", + "operationId": "UpdateAutopilotClusterEip", + "responses": { + "200": { + "description": "表示绑定集群公网apiserver地址成功,解绑成功无响应体。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MasterEIPResponse" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MasterEIPRequest" + } + } + }, + "required": true } }, - "x-method" : "put", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UpdateAutopilotAddonInstance", - "x-url" : "{endpoint}/autopilot/v3/addons/{id}" - }, - "/ListAutopilotPreCheckTasks" : { - "get" : { - "tags" : [ "集群升级(Autopilot)" ], - "summary" : "获取集群升级前检查任务详情列表", - "description" : "获取集群升级前检查任务详情列表", - "operationId" : "ListAutopilotPreCheckTasks", - "responses" : { - "200" : { - "description" : "表示获取集群升级前检查任务详情列表成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PrecheckClusterTaskListResponseBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListAutopilotPreCheckTasks", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/precheck/tasks" - }, - "/ShowImageCache" : { - "get" : { - "tags" : [ "镜像缓存管理" ], - "summary" : "查询镜像缓存详情", - "description" : "查询镜像缓存详情", - "operationId" : "ShowImageCache", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetImageCacheResponseBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/ShowImageCacheParam_header_content_type" - }, { - "$ref" : "#/components/parameters/ShowImageCacheParam_header_x_auth_token" - }, { - "name" : "image_cache_id", - "in" : "path", - "description" : "**参数解释:**", - "required" : true, - "schema" : { - "description" : "**参数解释:**", - "type" : "string", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - } - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowImageCache", - "x-url" : "{endpoint}/v5/imagecaches/{image_cache_id}" - }, - "/DeleteRelease" : { - "delete" : { - "tags" : [ "模板管理" ], - "summary" : "删除指定模板实例", - "description" : "删除指定模板实例", - "operationId" : "DeleteRelease", - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "type" : "string" + "x-method": "put", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UpdateAutopilotClusterEip", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/mastereip" + }, + "/ShowClusterConfigurationDetails": { + "get": { + "tags": [ + "配置管理" + ], + "summary": "查询指定集群支持配置的参数列表", + "description": "该API用于查询CCE服务下指定集群支持配置的参数列表。", + "operationId": "ShowClusterConfigurationDetails", + "responses": { + "200": { + "description": "表示获取指定集群配置参数列表成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterConfigDetailRespBody" } } } } - } - }, - "x-method" : "delete", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "DeleteRelease", - "x-url" : "{endpoint}/cce/cam/v3/clusters/{cluster_id}/namespace/{namespace}/releases/{name}" - }, - "/RollbackAutopilotAddonInstance" : { - "post" : { - "tags" : [ "插件管理(Autopilot)" ], - "summary" : "回滚AddonInstance", - "description" : "将插件实例回滚到升级前的版本。只有在当前插件实例版本支持回滚到升级前的版本(status.isRollbackable为true),且插件实例状态为running(运行中)、available(可用)、abnormal(不可用)、upgradeFailed(升级失败)、rollbackFailed(回滚失败)时支持回滚。", - "operationId" : "RollbackAutopilotAddonInstance", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "插件实例回滚成功", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AddonInstance" - } - } - } - } - }, - "parameters" : [ { - "name" : "id", - "in" : "path", - "description" : "插件实例ID", - "required" : true, - "schema" : { - "description" : "插件实例ID", - "type" : "string", - "maxLength" : 255, - "minLength" : 1 - } - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AddonInstanceRollbackRequest" - } - } - }, - "required" : true - } - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "RollbackAutopilotAddonInstance", - "x-url" : "{endpoint}/autopilot/v3/addons/{id}/operation/rollback" - }, - "/ListNodes" : { - "get" : { - "tags" : [ "节点管理" ], - "summary" : "获取集群下所有节点", - "description" : "该API用于通过集群ID获取指定集群下所有节点的详细信息。", - "operationId" : "ListNodes", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示获取集群下的节点列表成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NodeList" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListNodes", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes" - }, - "/ShowNode" : { - "get" : { - "tags" : [ "节点管理" ], - "summary" : "获取指定的节点", - "description" : "该API用于通过节点ID获取指定节点的详细信息。", - "operationId" : "ShowNode", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示获取集群下指定的节点成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Node" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_path_nodeid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowNode", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/{node_id}" - }, - "/BatchCreateClusterTags" : { - "post" : { - "tags" : [ "标签管理" ], - "summary" : "批量添加指定集群的资源标签", - "description" : "该API用于批量添加指定集群的资源标签。", - "operationId" : "BatchCreateClusterTags", - "responses" : { - "204" : { - "description" : "No Content" - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BatchCreateClusterTagsRequestBody" - } - } - }, - "required" : true - } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "BatchCreateClusterTags", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/tags/create" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowClusterConfigurationDetails", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/configuration/detail" }, - "/CreateAutopilotCluster" : { - "post" : { - "tags" : [ "集群管理(Autopilot)" ], - "summary" : "创建集群", - "description" : "该API用于创建一个空集群(即只有控制节点Master,没有工作节点Node)。", - "operationId" : "CreateAutopilotCluster", - "deprecated" : false, - "responses" : { - "201" : { - "description" : "表示创建集群作业下发成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AutopilotCluster" + "/ShowAutopilotClusterUpgradeInfo": { + "get": { + "tags": [ + "集群升级(Autopilot)" + ], + "summary": "获取集群升级相关信息", + "description": "获取集群升级相关信息", + "operationId": "ShowAutopilotClusterUpgradeInfo", + "responses": { + "200": { + "description": "表示获取集群升级相关信息成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeInfoResponseBody" } } } } }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AutopilotCluster" - } - } + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "required" : true - } - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "CreateAutopilotCluster", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters" - }, - "/ListAutopilotAddonTemplates" : { - "get" : { - "tags" : [ "插件管理(Autopilot)" ], - "summary" : "查询AddonTemplates列表", - "description" : "插件模板查询接口,查询插件信息。", - "operationId" : "ListAutopilotAddonTemplates", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AddonTemplates" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "name" : "addon_template_name", - "in" : "query", - "description" : "指定的插件名称或插件别名,不填写则查询列表。", - "required" : false, - "schema" : { - "description" : "指定的插件名称或插件别名,不填写则查询列表。", - "type" : "string", - "maxLength" : 30, - "minLength" : 2, - "pattern" : "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])+$" - } - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListAutopilotAddonTemplates", - "x-url" : "{endpoint}/autopilot/v3/addontemplates" - }, - "/ShowAutopilotMaintenanceWindow" : { - "get" : { - "tags" : [ "集群升级(Autopilot)" ], - "summary" : "获取集群维护窗口", - "description" : "该API用于获取集群维护窗口。", - "operationId" : "ShowAutopilotMaintenanceWindow", - "responses" : { - "200" : { - "description" : "获取集群维护窗口成功", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/MaintenanceWindow" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowAutopilotMaintenanceWindow", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/maintenancewindows" - }, - "/SyncNode" : { - "get" : { - "tags" : [ "节点管理" ], - "summary" : "同步节点", - "description" : "该API用于同步节点。", - "operationId" : "SyncNode", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示同步节点成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncNodeResp" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_path_nodeid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "SyncNode", - "x-url" : "{endpoint}/api/v2/projects/{project_id}/clusters/{cluster_id}/nodes/{node_id}/sync" - }, - "/CreatePostCheck" : { - "post" : { - "tags" : [ "集群升级" ], - "summary" : "集群升级后确认", - "description" : "集群升级后确认,该接口建议配合Console使用,主要用于升级步骤完成后,客户确认集群状态和业务正常后做反馈。", - "operationId" : "CreatePostCheck", - "responses" : { - "200" : { - "description" : "集群升级后确认成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PostcheckClusterResponseBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PostcheckClusterRequestBody" - } - } - }, - "required" : true - } - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "CreatePostCheck", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/postcheck" - }, - "/ListAutopilotClusterMasterSnapshotTasks" : { - "get" : { - "tags" : [ "集群升级(Autopilot)" ], - "summary" : "获取集群备份任务详情列表", - "description" : "获取集群备份任务详情列表", - "operationId" : "ListAutopilotClusterMasterSnapshotTasks", - "responses" : { - "200" : { - "description" : "表示获取集群备份任务详情列表成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SnapshotClusterTaskResponseBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListAutopilotClusterMasterSnapshotTasks", - "x-url" : "{endpoint}/autopilot/v3.1/projects/{project_id}/clusters/{cluster_id}/operation/snapshot/tasks" - }, - "/ShowNodePoolConfigurationDetails" : { - "get" : { - "tags" : [ "配置管理" ], - "summary" : "查询指定节点池支持配置的参数列表", - "description" : "该API用于查询CCE服务下指定节点池支持配置的参数列表。", - "operationId" : "ShowNodePoolConfigurationDetails", - "responses" : { - "200" : { - "description" : "表示获取指定节点池配置参数列表成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ShowNodePoolConfigurationDetailsRespBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_path_nodepool_id" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowNodePoolConfigurationDetails", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools/{nodepool_id}/configuration/detail" - }, - "/UpdateCluster" : { - "put" : { - "tags" : [ "集群管理" ], - "summary" : "更新指定的集群", - "description" : "该API用于更新指定的集群。", - "operationId" : "UpdateCluster", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示更新指定集群成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Cluster" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ClusterInformation" - } - } - }, - "required" : true - } + { + "$ref": "#/components/parameters/param_path_clusterid" + } + ] }, - "x-method" : "put", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UpdateCluster", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowAutopilotClusterUpgradeInfo", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/upgradeinfo" }, - "/ShowClusterUpgradeInfo" : { - "get" : { - "tags" : [ "集群升级" ], - "summary" : "获取集群升级相关信息", - "description" : "获取集群升级相关信息", - "operationId" : "ShowClusterUpgradeInfo", - "responses" : { - "200" : { - "description" : "表示获取集群升级相关信息成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradeInfoResponseBody" + "/ListAutopilotUpgradeWorkFlows": { + "get": { + "tags": [ + "集群升级(Autopilot)" + ], + "summary": "获取UpgradeWorkFlows列表", + "description": "获取历史集群升级引导任务列表", + "operationId": "ListAutopilotUpgradeWorkFlows", + "responses": { + "200": { + "description": "获取历史集群升级引导任务列表成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeWorkFlowList" } } } } }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - } ] + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowClusterUpgradeInfo", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/upgradeinfo" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListAutopilotUpgradeWorkFlows", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgradeworkflows" }, - "/CreateAutopilotPreCheck" : { - "post" : { - "tags" : [ "集群升级(Autopilot)" ], - "summary" : "集群升级前检查", - "description" : "集群升级前检查", - "operationId" : "CreateAutopilotPreCheck", - "responses" : { - "200" : { - "description" : "执行集群升级前检查成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PrecheckClusterResponseBody" + "/DeleteImageCache": { + "delete": { + "tags": [ + "镜像缓存管理" + ], + "summary": "删除镜像缓存", + "description": "删除镜像缓存", + "operationId": "DeleteImageCache", + "deprecated": false, + "responses": { + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteImageCacheResponseBody" } } } + }, + "204": { + "description": "NO Content", + "content": { + "application/json": { + "schema": {} + } + } } }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PrecheckClusterRequestBody" + "parameters": [ + { + "$ref": "#/components/parameters/DeleteImageCacheParam_header_content_type" + }, + { + "$ref": "#/components/parameters/DeleteImageCacheParam_header_x_auth_token" + }, + { + "name": "image_cache_id", + "in": "path", + "description": "**参数解释:**", + "required": true, + "schema": { + "description": "**参数解释:**", + "type": "string", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + } + } + ] + }, + "x-method": "delete", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "DeleteImageCache", + "x-url": "{endpoint}/v5/imagecaches/{image_cache_id}" + }, + "/ShowAutopilotCluster": { + "get": { + "tags": [ + "集群管理(Autopilot)" + ], + "summary": "获取指定的集群", + "description": "该API用于获取指定集群的详细信息。", + "operationId": "ShowAutopilotCluster", + "deprecated": false, + "responses": { + "200": { + "description": "表示获取指定集群成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutopilotShowCluster" + } } } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "required" : true - } - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "CreateAutopilotPreCheck", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/precheck" - }, - "/BatchCreateAutopilotClusterTags" : { - "post" : { - "tags" : [ "标签管理(Autopilot)" ], - "summary" : "批量添加指定集群的资源标签", - "description" : "该API用于批量添加指定集群的资源标签。", - "operationId" : "BatchCreateAutopilotClusterTags", - "responses" : { - "204" : { - "description" : "No Content" - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BatchCreateClusterTagsRequestBody" - } - } - }, - "required" : true - } - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "BatchCreateAutopilotClusterTags", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/tags/create" - }, - "/RevokeKubernetesClusterCert" : { - "post" : { - "tags" : [ "集群管理" ], - "summary" : "吊销用户的集群证书", - "description" : "该API用于吊销指定集群的用户证书", - "operationId" : "RevokeKubernetesClusterCert", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "吊销用户集群证书成功" - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CertRevokeConfigRequestBody" - } - } - }, - "required" : true - } + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + }, + { + "name": "detail", + "in": "query", + "description": "查询集群详细信息。", + "required": false, + "schema": { + "description": "查询集群详细信息。", + "type": "string" + } + } + ] }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "RevokeKubernetesClusterCert", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/clustercertrevoke" - }, - "/ShowJob" : { - "get" : { - "tags" : [ "集群管理" ], - "summary" : "获取任务信息", - "description" : "该API用于获取任务信息。通过某一任务请求下发后返回的jobID来查询指定任务的进度。", - "operationId" : "ShowJob", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示获取任务信息成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Job" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_jobid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowJob", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/jobs/{job_id}" - }, - "/ListAutopilotClusterUpgradePaths" : { - "get" : { - "tags" : [ "集群升级(Autopilot)" ], - "summary" : "获取集群升级路径", - "description" : "获取集群升级路径", - "operationId" : "ListAutopilotClusterUpgradePaths", - "responses" : { - "200" : { - "description" : "表示获取集群升级路径信息成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ClusterUpgradePathsResponseBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListAutopilotClusterUpgradePaths", - "x-url" : "{endpoint}/autopilot/v3/clusterupgradepaths" - }, - "/ListAutopilotUpgradeClusterTasks" : { - "get" : { - "tags" : [ "集群升级(Autopilot)" ], - "summary" : "获取集群升级任务详情列表", - "description" : "获取集群升级任务详情列表", - "operationId" : "ListAutopilotUpgradeClusterTasks", - "responses" : { - "200" : { - "description" : "表示获取集群升级任务详情列表成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradeTaskListResponseBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListAutopilotUpgradeClusterTasks", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgrade/tasks" - }, - "/ShowReleaseHistory" : { - "get" : { - "tags" : [ "模板管理" ], - "summary" : "查询指定模板实例历史记录", - "description" : "查询指定模板实例历史记录", - "operationId" : "ShowReleaseHistory", - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ReleaseResp" - } + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowAutopilotCluster", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}" + }, + "/ShowUserChartsQuotas": { + "get": { + "tags": [ + "模板管理" + ], + "summary": "获取用户模板配额", + "description": "获取用户模板配额", + "operationId": "ShowUserChartsQuotas", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuotaResp" } } } } - } - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowReleaseHistory", - "x-url" : "{endpoint}/cce/cam/v3/clusters/{cluster_id}/namespace/{namespace}/releases/{name}/history" - }, - "/CreateCloudPersistentVolumeClaims" : { - "post" : { - "tags" : [ "存储管理" ], - "summary" : "创建PVC(待废弃)", - "description" : "该API用于在指定的Namespace下通过云存储服务中的云存储(EVS、SFS、OBS)去创建PVC(PersistentVolumeClaim)。该API待废弃,请使用Kubernetes PVC相关接口。", - "operationId" : "CreateCloudPersistentVolumeClaims", - "deprecated" : false, - "responses" : { - "201" : { - "description" : "创建PersistentVolumeClaim作业下发成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PersistentVolumeClaim" - } - } - } - } - }, - "parameters" : [ { - "name" : "namespace", - "in" : "path", - "description" : "指定PersistentVolumeClaim所在的命名空间。", - "required" : true, - "schema" : { - "description" : "指定PersistentVolumeClaim所在的命名空间。", - "type" : "string", - "maxLength" : 63, - "minLength" : 1, - "pattern" : "[a-z0-9]([-a-z0-9]*[a-z0-9])?" - } - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "$ref" : "#/components/parameters/param_header_x_cluster_id" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PersistentVolumeClaim" - } - } - }, - "required" : true - } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "CreateCloudPersistentVolumeClaims", - "x-url" : "{endpoint}/api/v1/namespaces/{namespace}/cloudpersistentvolumeclaims" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowUserChartsQuotas", + "x-url": "{endpoint}/v2/charts/{project_id}/quotas" }, - "/CreateUpgradeWorkFlow" : { - "post" : { - "tags" : [ "集群升级" ], - "summary" : "开启集群升级流程引导任务", - "description" : "该API用于创建一个集群升级流程引导任务。请在调用本接口完成引导任务创建之后,通过集群升级前检查开始检查任务。", - "operationId" : "CreateUpgradeWorkFlow", - "responses" : { - "201" : { - "description" : "表示在指定集群下创建升级流程成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradeWorkFlow" + "/UpdateAutopilotCluster": { + "put": { + "tags": [ + "集群管理(Autopilot)" + ], + "summary": "更新指定的集群", + "description": "该API用于更新指定的集群。", + "operationId": "UpdateAutopilotCluster", + "deprecated": false, + "responses": { + "200": { + "description": "表示更新指定集群成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutopilotCluster" } } } } }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CreateUpgradeWorkFlowRequestBody" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutopilotClusterInformation" } } }, - "required" : true + "required": true } }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "CreateUpgradeWorkFlow", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgradeworkflows" + "x-method": "put", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UpdateAutopilotCluster", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}" }, - "/ResetNode" : { - "post" : { - "tags" : [ "节点管理" ], - "summary" : "重置节点", - "description" : "该API用于在指定集群下重置节点。", - "operationId" : "ResetNode", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示在指定集群下重置节点的作业下发成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ReinstallJobResult" + "/MigrateNode": { + "put": { + "tags": [ + "节点管理" + ], + "summary": "节点迁移", + "description": "该API用于在指定集群下迁移节点到另一集群。", + "operationId": "MigrateNode", + "deprecated": false, + "responses": { + "200": { + "description": "表示在指定集群下迁移节点至另一集群的作业下发成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MigrateNodesTask" } } } } }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ResetNodeList" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_path_target_cluster_id" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MigrateNodesTask" } } }, - "required" : true - } - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ResetNode", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/reset" - }, - "/ListClusterUpgradeFeatureGates" : { - "get" : { - "tags" : [ "集群升级" ], - "summary" : "获取集群升级特性开关配置", - "description" : "获取集群升级特性开关配置", - "operationId" : "ListClusterUpgradeFeatureGates", - "responses" : { - "200" : { - "description" : "表示获取集群升级路径信息成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ClusterUpgradeFeatureGatesResponseBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListClusterUpgradeFeatureGates", - "x-url" : "{endpoint}/api/v3/clusterupgradefeaturegates" - }, - "/ListAddonTemplates" : { - "get" : { - "tags" : [ "插件管理" ], - "summary" : "查询AddonTemplates列表", - "description" : "插件模板查询接口,查询插件信息。", - "operationId" : "ListAddonTemplates", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AddonTemplates" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "name" : "addon_template_name", - "in" : "query", - "description" : "指定的插件名称或插件别名,不填写则查询列表。", - "required" : false, - "schema" : { - "description" : "指定的插件名称或插件别名,不填写则查询列表。", - "type" : "string", - "maxLength" : 30, - "minLength" : 2, - "pattern" : "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])+$" - } - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListAddonTemplates", - "x-url" : "{endpoint}/api/v3/addontemplates" - }, - "/DeleteCloudPersistentVolumeClaims" : { - "delete" : { - "tags" : [ "存储管理" ], - "summary" : "删除PVC(待废弃)", - "description" : "该API用于删除指定Namespace下的PVC(PersistentVolumeClaim)对象,并可以选择保留后端的云存储。该API待废弃,请使用Kubernetes PVC相关接口。", - "operationId" : "DeleteCloudPersistentVolumeClaims", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "删除指定PersistentVolumeClaim作业下发成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PersistentVolumeClaim" - } - } - } - } - }, - "parameters" : [ { - "name" : "name", - "in" : "path", - "description" : "需要删除的PersistentVolumClaim的名称。", - "required" : true, - "schema" : { - "description" : "需要删除的PersistentVolumClaim的名称。", - "type" : "string" - } - }, { - "name" : "namespace", - "in" : "path", - "description" : "指定PersistentVolumeClaim所在的命名空间。", - "required" : true, - "schema" : { - "description" : "指定PersistentVolumeClaim所在的命名空间。", - "type" : "string" - } - }, { - "name" : "deleteVolume", - "in" : "query", - "description" : "删除PersistentVolumeClaim后是否保留后端关联的云存储。false表示不删除,true表示删除,默认为false。", - "schema" : { - "description" : "删除PersistentVolumeClaim后是否保留后端关联的云存储。false表示不删除,true表示删除,默认为false。", - "type" : "string" - } - }, { - "name" : "storageType", - "in" : "query", - "description" : "云存储的类型,和deleteVolume搭配使用。即deleteVolume和storageType必须同时配置。", - "schema" : { - "description" : "云存储的类型,和deleteVolume搭配使用。即deleteVolume和storageType必须同时配置。", - "type" : "string" - } - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "$ref" : "#/components/parameters/param_header_x_cluster_id" - } ] - }, - "x-method" : "delete", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "DeleteCloudPersistentVolumeClaims", - "x-url" : "{endpoint}/api/v1/namespaces/{namespace}/cloudpersistentvolumeclaims/{name}" - }, - "/CreateImageCache" : { - "post" : { - "tags" : [ "镜像缓存管理" ], - "summary" : "创建镜像缓存", - "description" : "创建镜像缓存。创建过程会在指定集群中启动临时Pod进行镜像缓存构建,创建镜像缓存后,可在负载创建时通过使用镜像缓存功能大幅减少下载容器镜像的耗时,实现容器的快速启动。单租户创建镜像缓存数量上限为50。", - "operationId" : "CreateImageCache", - "deprecated" : false, - "responses" : { - "201" : { - "description" : "Created", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CreateImageCacheResponseBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/CreateImageCacheParam_header_content_type" - }, { - "$ref" : "#/components/parameters/CreateImageCacheParam_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CreateImageCacheRequestBody" - } - } - }, - "required" : true + "required": true } }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "CreateImageCache", - "x-url" : "{endpoint}/v5/imagecaches" - }, - "/ShowAutopilotUserChartsQuotas" : { - "get" : { - "tags" : [ "模板管理(Autopilot)" ], - "summary" : "获取用户模板配额", - "description" : "获取用户模板配额", - "operationId" : "ShowAutopilotUserChartsQuotas", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/QuotaResp" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowAutopilotUserChartsQuotas", - "x-url" : "{endpoint}/autopilot/v2/charts/{project_id}/quotas" - }, - "/PauseUpgradeClusterTask" : { - "post" : { - "tags" : [ "集群升级" ], - "summary" : "暂停集群升级任务", - "description" : "暂停集群升级任务。", - "operationId" : "PauseUpgradeClusterTask", - "responses" : { - "200" : { - "description" : "表示暂停集群升级任务下发成功。" - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - } ] - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "PauseUpgradeClusterTask", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgrade/pause" - }, - "/ShowRelease" : { - "get" : { - "tags" : [ "模板管理" ], - "summary" : "获取指定模板实例", - "description" : "获取指定模板实例", - "operationId" : "ShowRelease", - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ReleaseResp" + "x-method": "put", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "MigrateNode", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/operation/migrateto/{target_cluster_id}" + }, + "/RollbackAddonInstance": { + "post": { + "tags": [ + "插件管理" + ], + "summary": "回滚AddonInstance", + "description": "将插件实例回滚到升级前的版本。只有在当前插件实例版本支持回滚到升级前的版本(status.isRollbackable为true),且插件实例状态为running(运行中)、available(可用)、abnormal(不可用)、upgradeFailed(升级失败)、rollbackFailed(回滚失败)时支持回滚。", + "operationId": "RollbackAddonInstance", + "deprecated": false, + "responses": { + "200": { + "description": "插件实例回滚成功", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddonInstance" } } } } - } - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowRelease", - "x-url" : "{endpoint}/cce/cam/v3/clusters/{cluster_id}/namespace/{namespace}/releases/{name}" - }, - "/DeleteChart" : { - "delete" : { - "tags" : [ "模板管理" ], - "summary" : "删除模板", - "description" : "删除模板", - "operationId" : "DeleteChart", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "type" : "string" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_chart_id" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "delete", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "DeleteChart", - "x-url" : "{endpoint}/v2/charts/{chart_id}" - }, - "/ShowClusterConfig" : { - "get" : { - "tags" : [ "集群管理" ], - "summary" : "查询集群日志配置信息", - "description" : "获取集群组件上报的LTS的配置信息", - "operationId" : "ShowClusterConfig", - "responses" : { - "200" : { - "description" : "集群日志配置信息", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ClusterLogConfig" - } - } - } - } - }, - "parameters" : [ { - "name" : "type", - "in" : "query", - "description" : "组件类型 , 合法取值为control,audit,system-addon。不填写则查询全部类型。", - "required" : false, - "schema" : { - "description" : "组件类型 , 合法取值为control,audit,system-addon。不填写则查询全部类型。", - "type" : "string", - "enum" : [ "control", "audit", "system-addon" ] - } - }, { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowClusterConfig", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/cluster/{cluster_id}/log-configs" - }, - "/ShowPreCheck" : { - "get" : { - "tags" : [ "集群升级" ], - "summary" : "获取集群升级前检查任务详情", - "description" : "获取集群升级前检查任务详情,任务ID由调用集群检查API后从响应体中uid字段获取。", - "operationId" : "ShowPreCheck", - "responses" : { - "200" : { - "description" : "表示获取集群升级前检查任务详情成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PrecheckClusterTaskResponseBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_path_taskid" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowPreCheck", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/precheck/tasks/{task_id}" - }, - "/CreateKubernetesClusterCert" : { - "post" : { - "tags" : [ "集群管理" ], - "summary" : "获取集群证书", - "description" : "该API用于获取指定集群的证书信息。", - "operationId" : "CreateKubernetesClusterCert", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示成功获取指定集群的证书。证书文件格式参见kubernetes v1.Config结构", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ClusterCertResponseBody" - } - } - }, - "headers" : { - "Port-ID" : { - "type" : "string", - "description" : "集群控制节点端口ID" + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "插件实例ID", + "required": true, + "schema": { + "description": "插件实例ID", + "type": "string", + "maxLength": 255, + "minLength": 1 + } + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddonInstanceRollbackRequest" } } + }, + "required": true + } + }, + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "RollbackAddonInstance", + "x-url": "{endpoint}/api/v3/addons/{id}/operation/rollback" + }, + "/ScaleNodePool": { + "post": { + "tags": [ + "节点池管理" + ], + "summary": "伸缩节点池", + "description": "该API用于伸缩指定的节点池", + "operationId": "ScaleNodePool", + "deprecated": false, + "responses": { + "202": { + "description": "表示节点池伸缩已经被接受,节点池将根据伸缩后的节点池期望节点数增加或者删除节点池中的节点" } }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CertDuration" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_path_nodepool_id" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScaleNodePoolRequestBody" } } }, - "required" : true + "required": true } }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "CreateKubernetesClusterCert", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/clustercert" + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ScaleNodePool", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools/{nodepool_id}/operation/scale" }, - "/ShowAutopilotUpgradeClusterTask" : { - "get" : { - "tags" : [ "集群升级(Autopilot)" ], - "summary" : "获取集群升级任务详情", - "description" : "获取集群升级任务详情,任务ID由调用集群升级API后从响应体中uid字段获取。", - "operationId" : "ShowAutopilotUpgradeClusterTask", - "responses" : { - "200" : { - "description" : "表示获取集群升级任务详情成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradeTaskResponseBody" + "/ShowAutopilotJob": { + "get": { + "tags": [ + "集群管理(Autopilot)" + ], + "summary": "获取任务信息", + "description": "该API用于获取任务信息。通过某一任务请求下发后返回的jobID来查询指定任务的进度。", + "operationId": "ShowAutopilotJob", + "deprecated": false, + "responses": { + "200": { + "description": "表示获取任务信息成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Job" } } } } }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_path_taskid" - } ] + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_jobid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowAutopilotUpgradeClusterTask", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgrade/tasks/{task_id}" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowAutopilotJob", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/jobs/{job_id}" }, - "/CreatePartition" : { - "post" : { - "tags" : [ "集群管理" ], - "summary" : "创建分区", - "description" : "创建分区", - "operationId" : "CreatePartition", - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Partition" + "/ListAutopilotCharts": { + "get": { + "tags": [ + "模板管理(Autopilot)" + ], + "summary": "获取模板列表", + "description": "获取模板列表", + "operationId": "ListAutopilotCharts", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChartRespList" } } } } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PartitionReqBody" - } - } + "parameters": [ + { + "$ref": "#/components/parameters/param_header_content_type" }, - "required" : true - } - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "CreatePartition", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/partitions" - }, - "/ShowAutopilotReleaseHistory" : { - "get" : { - "tags" : [ "模板管理(Autopilot)" ], - "summary" : "查询指定模板实例历史记录", - "description" : "查询指定模板实例历史记录", - "operationId" : "ShowAutopilotReleaseHistory", - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ReleaseResp" - } - } - } - } + { + "$ref": "#/components/parameters/param_header_x_auth_token" } - } - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowAutopilotReleaseHistory", - "x-url" : "{endpoint}/autopilot/cam/v3/clusters/{cluster_id}/namespace/{namespace}/releases/{name}/history" - }, - "/DeleteAutopilotChart" : { - "delete" : { - "tags" : [ "模板管理(Autopilot)" ], - "summary" : "删除模板", - "description" : "删除模板", - "operationId" : "DeleteAutopilotChart", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "type" : "string" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_chart_id" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "delete", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "DeleteAutopilotChart", - "x-url" : "{endpoint}/autopilot/v2/charts/{chart_id}" - }, - "/ShowUpgradeWorkFlow" : { - "get" : { - "tags" : [ "集群升级" ], - "summary" : "获取指定集群升级引导任务详情", - "description" : "该API用于通过升级引导任务ID获取任务的详细信息。", - "operationId" : "ShowUpgradeWorkFlow", - "responses" : { - "200" : { - "description" : "表示获取指定集群升级引导任务详情成功", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradeWorkFlow" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_path_upgradeworkflowid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowUpgradeWorkFlow", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgradeworkflows/{upgrade_workflow_id}" - }, - "/ShowNodePoolConfigurations" : { - "get" : { - "tags" : [ "配置管理" ], - "summary" : "查询指定节点池支持配置的参数内容", - "description" : "该API用于查询指定节点池支持配置的参数内容。", - "operationId" : "ShowNodePoolConfigurations", - "responses" : { - "200" : { - "description" : "表示获取指定节点池配置参数内容成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ClusterConfigRespBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_path_nodepool_id" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowNodePoolConfigurations", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools/{nodepool_id}/configuration" - }, - "/DeleteNode" : { - "delete" : { - "tags" : [ "节点管理" ], - "summary" : "删除节点", - "description" : "该API用于删除指定的节点。", - "operationId" : "DeleteNode", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示删除节点作业下发成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Node" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_path_nodeid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "name" : "nodepoolScaleDown", - "in" : "query", - "description" : "标明是否为nodepool下发的请求。若不为“NoScaleDown”将自动更新对应节点池的实例数", - "required" : false, - "schema" : { - "description" : "标明是否为nodepool下发的请求。若不为“NoScaleDown”将自动更新对应节点池的实例数", - "type" : "string", - "enum" : [ "NoScaleDown" ] - } - } ] - }, - "x-method" : "delete", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "DeleteNode", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/{node_id}" - }, - "/UpdatePartition" : { - "put" : { - "tags" : [ "集群管理" ], - "summary" : "更新分区", - "description" : "更新分区", - "operationId" : "UpdatePartition", - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Partition" - } - } - } - } - }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PartitionReqBody" - } - } - }, - "required" : true - } + ] }, - "x-method" : "put", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UpdatePartition", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/partitions/{partition_name}" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListAutopilotCharts", + "x-url": "{endpoint}/autopilot/v2/charts" }, - "/UpgradeCluster" : { - "post" : { - "tags" : [ "集群升级" ], - "summary" : "集群升级", - "description" : "集群升级。", - "operationId" : "UpgradeCluster", - "responses" : { - "200" : { - "description" : "表示集群升级任务下发成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradeClusterResponseBody" + "/UpgradeAutopilotCluster": { + "post": { + "tags": [ + "集群升级(Autopilot)" + ], + "summary": "集群升级", + "description": "集群升级。", + "operationId": "UpgradeAutopilotCluster", + "responses": { + "200": { + "description": "表示集群升级任务下发成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeClusterResponseBody" } } } } }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradeClusterRequestBody" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeClusterRequestBody" } } }, - "required" : true + "required": true } }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UpgradeCluster", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgrade" - }, - "/CreateAutopilotKubernetesClusterCert" : { - "post" : { - "tags" : [ "集群管理(Autopilot)" ], - "summary" : "获取集群证书", - "description" : "该API用于获取指定集群的证书信息。", - "operationId" : "CreateAutopilotKubernetesClusterCert", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示成功获取指定集群的证书。证书文件格式参见kubernetes v1.Config结构", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ClusterCertResponseBody" + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UpgradeAutopilotCluster", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgrade" + }, + "/UpdateNodePoolConfiguration": { + "put": { + "tags": [ + "配置管理" + ], + "summary": "修改指定节点池配置参数的值", + "description": "该API用于修改CCE服务下指定节点池配置参数的值。", + "operationId": "UpdateNodePoolConfiguration", + "responses": { + "200": { + "description": "表示更新指定节点池配置参数内容成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterConfigRespBody" } } - }, - "headers" : { - "Port-ID" : { - "type" : "string", - "description" : "集群控制节点端口ID" - } } } }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CertDuration" + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_path_nodepool_id" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateClusterConfigurationsBody" } } }, - "required" : true - } - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "CreateAutopilotKubernetesClusterCert", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/clustercert" - }, - "/RetryAutopilotUpgradeClusterTask" : { - "post" : { - "tags" : [ "集群升级(Autopilot)" ], - "summary" : "重试集群升级任务", - "description" : "重新执行失败的集群升级任务。", - "operationId" : "RetryAutopilotUpgradeClusterTask", - "responses" : { - "200" : { - "description" : "表示重试集群升级任务下发成功。" - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - } ] - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "RetryAutopilotUpgradeClusterTask", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgrade/retry" - }, - "/CreateAutopilotPostCheck" : { - "post" : { - "tags" : [ "集群升级(Autopilot)" ], - "summary" : "集群升级后确认", - "description" : "集群升级后确认,该接口建议配合Console使用,主要用于升级步骤完成后,客户确认集群状态和业务正常后做反馈。", - "operationId" : "CreateAutopilotPostCheck", - "responses" : { - "200" : { - "description" : "集群升级后确认成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PostcheckClusterResponseBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PostcheckClusterRequestBody" - } - } - }, - "required" : true - } - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "CreateAutopilotPostCheck", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/postcheck" - }, - "/ShowUpgradeClusterTask" : { - "get" : { - "tags" : [ "集群升级" ], - "summary" : "获取集群升级任务详情", - "description" : "获取集群升级任务详情,任务ID由调用集群升级API后从响应体中uid字段获取。", - "operationId" : "ShowUpgradeClusterTask", - "responses" : { - "200" : { - "description" : "表示获取集群升级任务详情成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradeTaskResponseBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_path_taskid" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowUpgradeClusterTask", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgrade/tasks/{task_id}" - }, - "/ShowQuotas" : { - "get" : { - "tags" : [ "配额管理" ], - "summary" : "查询CCE服务下的资源配额", - "description" : "该API用于查询CCE服务下的资源配额。", - "operationId" : "ShowQuotas", - "responses" : { - "200" : { - "description" : "表示获取资源配额成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DomainQuotaResponse" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowQuotas", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/quotas" - }, - "/UpdateClusterEip" : { - "put" : { - "tags" : [ "集群管理" ], - "summary" : "绑定、解绑集群公网apiserver地址", - "description" : "该API用于通过集群ID绑定、解绑集群公网apiserver地址", - "operationId" : "UpdateClusterEip", - "responses" : { - "200" : { - "description" : "表示绑定集群公网apiserver地址成功,解绑成功无响应体。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/MasterEIPResponse" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/MasterEIPRequest" - } - } - }, - "required" : true - } - }, - "x-method" : "put", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UpdateClusterEip", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/mastereip" - }, - "/DownloadChart" : { - "get" : { - "tags" : [ "模板管理" ], - "summary" : "下载模板", - "description" : "下载模板", - "operationId" : "DownloadChart", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "type" : "file" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_chart_id" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "DownloadChart", - "x-url" : "{endpoint}/v2/charts/{chart_id}/archive" - }, - "/ShowCluster" : { - "get" : { - "tags" : [ "集群管理" ], - "summary" : "获取指定的集群", - "description" : "该API用于获取指定集群的详细信息。", - "operationId" : "ShowCluster", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示获取指定集群成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ShowCluster" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "name" : "detail", - "in" : "query", - "description" : "查询集群详细信息。", - "required" : false, - "schema" : { - "description" : "查询集群详细信息。", - "type" : "string" - } - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowCluster", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}" - }, - "/CreateAutopilotMaintenanceWindow" : { - "post" : { - "tags" : [ "集群升级(Autopilot)" ], - "summary" : "创建集群维护窗口", - "description" : "该API用于创建集群维护窗口。", - "operationId" : "CreateAutopilotMaintenanceWindow", - "responses" : { - "201" : { - "description" : "创建集群维护窗口成功", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/MaintenanceWindow" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/MaintenanceWindow" - } - } - }, - "required" : true + "required": true } }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "CreateAutopilotMaintenanceWindow", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/maintenancewindows" + "x-method": "put", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UpdateNodePoolConfiguration", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools/{nodepool_id}/configuration" }, - "/ShowPartition" : { - "get" : { - "tags" : [ "集群管理" ], - "summary" : "获取分区详情", - "description" : "获取分区详情", - "operationId" : "ShowPartition", - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Partition" + "/ShowAutopilotChart": { + "get": { + "tags": [ + "模板管理(Autopilot)" + ], + "summary": "获取模板", + "description": "获取模板", + "operationId": "ShowAutopilotChart", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChartResp" } } } } - } - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowPartition", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/partitions/{partition_name}" - }, - "/ListNodePools" : { - "get" : { - "tags" : [ "节点池管理" ], - "summary" : "获取集群下所有节点池", - "description" : "该API用于获取集群下所有节点池。", - "operationId" : "ListNodePools", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示获取集群下所有节点池成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NodePools" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "name" : "showDefaultNodePool", - "in" : "query", - "description" : "是否展示默认节点池。默认不展示,指定为“true”时展示默认节点池。", - "required" : false, - "schema" : { - "description" : "是否展示默认节点池。默认不展示,指定为“true”时展示默认节点池。", - "type" : "string" - } - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListNodePools", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools" - }, - "/ShowAutopilotChartValues" : { - "get" : { - "tags" : [ "模板管理(Autopilot)" ], - "summary" : "获取模板Values", - "description" : "获取模板Values", - "operationId" : "ShowAutopilotChartValues", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ChartValue" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_chart_id" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowAutopilotChartValues", - "x-url" : "{endpoint}/autopilot/v2/charts/{chart_id}/values" - }, - "/ListClusterMasterSnapshotTasks" : { - "get" : { - "tags" : [ "集群升级" ], - "summary" : "获取集群备份任务详情列表", - "description" : "获取集群备份任务详情列表", - "operationId" : "ListClusterMasterSnapshotTasks", - "responses" : { - "200" : { - "description" : "表示获取集群备份任务详情列表成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SnapshotClusterTaskResponseBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListClusterMasterSnapshotTasks", - "x-url" : "{endpoint}/api/v3.1/projects/{project_id}/clusters/{cluster_id}/operation/snapshot/tasks" - }, - "/AddNode" : { - "post" : { - "tags" : [ "节点管理" ], - "summary" : "纳管节点", - "description" : "该API用于在指定集群下纳管节点。", - "operationId" : "AddNode", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示在指定集群下纳管节点的作业下发成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ReinstallJobResult" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AddNodeList" - } - } - }, - "required" : true - } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_chart_id" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "AddNode", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/add" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowAutopilotChart", + "x-url": "{endpoint}/autopilot/v2/charts/{chart_id}" }, - "/UpdateAutopilotRelease" : { - "put" : { - "tags" : [ "模板管理(Autopilot)" ], - "summary" : "更新指定模板实例", - "description" : "更新指定模板实例", - "operationId" : "UpdateAutopilotRelease", - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ReleaseResp" + "/ListPreCheckTasks": { + "get": { + "tags": [ + "集群升级" + ], + "summary": "获取集群升级前检查任务详情列表", + "description": "获取集群升级前检查任务详情列表", + "operationId": "ListPreCheckTasks", + "responses": { + "200": { + "description": "表示获取集群升级前检查任务详情列表成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrecheckClusterTaskListResponseBody" } } } } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateReleaseReqBody" - } - } + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "required" : true - } - }, - "x-method" : "put", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UpdateAutopilotRelease", - "x-url" : "{endpoint}/autopilot/cam/v3/clusters/{cluster_id}/namespace/{namespace}/releases/{name}" - }, - "/ListAddonInstances" : { - "get" : { - "tags" : [ "插件管理" ], - "summary" : "获取AddonInstance列表", - "description" : "获取集群所有已安装插件实例", - "operationId" : "ListAddonInstances", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "ok", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AddonInstances" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "name" : "cluster_id", - "in" : "query", - "description" : "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", - "required" : true, - "schema" : { - "description" : "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", - "type" : "string", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - } - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListAddonInstances", - "x-url" : "{endpoint}/api/v3/addons" - }, - "/UploadChart" : { - "post" : { - "tags" : [ "模板管理" ], - "summary" : "上传模板", - "description" : "上传模板", - "operationId" : "UploadChart", - "deprecated" : false, - "responses" : { - "201" : { - "description" : "Created", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ChartResp" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "name" : "parameters", - "in" : "formData", - "description" : "上传模板的配置参数,示例如下:\"{\\\"override\\\":true,\\\"skip_lint\\\":true,\\\"source\\\":\\\"package\\\"}\"", - "required" : false, - "schema" : { - "description" : "上传模板的配置参数,示例如下:\"{\\\"override\\\":true,\\\"skip_lint\\\":true,\\\"source\\\":\\\"package\\\"}\"", - "type" : "string" - } - }, { - "name" : "content", - "in" : "formData", - "description" : "模板包文件", - "required" : true, - "schema" : { - "description" : "模板包文件", - "type" : "file" - } - } ] - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UploadChart", - "x-url" : "{endpoint}/v2/charts" - }, - "/ShowClusterEndpoints" : { - "get" : { - "tags" : [ "集群管理" ], - "summary" : "获取集群访问的地址", - "description" : "该API用于通过集群ID获取集群访问的地址,包括PrivateIP(HA集群返回VIP)与PublicIP", - "operationId" : "ShowClusterEndpoints", - "responses" : { - "200" : { - "description" : "表示获取集群访问的地址成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OpenAPIResponse" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowClusterEndpoints", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/openapi" - }, - "/CreateAutopilotClusterMasterSnapshot" : { - "post" : { - "tags" : [ "集群升级(Autopilot)" ], - "summary" : "集群备份", - "description" : "集群备份", - "operationId" : "CreateAutopilotClusterMasterSnapshot", - "responses" : { - "200" : { - "description" : "表示创建集群备份任务成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SnapshotClusterResponseBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - } ] - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "CreateAutopilotClusterMasterSnapshot", - "x-url" : "{endpoint}/autopilot/v3.1/projects/{project_id}/clusters/{cluster_id}/operation/snapshot" - }, - "/BatchSyncNodes" : { - "post" : { - "tags" : [ "节点管理" ], - "summary" : "批量同步节点", - "description" : "该API用于批量同步节点。", - "operationId" : "BatchSyncNodes", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示批量同步节点成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncNodesResp" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "BatchSyncNodes", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/sync" - }, - "/ListAutopilotUpgradePlans" : { - "get" : { - "tags" : [ "集群升级(Autopilot)" ], - "summary" : "获取自动升级计划", - "description" : "该API用于获取集群自动升级计划。", - "operationId" : "ListAutopilotUpgradePlans", - "responses" : { - "200" : { - "description" : "获取指定集群下自动升级计划成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradePlanResponseBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListAutopilotUpgradePlans", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/upgradeplans" - }, - "/UpdateClusterLogConfig" : { - "put" : { - "tags" : [ "集群管理" ], - "summary" : "配置集群日志", - "description" : "用户可以选择集群管理节点上哪些组件的日志上报LTS", - "operationId" : "UpdateClusterLogConfig", - "responses" : { - "200" : { - "description" : "表示集群日志配置成功", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ClusterLogConfig" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ClusterLogConfig" - } - } - }, - "required" : true - } + { + "$ref": "#/components/parameters/param_path_clusterid" + } + ] }, - "x-method" : "put", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UpdateClusterLogConfig", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/cluster/{cluster_id}/log-configs" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListPreCheckTasks", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/precheck/tasks" }, - "/ResizeCluster" : { - "post" : { - "tags" : [ "集群管理" ], - "summary" : "变更集群规格", - "description" : "该API用于变更一个指定集群的规格。", - "operationId" : "ResizeCluster", - "deprecated" : false, - "responses" : { - "201" : { - "description" : "表示按需集群规格变更作业下发成功", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ResizeClusterResponseBody" + "/UpdateRelease": { + "put": { + "tags": [ + "模板管理" + ], + "summary": "更新指定模板实例", + "description": "更新指定模板实例", + "operationId": "UpdateRelease", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReleaseResp" } } } } }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ResizeClusterRequestBody" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateReleaseReqBody" } } }, - "required" : true + "required": true } }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ResizeCluster", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/resize" + "x-method": "put", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "UpdateRelease", + "x-url": "{endpoint}/cce/cam/v3/clusters/{cluster_id}/namespace/{namespace}/releases/{name}" }, - "/CreatePreCheck" : { - "post" : { - "tags" : [ "集群升级" ], - "summary" : "集群升级前检查", - "description" : "集群升级前检查", - "operationId" : "CreatePreCheck", - "responses" : { - "200" : { - "description" : "执行集群升级前检查成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PrecheckClusterResponseBody" + "/DeleteAutopilotMaintenanceWindow": { + "delete": { + "tags": [ + "集群升级(Autopilot)" + ], + "summary": "删除集群维护窗口", + "description": "该API用于删除集群维护窗口。", + "operationId": "DeleteAutopilotMaintenanceWindow", + "responses": { + "200": { + "description": "删除集群维护窗口成功", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MaintenanceWindow" } } } } }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PrecheckClusterRequestBody" - } - } + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "required" : true - } - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "CreatePreCheck", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/precheck" - }, - "/UpgradeAutopilotWorkFlowUpdate" : { - "patch" : { - "tags" : [ "集群升级(Autopilot)" ], - "summary" : "更新指定集群升级引导任务状态", - "description" : "该API用于更新指定集群升级引导任务状态,当前仅适用于取消升级流程", - "operationId" : "UpgradeAutopilotWorkFlowUpdate", - "responses" : { - "200" : { - "description" : "表示更新集群升级引导任务状态成功", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradeWorkFlow" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_path_upgradeworkflowid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradeWorkFlowUpdateRequestBody" - } - } - }, - "required" : true - } - }, - "x-method" : "patch", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UpgradeAutopilotWorkFlowUpdate", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgradeworkflows/{upgrade_workflow_id}" - }, - "/RetryUpgradeClusterTask" : { - "post" : { - "tags" : [ "集群升级" ], - "summary" : "重试集群升级任务", - "description" : "重新执行失败的集群升级任务。", - "operationId" : "RetryUpgradeClusterTask", - "responses" : { - "200" : { - "description" : "表示重试集群升级任务下发成功。" - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - } ] - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "RetryUpgradeClusterTask", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgrade/retry" - }, - "/ShowAutopilotClusterEndpoints" : { - "get" : { - "tags" : [ "集群管理(Autopilot)" ], - "summary" : "获取集群访问的地址", - "description" : "该API用于通过集群ID获取集群访问的地址,包括PrivateIP(HA集群返回VIP)与PublicIP", - "operationId" : "ShowAutopilotClusterEndpoints", - "responses" : { - "200" : { - "description" : "表示获取集群访问的地址成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/OpenAPIResponse" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowAutopilotClusterEndpoints", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/openapi" - }, - "/DeleteAutopilotCluster" : { - "delete" : { - "tags" : [ "集群管理(Autopilot)" ], - "summary" : "删除集群", - "description" : "该API用于删除一个指定的集群。", - "operationId" : "DeleteAutopilotCluster", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示删除指定集群作业下发成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AutopilotCluster" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "name" : "delete_efs", - "in" : "query", - "description" : "是否删除SFS Turbo(极速文件存储卷),", - "required" : false, - "schema" : { - "example" : "delete_efs=true", - "description" : "是否删除SFS Turbo(极速文件存储卷),", - "type" : "string", - "default" : "false", - "enum" : [ "true", "block", "try", "false", "skip" ] - } - }, { - "name" : "delete_eni", - "in" : "query", - "description" : "是否删除eni ports(原生弹性网卡),", - "required" : false, - "schema" : { - "example" : "delete_eni=true", - "description" : "是否删除eni ports(原生弹性网卡),", - "type" : "string", - "default" : "block", - "enum" : [ "true", "block", "try", "false", "skip" ] - } - }, { - "name" : "delete_net", - "in" : "query", - "description" : "是否删除elb(弹性负载均衡)等集群Service/Ingress相关资源。", - "required" : false, - "schema" : { - "example" : "delete_net=true", - "description" : "是否删除elb(弹性负载均衡)等集群Service/Ingress相关资源。", - "type" : "string", - "default" : "block", - "enum" : [ "true", "block", "try", "false", "skip" ] - } - }, { - "name" : "delete_obs", - "in" : "query", - "description" : "是否删除obs(对象存储卷),", - "required" : false, - "schema" : { - "example" : "delete_obs=true", - "description" : "是否删除obs(对象存储卷),", - "type" : "string", - "default" : "false", - "enum" : [ "true", "block", "try", "false", "skip" ] - } - }, { - "name" : "delete_sfs30", - "in" : "query", - "description" : "是否删除sfs3.0(文件存储卷3.0),", - "required" : false, - "schema" : { - "example" : "delete_sfs30=true", - "description" : "是否删除sfs3.0(文件存储卷3.0),", - "type" : "string", - "default" : "false", - "enum" : [ "true", "block", "try", "false", "skip" ] - } - }, { - "name" : "lts_reclaim_policy", - "in" : "query", - "description" : "是否删除LTS资源(日志组/日志流)。", - "required" : false, - "schema" : { - "example" : "lts_reclaim_policy=Delete_Log_Group", - "description" : "是否删除LTS资源(日志组/日志流)。", - "type" : "string", - "default" : "Delete_Master_Log_Stream", - "enum" : [ "Delete_Log_Group", "Delete_Master_Log_Stream", "Retain" ] - } - } ] - }, - "x-method" : "delete", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "DeleteAutopilotCluster", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}" - }, - "/CreateCluster" : { - "post" : { - "tags" : [ "集群管理" ], - "summary" : "创建集群", - "description" : "该API用于创建一个空集群(即只有控制节点Master,没有工作节点Node)。请在调用本接口完成集群创建之后,通过[创建节点](cce_02_0242.xml)添加节点。", - "operationId" : "CreateCluster", - "deprecated" : false, - "responses" : { - "201" : { - "description" : "表示创建集群作业下发成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Cluster" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Cluster" - } - } - }, - "required" : true - } - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "CreateCluster", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters" - }, - "/ListClusterUpgradePaths" : { - "get" : { - "tags" : [ "集群升级" ], - "summary" : "获取集群升级路径", - "description" : "获取集群升级路径", - "operationId" : "ListClusterUpgradePaths", - "responses" : { - "200" : { - "description" : "表示获取集群升级路径信息成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ClusterUpgradePathsResponseBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListClusterUpgradePaths", - "x-url" : "{endpoint}/api/v3/clusterupgradepaths" - }, - "/DeleteAutopilotAddonInstance" : { - "delete" : { - "tags" : [ "插件管理(Autopilot)" ], - "summary" : "删除AddonInstance", - "description" : "删除插件实例的功能。", - "operationId" : "DeleteAutopilotAddonInstance", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "type" : "string" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "name" : "id", - "in" : "path", - "description" : "插件实例id", - "required" : true, - "schema" : { - "description" : "插件实例id", - "type" : "string", - "maxLength" : 255, - "minLength" : 1 - } - }, { - "name" : "cluster_id", - "in" : "query", - "description" : "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", - "required" : false, - "schema" : { - "description" : "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", - "type" : "string", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - } - } ] - }, - "x-method" : "delete", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "DeleteAutopilotAddonInstance", - "x-url" : "{endpoint}/autopilot/v3/addons/{id}" - }, - "/UnlockNodepoolNodeScaleDown" : { - "post" : { - "tags" : [ "节点管理" ], - "summary" : "节点关闭缩容保护。", - "description" : "该API用于节点关闭缩容保护,关闭缩容保护的节点可以通过修改节点池个数的方式被缩容,只允许按需节点关闭缩容保护。", - "operationId" : "UnlockNodepoolNodeScaleDown", - "responses" : { - "200" : { - "description" : "表示节点关闭缩容保护成功。" - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UnlockNodeScaledownRequestBody" - } - } - }, - "required" : true - } - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UnlockNodepoolNodeScaleDown", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/unlocknodescaledown" - }, - "/DeleteAddonInstance" : { - "delete" : { - "tags" : [ "插件管理" ], - "summary" : "删除AddonInstance", - "description" : "删除插件实例的功能。", - "operationId" : "DeleteAddonInstance", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "type" : "string" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "name" : "id", - "in" : "path", - "description" : "插件实例id", - "required" : true, - "schema" : { - "description" : "插件实例id", - "type" : "string", - "maxLength" : 255, - "minLength" : 1 - } - }, { - "name" : "cluster_id", - "in" : "query", - "description" : "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", - "required" : false, - "schema" : { - "description" : "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", - "type" : "string", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - } - } ] - }, - "x-method" : "delete", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "DeleteAddonInstance", - "x-url" : "{endpoint}/api/v3/addons/{id}" - }, - "/CreateAutopilotUpgradeWorkFlow" : { - "post" : { - "tags" : [ "集群升级(Autopilot)" ], - "summary" : "开启集群升级流程引导任务", - "description" : "该API用于创建一个集群升级流程引导任务。请在调用本接口完成引导任务创建之后,通过集群升级前检查开始检查任务。", - "operationId" : "CreateAutopilotUpgradeWorkFlow", - "responses" : { - "201" : { - "description" : "表示在指定集群下创建升级流程成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradeWorkFlow" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CreateUpgradeWorkFlowRequestBody" - } - } - }, - "required" : true - } - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "CreateAutopilotUpgradeWorkFlow", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgradeworkflows" - }, - "/ListAutopilotClusterUpgradeFeatureGates" : { - "get" : { - "tags" : [ "集群升级(Autopilot)" ], - "summary" : "获取集群升级特性开关配置", - "description" : "获取集群升级特性开关配置", - "operationId" : "ListAutopilotClusterUpgradeFeatureGates", - "responses" : { - "200" : { - "description" : "表示获取集群升级路径信息成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ClusterUpgradeFeatureGatesResponseBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListAutopilotClusterUpgradeFeatureGates", - "x-url" : "{endpoint}/autopilot/v3/clusterupgradefeaturegates" - }, - "/ShowAutopilotUpgradeWorkFlow" : { - "get" : { - "tags" : [ "集群升级(Autopilot)" ], - "summary" : "获取指定集群升级引导任务详情", - "description" : "该API用于通过升级引导任务ID获取任务的详细信息。", - "operationId" : "ShowAutopilotUpgradeWorkFlow", - "responses" : { - "200" : { - "description" : "表示获取指定集群升级引导任务详情成功", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradeWorkFlow" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_path_upgradeworkflowid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowAutopilotUpgradeWorkFlow", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgradeworkflows/{upgrade_workflow_id}" - }, - "/UpdateAutopilotUpgradePlan" : { - "put" : { - "tags" : [ "集群升级(Autopilot)" ], - "summary" : "延期自动升级计划", - "description" : "该API用于延期集群自动升级计划。", - "operationId" : "UpdateAutopilotUpgradePlan", - "responses" : { - "200" : { - "description" : "表示在指定集群下延期自动升级计划成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradePlan" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_path_upgrade_plan_id" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DelayUpgradePlanRequestBody" - } - } - }, - "required" : true - } + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] + }, + "x-method": "delete", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "DeleteAutopilotMaintenanceWindow", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/maintenancewindows" + }, + "/ListUpgradeWorkFlows": { + "get": { + "tags": [ + "集群升级" + ], + "summary": "获取UpgradeWorkFlows列表", + "description": "获取历史集群升级引导任务列表", + "operationId": "ListUpgradeWorkFlows", + "responses": { + "200": { + "description": "获取历史集群升级引导任务列表成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeWorkFlowList" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] + }, + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListUpgradeWorkFlows", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgradeworkflows" + }, + "/ListCharts": { + "get": { + "tags": [ + "模板管理" + ], + "summary": "获取模板列表", + "description": "获取模板列表", + "operationId": "ListCharts", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChartRespList" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] }, - "x-method" : "put", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UpdateAutopilotUpgradePlan", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/upgradeplans/{upgrade_plan_id}" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListCharts", + "x-url": "{endpoint}/v2/charts" }, - "/CreateAddonInstance" : { - "post" : { - "tags" : [ "插件管理" ], - "summary" : "创建AddonInstance", - "description" : "根据提供的插件模板,安装插件实例。", - "operationId" : "CreateAddonInstance", - "deprecated" : false, - "responses" : { - "201" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AddonInstance" + "/ListReleases": { + "get": { + "tags": [ + "模板管理" + ], + "summary": "获取模板实例列表", + "description": "获取模板实例列表", + "operationId": "ListReleases", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReleaseResp" + } } } } } }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InstanceRequest" - } + "parameters": [ + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "name": "chart_id", + "in": "query", + "description": "模板ID", + "schema": { + "description": "模板ID", + "type": "string" } }, - "required" : true - } + { + "name": "namespace", + "in": "query", + "description": "模板对应的命名空间", + "schema": { + "description": "模板对应的命名空间", + "type": "string" + } + } + ] }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "CreateAddonInstance", - "x-url" : "{endpoint}/api/v3/addons" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListReleases", + "x-url": "{endpoint}/cce/cam/v3/clusters/{cluster_id}/releases" }, - "/CreateAutopilotAddonInstance" : { - "post" : { - "tags" : [ "插件管理(Autopilot)" ], - "summary" : "创建AddonInstance", - "description" : "根据提供的插件模板,安装插件实例。", - "operationId" : "CreateAutopilotAddonInstance", - "deprecated" : false, - "responses" : { - "201" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AddonInstance" + "/ShowAutopilotQuotas": { + "get": { + "tags": [ + "配额管理(Autopilot)" + ], + "summary": "查询CCE服务下的资源配额", + "description": "该API用于查询CCE服务下的资源配额。", + "operationId": "ShowAutopilotQuotas", + "responses": { + "200": { + "description": "表示获取资源配额成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainQuotaResponse" } } } } }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/InstanceRequest" - } - } + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" }, - "required" : true - } - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "CreateAutopilotAddonInstance", - "x-url" : "{endpoint}/autopilot/v3/addons" - }, - "/UpdateNodePool" : { - "put" : { - "tags" : [ "节点池管理" ], - "summary" : "更新指定节点池", - "description" : "该API用于更新指定的节点池。仅支持集群在处于可用、扩容、缩容状态时调用。", - "operationId" : "UpdateNodePool", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示更新指定节点池成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateNodePoolResp" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_path_nodepool_id" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NodePoolUpdate" - } - } - }, - "required" : true - } - }, - "x-method" : "put", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UpdateNodePool", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools/{nodepool_id}" - }, - "/DeleteCluster" : { - "delete" : { - "tags" : [ "集群管理" ], - "summary" : "删除集群", - "description" : "该API用于删除一个指定的集群。", - "operationId" : "DeleteCluster", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示删除指定集群作业下发成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Cluster" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "name" : "delete_efs", - "in" : "query", - "description" : "是否删除SFS Turbo(极速文件存储卷),", - "required" : false, - "schema" : { - "example" : "delete_efs=true", - "description" : "是否删除SFS Turbo(极速文件存储卷),", - "type" : "string", - "default" : "false", - "enum" : [ "true", "block", "try", "false", "skip" ] - } - }, { - "name" : "delete_eni", - "in" : "query", - "description" : "是否删除eni ports(原生弹性网卡),", - "required" : false, - "schema" : { - "example" : "delete_eni=true", - "description" : "是否删除eni ports(原生弹性网卡),", - "type" : "string", - "default" : "block", - "enum" : [ "true", "block", "try", "false", "skip" ] - } - }, { - "name" : "delete_evs", - "in" : "query", - "description" : "是否删除evs(云硬盘),", - "required" : false, - "schema" : { - "example" : "delete_evs=true", - "description" : "是否删除evs(云硬盘),", - "type" : "string", - "default" : "false", - "enum" : [ "true", "block", "try", "false", "skip" ] - } - }, { - "name" : "delete_net", - "in" : "query", - "description" : "是否删除elb(弹性负载均衡)等集群Service/Ingress相关资源。", - "required" : false, - "schema" : { - "example" : "delete_net=true", - "description" : "是否删除elb(弹性负载均衡)等集群Service/Ingress相关资源。", - "type" : "string", - "default" : "block", - "enum" : [ "true", "block", "try", "false", "skip" ] - } - }, { - "name" : "delete_obs", - "in" : "query", - "description" : "是否删除obs(对象存储卷),", - "required" : false, - "schema" : { - "example" : "delete_obs=true", - "description" : "是否删除obs(对象存储卷),", - "type" : "string", - "default" : "false", - "enum" : [ "true", "block", "try", "false", "skip" ] - } - }, { - "name" : "delete_sfs", - "in" : "query", - "description" : "是否删除sfs(文件存储卷),", - "required" : false, - "schema" : { - "example" : "delete_sfs=true", - "description" : "是否删除sfs(文件存储卷),", - "type" : "string", - "default" : "false", - "enum" : [ "true", "block", "try", "false", "skip" ] - } - }, { - "name" : "delete_sfs30", - "in" : "query", - "description" : "是否删除sfs3.0(文件存储卷3.0),", - "required" : false, - "schema" : { - "example" : "delete_sfs30=true", - "description" : "是否删除sfs3.0(文件存储卷3.0),", - "type" : "string", - "default" : "false", - "enum" : [ "true", "block", "try", "false", "skip" ] - } - }, { - "name" : "lts_reclaim_policy", - "in" : "query", - "description" : "是否删除LTS LogStream(日志流),", - "required" : false, - "schema" : { - "example" : "lts_reclaim_policy=true", - "description" : "是否删除LTS LogStream(日志流),", - "type" : "string", - "default" : "false", - "enum" : [ "true", "block", "try", "false", "skip" ] - } - }, { - "name" : "tobedeleted", - "in" : "query", - "description" : "是否使用包周期集群删除参数预置模式(仅对包周期集群生效)。", - "required" : false, - "schema" : { - "example" : "tobedeleted=true", - "description" : "是否使用包周期集群删除参数预置模式(仅对包周期集群生效)。", - "type" : "string", - "enum" : [ "true" ] - } - }, { - "name" : "ondemand_node_policy", - "in" : "query", - "description" : "集群下所有按需节点处理策略,", - "required" : false, - "schema" : { - "example" : "ondemand_node_policy=delete", - "description" : "集群下所有按需节点处理策略,", - "type" : "string", - "enum" : [ "delete", "reset", "retain" ] - } - }, { - "name" : "periodic_node_policy", - "in" : "query", - "description" : "集群下所有包周期节点处理策略,", - "required" : false, - "schema" : { - "example" : "periodic_node_policy=reset", - "description" : "集群下所有包周期节点处理策略,", - "type" : "string", - "enum" : [ "reset", "retain" ] - } - } ] - }, - "x-method" : "delete", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "DeleteCluster", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}" - }, - "/UpdateAutopilotClusterEip" : { - "put" : { - "tags" : [ "集群管理(Autopilot)" ], - "summary" : "绑定、解绑集群公网apiserver地址", - "description" : "该API用于通过集群ID绑定、解绑集群公网apiserver地址", - "operationId" : "UpdateAutopilotClusterEip", - "responses" : { - "200" : { - "description" : "表示绑定集群公网apiserver地址成功,解绑成功无响应体。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/MasterEIPResponse" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/MasterEIPRequest" - } - } - }, - "required" : true - } - }, - "x-method" : "put", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UpdateAutopilotClusterEip", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/mastereip" - }, - "/ShowClusterConfigurationDetails" : { - "get" : { - "tags" : [ "配置管理" ], - "summary" : "查询指定集群支持配置的参数列表", - "description" : "该API用于查询CCE服务下指定集群支持配置的参数列表。", - "operationId" : "ShowClusterConfigurationDetails", - "responses" : { - "200" : { - "description" : "表示获取指定集群配置参数列表成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ClusterConfigDetailRespBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowClusterConfigurationDetails", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/configuration/detail" - }, - "/ShowAutopilotClusterUpgradeInfo" : { - "get" : { - "tags" : [ "集群升级(Autopilot)" ], - "summary" : "获取集群升级相关信息", - "description" : "获取集群升级相关信息", - "operationId" : "ShowAutopilotClusterUpgradeInfo", - "responses" : { - "200" : { - "description" : "表示获取集群升级相关信息成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradeInfoResponseBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowAutopilotClusterUpgradeInfo", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/upgradeinfo" - }, - "/ListAutopilotUpgradeWorkFlows" : { - "get" : { - "tags" : [ "集群升级(Autopilot)" ], - "summary" : "获取UpgradeWorkFlows列表", - "description" : "获取历史集群升级引导任务列表", - "operationId" : "ListAutopilotUpgradeWorkFlows", - "responses" : { - "200" : { - "description" : "获取历史集群升级引导任务列表成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradeWorkFlowList" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListAutopilotUpgradeWorkFlows", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgradeworkflows" - }, - "/DeleteImageCache" : { - "delete" : { - "tags" : [ "镜像缓存管理" ], - "summary" : "删除镜像缓存", - "description" : "删除镜像缓存", - "operationId" : "DeleteImageCache", - "deprecated" : false, - "responses" : { - "202" : { - "description" : "Accepted", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DeleteImageCacheResponseBody" - } - } - } - }, - "204" : { - "description" : "NO Content", - "content" : { - "application/json" : { - "schema" : { } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/DeleteImageCacheParam_header_content_type" - }, { - "$ref" : "#/components/parameters/DeleteImageCacheParam_header_x_auth_token" - }, { - "name" : "image_cache_id", - "in" : "path", - "description" : "**参数解释:**", - "required" : true, - "schema" : { - "description" : "**参数解释:**", - "type" : "string", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - } - } ] - }, - "x-method" : "delete", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "DeleteImageCache", - "x-url" : "{endpoint}/v5/imagecaches/{image_cache_id}" - }, - "/ShowAutopilotCluster" : { - "get" : { - "tags" : [ "集群管理(Autopilot)" ], - "summary" : "获取指定的集群", - "description" : "该API用于获取指定集群的详细信息。", - "operationId" : "ShowAutopilotCluster", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示获取指定集群成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AutopilotShowCluster" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "name" : "detail", - "in" : "query", - "description" : "查询集群详细信息。", - "required" : false, - "schema" : { - "description" : "查询集群详细信息。", - "type" : "string" - } - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowAutopilotCluster", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}" - }, - "/ShowUserChartsQuotas" : { - "get" : { - "tags" : [ "模板管理" ], - "summary" : "获取用户模板配额", - "description" : "获取用户模板配额", - "operationId" : "ShowUserChartsQuotas", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/QuotaResp" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowUserChartsQuotas", - "x-url" : "{endpoint}/v2/charts/{project_id}/quotas" - }, - "/UpdateAutopilotCluster" : { - "put" : { - "tags" : [ "集群管理(Autopilot)" ], - "summary" : "更新指定的集群", - "description" : "该API用于更新指定的集群。", - "operationId" : "UpdateAutopilotCluster", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示更新指定集群成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AutopilotCluster" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AutopilotClusterInformation" - } - } - }, - "required" : true - } - }, - "x-method" : "put", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UpdateAutopilotCluster", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}" - }, - "/MigrateNode" : { - "put" : { - "tags" : [ "节点管理" ], - "summary" : "节点迁移", - "description" : "该API用于在指定集群下迁移节点到另一集群。", - "operationId" : "MigrateNode", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示在指定集群下迁移节点至另一集群的作业下发成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/MigrateNodesTask" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_path_target_cluster_id" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/MigrateNodesTask" - } - } - }, - "required" : true - } - }, - "x-method" : "put", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "MigrateNode", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/operation/migrateto/{target_cluster_id}" - }, - "/RollbackAddonInstance" : { - "post" : { - "tags" : [ "插件管理" ], - "summary" : "回滚AddonInstance", - "description" : "将插件实例回滚到升级前的版本。只有在当前插件实例版本支持回滚到升级前的版本(status.isRollbackable为true),且插件实例状态为running(运行中)、available(可用)、abnormal(不可用)、upgradeFailed(升级失败)、rollbackFailed(回滚失败)时支持回滚。", - "operationId" : "RollbackAddonInstance", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "插件实例回滚成功", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AddonInstance" - } - } - } - } - }, - "parameters" : [ { - "name" : "id", - "in" : "path", - "description" : "插件实例ID", - "required" : true, - "schema" : { - "description" : "插件实例ID", - "type" : "string", - "maxLength" : 255, - "minLength" : 1 - } - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AddonInstanceRollbackRequest" - } - } - }, - "required" : true - } - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "RollbackAddonInstance", - "x-url" : "{endpoint}/api/v3/addons/{id}/operation/rollback" - }, - "/ScaleNodePool" : { - "post" : { - "tags" : [ "节点池管理" ], - "summary" : "伸缩节点池", - "description" : "该API用于伸缩指定的节点池", - "operationId" : "ScaleNodePool", - "deprecated" : false, - "responses" : { - "202" : { - "description" : "表示节点池伸缩已经被接受,节点池将根据伸缩后的节点池期望节点数增加或者删除节点池中的节点" - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_path_nodepool_id" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ScaleNodePoolRequestBody" - } - } - }, - "required" : true - } - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ScaleNodePool", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools/{nodepool_id}/operation/scale" - }, - "/ShowAutopilotJob" : { - "get" : { - "tags" : [ "集群管理(Autopilot)" ], - "summary" : "获取任务信息", - "description" : "该API用于获取任务信息。通过某一任务请求下发后返回的jobID来查询指定任务的进度。", - "operationId" : "ShowAutopilotJob", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "表示获取任务信息成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Job" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_jobid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowAutopilotJob", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/jobs/{job_id}" - }, - "/ListAutopilotCharts" : { - "get" : { - "tags" : [ "模板管理(Autopilot)" ], - "summary" : "获取模板列表", - "description" : "获取模板列表", - "operationId" : "ListAutopilotCharts", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ChartRespList" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListAutopilotCharts", - "x-url" : "{endpoint}/autopilot/v2/charts" - }, - "/UpgradeAutopilotCluster" : { - "post" : { - "tags" : [ "集群升级(Autopilot)" ], - "summary" : "集群升级", - "description" : "集群升级。", - "operationId" : "UpgradeAutopilotCluster", - "responses" : { - "200" : { - "description" : "表示集群升级任务下发成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradeClusterResponseBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradeClusterRequestBody" - } - } - }, - "required" : true - } - }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UpgradeAutopilotCluster", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgrade" - }, - "/UpdateNodePoolConfiguration" : { - "put" : { - "tags" : [ "配置管理" ], - "summary" : "修改指定节点池配置参数的值", - "description" : "该API用于修改CCE服务下指定节点池配置参数的值。", - "operationId" : "UpdateNodePoolConfiguration", - "responses" : { - "200" : { - "description" : "表示更新指定节点池配置参数内容成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ClusterConfigRespBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_path_nodepool_id" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateClusterConfigurationsBody" - } - } - }, - "required" : true - } + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ] }, - "x-method" : "put", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UpdateNodePoolConfiguration", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools/{nodepool_id}/configuration" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowAutopilotQuotas", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/quotas" }, - "/ShowAutopilotChart" : { - "get" : { - "tags" : [ "模板管理(Autopilot)" ], - "summary" : "获取模板", - "description" : "获取模板", - "operationId" : "ShowAutopilotChart", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ChartResp" + "/ShowAddonInstance": { + "get": { + "tags": [ + "插件管理" + ], + "summary": "获取AddonInstance详情", + "description": "获取插件实例详情。", + "operationId": "ShowAddonInstance", + "deprecated": false, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddonInstance" } } } } }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_chart_id" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] + "parameters": [ + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + }, + { + "name": "id", + "in": "path", + "description": "插件实例id", + "required": true, + "schema": { + "description": "插件实例id", + "type": "string", + "maxLength": 255, + "minLength": 1 + } + }, + { + "name": "cluster_id", + "in": "query", + "description": "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", + "required": false, + "schema": { + "description": "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", + "type": "string", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + } + } + ] }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowAutopilotChart", - "x-url" : "{endpoint}/autopilot/v2/charts/{chart_id}" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowAddonInstance", + "x-url": "{endpoint}/api/v3/addons/{id}" }, - "/ListPreCheckTasks" : { - "get" : { - "tags" : [ "集群升级" ], - "summary" : "获取集群升级前检查任务详情列表", - "description" : "获取集群升级前检查任务详情列表", - "operationId" : "ListPreCheckTasks", - "responses" : { - "200" : { - "description" : "表示获取集群升级前检查任务详情列表成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PrecheckClusterTaskListResponseBody" - } - } - } + "/BatchDeleteClusterTags": { + "post": { + "tags": [ + "标签管理" + ], + "summary": "批量删除指定集群的资源标签", + "description": "该API用于批量删除指定集群的资源标签。", + "operationId": "BatchDeleteClusterTags", + "responses": { + "204": { + "description": "No Content" } }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - } ] + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_header_content_type" + }, + { + "$ref": "#/components/parameters/param_header_x_auth_token" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDeleteClusterTagsRequestBody" + } + } + }, + "required": true + } }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListPreCheckTasks", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/precheck/tasks" + "x-method": "post", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "BatchDeleteClusterTags", + "x-url": "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/tags/delete" }, - "/UpdateRelease" : { - "put" : { - "tags" : [ "模板管理" ], - "summary" : "更新指定模板实例", - "description" : "更新指定模板实例", - "operationId" : "UpdateRelease", - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ReleaseResp" + "/ListAutopilotAddonInstances": { + "get": { + "tags": [ + "插件管理(Autopilot)" + ], + "summary": "获取AddonInstance列表", + "description": "获取集群所有已安装插件实例", + "operationId": "ListAutopilotAddonInstances", + "deprecated": false, + "responses": { + "200": { + "description": "ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddonInstances" } } } } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateReleaseReqBody" - } - } + "parameters": [ + { + "$ref": "#/components/parameters/param_header_content_type" }, - "required" : true - } + { + "$ref": "#/components/parameters/param_header_x_auth_token" + }, + { + "name": "cluster_id", + "in": "query", + "description": "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", + "required": true, + "schema": { + "description": "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", + "type": "string", + "pattern": "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" + } + } + ] }, - "x-method" : "put", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "UpdateRelease", - "x-url" : "{endpoint}/cce/cam/v3/clusters/{cluster_id}/namespace/{namespace}/releases/{name}" - }, - "/DeleteAutopilotMaintenanceWindow" : { - "delete" : { - "tags" : [ "集群升级(Autopilot)" ], - "summary" : "删除集群维护窗口", - "description" : "该API用于删除集群维护窗口。", - "operationId" : "DeleteAutopilotMaintenanceWindow", - "responses" : { - "200" : { - "description" : "删除集群维护窗口成功", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/MaintenanceWindow" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "delete", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "DeleteAutopilotMaintenanceWindow", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/maintenancewindows" - }, - "/ListUpgradeWorkFlows" : { - "get" : { - "tags" : [ "集群升级" ], - "summary" : "获取UpgradeWorkFlows列表", - "description" : "获取历史集群升级引导任务列表", - "operationId" : "ListUpgradeWorkFlows", - "responses" : { - "200" : { - "description" : "获取历史集群升级引导任务列表成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpgradeWorkFlowList" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListUpgradeWorkFlows", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgradeworkflows" - }, - "/ListCharts" : { - "get" : { - "tags" : [ "模板管理" ], - "summary" : "获取模板列表", - "description" : "获取模板列表", - "operationId" : "ListCharts", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ChartRespList" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListCharts", - "x-url" : "{endpoint}/v2/charts" - }, - "/ListReleases" : { - "get" : { - "tags" : [ "模板管理" ], - "summary" : "获取模板实例列表", - "description" : "获取模板实例列表", - "operationId" : "ListReleases", - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ReleaseResp" - } + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ListAutopilotAddonInstances", + "x-url": "{endpoint}/autopilot/v3/addons" + }, + "/ShowAutopilotPreCheck": { + "get": { + "tags": [ + "集群升级(Autopilot)" + ], + "summary": "获取集群升级前检查任务详情", + "description": "获取集群升级前检查任务详情,任务ID由调用集群检查API后从响应体中uid字段获取。", + "operationId": "ShowAutopilotPreCheck", + "responses": { + "200": { + "description": "表示获取集群升级前检查任务详情成功。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrecheckClusterTaskResponseBody" } } } } }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "name" : "chart_id", - "in" : "query", - "description" : "模板ID", - "schema" : { - "description" : "模板ID", - "type" : "string" - } - }, { - "name" : "namespace", - "in" : "query", - "description" : "模板对应的命名空间", - "schema" : { - "description" : "模板对应的命名空间", - "type" : "string" - } - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListReleases", - "x-url" : "{endpoint}/cce/cam/v3/clusters/{cluster_id}/releases" - }, - "/ShowAutopilotQuotas" : { - "get" : { - "tags" : [ "配额管理(Autopilot)" ], - "summary" : "查询CCE服务下的资源配额", - "description" : "该API用于查询CCE服务下的资源配额。", - "operationId" : "ShowAutopilotQuotas", - "responses" : { - "200" : { - "description" : "表示获取资源配额成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DomainQuotaResponse" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowAutopilotQuotas", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/quotas" - }, - "/ShowAddonInstance" : { - "get" : { - "tags" : [ "插件管理" ], - "summary" : "获取AddonInstance详情", - "description" : "获取插件实例详情。", - "operationId" : "ShowAddonInstance", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AddonInstance" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "name" : "id", - "in" : "path", - "description" : "插件实例id", - "required" : true, - "schema" : { - "description" : "插件实例id", - "type" : "string", - "maxLength" : 255, - "minLength" : 1 - } - }, { - "name" : "cluster_id", - "in" : "query", - "description" : "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", - "required" : false, - "schema" : { - "description" : "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", - "type" : "string", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - } - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowAddonInstance", - "x-url" : "{endpoint}/api/v3/addons/{id}" - }, - "/BatchDeleteClusterTags" : { - "post" : { - "tags" : [ "标签管理" ], - "summary" : "批量删除指定集群的资源标签", - "description" : "该API用于批量删除指定集群的资源标签。", - "operationId" : "BatchDeleteClusterTags", - "responses" : { - "204" : { - "description" : "No Content" - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BatchDeleteClusterTagsRequestBody" - } - } - }, - "required" : true - } + "parameters": [ + { + "$ref": "#/components/parameters/param_path_projectid" + }, + { + "$ref": "#/components/parameters/param_path_clusterid" + }, + { + "$ref": "#/components/parameters/param_path_taskid" + } + ] }, - "x-method" : "post", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "BatchDeleteClusterTags", - "x-url" : "{endpoint}/api/v3/projects/{project_id}/clusters/{cluster_id}/tags/delete" - }, - "/ListAutopilotAddonInstances" : { - "get" : { - "tags" : [ "插件管理(Autopilot)" ], - "summary" : "获取AddonInstance列表", - "description" : "获取集群所有已安装插件实例", - "operationId" : "ListAutopilotAddonInstances", - "deprecated" : false, - "responses" : { - "200" : { - "description" : "ok", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AddonInstances" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_header_content_type" - }, { - "$ref" : "#/components/parameters/param_header_x_auth_token" - }, { - "name" : "cluster_id", - "in" : "query", - "description" : "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", - "required" : true, - "schema" : { - "description" : "集群 ID,获取方式请参见[如何获取接口URI中参数](cce_02_0271.xml)", - "type" : "string", - "pattern" : "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$" - } - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ListAutopilotAddonInstances", - "x-url" : "{endpoint}/autopilot/v3/addons" - }, - "/ShowAutopilotPreCheck" : { - "get" : { - "tags" : [ "集群升级(Autopilot)" ], - "summary" : "获取集群升级前检查任务详情", - "description" : "获取集群升级前检查任务详情,任务ID由调用集群检查API后从响应体中uid字段获取。", - "operationId" : "ShowAutopilotPreCheck", - "responses" : { - "200" : { - "description" : "表示获取集群升级前检查任务详情成功。", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PrecheckClusterTaskResponseBody" - } - } - } - } - }, - "parameters" : [ { - "$ref" : "#/components/parameters/param_path_projectid" - }, { - "$ref" : "#/components/parameters/param_path_clusterid" - }, { - "$ref" : "#/components/parameters/param_path_taskid" - } ] - }, - "x-method" : "get", - "x-content-type" : "application/json;charset=UTF-8", - "x-operationId" : "ShowAutopilotPreCheck", - "x-url" : "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/precheck/tasks/{task_id}" + "x-method": "get", + "x-content-type": "application/json;charset=UTF-8", + "x-operationId": "ShowAutopilotPreCheck", + "x-url": "{endpoint}/autopilot/v3/projects/{project_id}/clusters/{cluster_id}/operation/precheck/tasks/{task_id}" } } } \ No newline at end of file diff --git a/huaweicloud_services_server/mcp_server_unified/src/mcp_server_unified/__init__.py b/huaweicloud_services_server/mcp_server_unified/src/mcp_server_unified/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/huaweicloud_services_server/mcp_server_unified/src/mcp_server_unified/__init__.py @@ -0,0 +1 @@ + diff --git a/huaweicloud_services_server/mcp_server_unified/src/mcp_server_unified/config/config.yaml b/huaweicloud_services_server/mcp_server_unified/src/mcp_server_unified/config/config.yaml new file mode 100644 index 0000000..891398c --- /dev/null +++ b/huaweicloud_services_server/mcp_server_unified/src/mcp_server_unified/config/config.yaml @@ -0,0 +1,3 @@ +service_code: unified +transport: stdio +port: 8888 diff --git a/huaweicloud_services_server/mcp_server_unified/src/mcp_server_unified/run.py b/huaweicloud_services_server/mcp_server_unified/src/mcp_server_unified/run.py new file mode 100644 index 0000000..ce0dda5 --- /dev/null +++ b/huaweicloud_services_server/mcp_server_unified/src/mcp_server_unified/run.py @@ -0,0 +1,29 @@ +import argparse +import asyncio +from pathlib import Path + +from assets.utils.unified_server import UnifiedMCPServer + + +def main(): + parser = argparse.ArgumentParser(description="Unified MCP Server (multi-service)") + parser.add_argument("-p", "--port", type=int, help="Port number") + parser.add_argument( + "-t", "--transport", type=str, choices=["http", "sse", "stdio"], + help="Transport of MCP Server", + ) + args = parser.parse_args() + + config_path = Path(__file__).parent / "config" / "config.yaml" + server = UnifiedMCPServer(config_path) + + if args.transport: + server.config.transport = args.transport + if args.port: + server.config.port = args.port + + asyncio.run(server.run_server()) + + +if __name__ == "__main__": + main() diff --git a/pyproject.toml b/pyproject.toml index 26c8b55..b3196dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -385,6 +385,7 @@ packages = [ [project.scripts] +mcp-server-unified = "huaweicloud_services_server.mcp_server_unified.src.mcp_server_unified.run:main" mcp-server-aad = "huaweicloud_services_server.mcp_server_aad.src.mcp_server_aad.run:main" mcp-server-aom = "huaweicloud_services_server.mcp_server_aom.src.mcp_server_aom.run:main" mcp-server-apig = "huaweicloud_services_server.mcp_server_apig.src.mcp_server_apig.run:main" From cf77e61368d973e1fd0da9164d507851c0950ab0 Mon Sep 17 00:00:00 2001 From: Claudio Ferreira Filho Date: Thu, 16 Apr 2026 11:04:40 -0300 Subject: [PATCH 6/7] feat: add HUAWEI_TOOLS_MODE (readonly/full) to filter tools - readonly (default): exposes only read operations (List, Show, Get, Count, Check, Search, Query, Describe) - full: exposes all operations including Create, Delete, Update - Reduces tool count from ~886 to ~396 in readonly mode - Safer for exploration, reduces LLM context overhead --- assets/utils/unified_server.py | 22 ++++++++++++++++++++++ assets/utils/variable.py | 1 + 2 files changed, 23 insertions(+) diff --git a/assets/utils/unified_server.py b/assets/utils/unified_server.py index 168c220..a874993 100644 --- a/assets/utils/unified_server.py +++ b/assets/utils/unified_server.py @@ -37,6 +37,19 @@ HUAWEI_SERVICES = "HUAWEI_SERVICES" +# Readonly prefixes: verbs that only read data (no mutations) +_READONLY_PREFIXES = ( + "List", "Show", "Get", "Count", "Check", "Search", "Query", "Describe", +) + + +def _is_readonly_tool(name: str) -> bool: + """Check if a tool name (without service prefix) is a read-only operation.""" + for prefix in _READONLY_PREFIXES: + if prefix in name: + return True + return False + def _find_openapi_json(service_code: str) -> Optional[Path]: """Locate the OpenAPI JSON for a service code.""" @@ -83,6 +96,11 @@ def initialize(self) -> None: service_codes = [s.strip().lower() for s in services_env.split(",") if s.strip()] logger.info(f"Loading {len(service_codes)} services: {service_codes}") + tools_mode = os.environ.get("HUAWEI_TOOLS_MODE", "readonly").lower() + if tools_mode not in ("readonly", "full"): + tools_mode = "readonly" + logger.info(f"Tools mode: {tools_mode}") + for code in service_codes: json_path = _find_openapi_json(code) if not json_path: @@ -97,6 +115,10 @@ def initialize(self) -> None: raw_tools = OpenAPIToToolsConverter(openapi_dict).convert() + # Filter tools based on mode + if tools_mode == "readonly": + raw_tools = [t for t in raw_tools if _is_readonly_tool(t.name)] + # Prefix tool names with service code prefixed_tools = [] for tool in raw_tools: diff --git a/assets/utils/variable.py b/assets/utils/variable.py index 783ccab..ecbc560 100644 --- a/assets/utils/variable.py +++ b/assets/utils/variable.py @@ -7,5 +7,6 @@ HUAWEI_PROJECT_ID = "HUAWEI_PROJECT_ID" HUAWEI_IAM_ENDPOINT = "HUAWEI_IAM_ENDPOINT" HUAWEI_TENANTS_FILE = "HUAWEI_TENANTS_FILE" +HUAWEI_TOOLS_MODE = "HUAWEI_TOOLS_MODE" MCP_SERVER_MODE = "MCP_SERVER_MODE" MCP_SERVER_PORT = "MCP_SERVER_PORT" From adc1625895d85afdf2fa10ca13958feccc26b95f Mon Sep 17 00:00:00 2001 From: Claudio Ferreira Filho Date: Mon, 11 May 2026 12:51:20 -0300 Subject: [PATCH 7/7] chore: add stale workflow --- .github/workflows/stale.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..c6a8ab7 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,14 @@ +name: Stale +on: + schedule: + - cron: "0 10 * * 1" +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + days-before-stale: 90 + days-before-close: 30 + stale-issue-message: "Esta issue está inativa há 90 dias" + stale-pr-message: "Este PR está inativo há 90 dias"