
# CLI命令参考
#### 镜像缓存管理
| API名称    | 命令                          | 描述                                                                                                   | 操作                                                                                        |
|:---|:---|:---|:---|
| 创建镜像缓存   | hcloud CCE CreateImageCache | 创建镜像缓存。创建过程会在指定集群中启动临时Pod进行镜像缓存构建，创建镜像缓存后，可在负载创建时通过使用镜像缓存功能大幅减少下载容器镜像的耗时，实现容器的快速启动。单租户创建镜像缓存数量上限为50。 | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=CreateImageCache) |
| 查询镜像缓存列表 | hcloud CCE ListImageCaches  | 查询镜像缓存列表                                                                                             | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ListImageCaches)  |
| 查询镜像缓存详情 | hcloud CCE ShowImageCache   | 查询镜像缓存详情                                                                                             | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ShowImageCache)   |
| 删除镜像缓存   | hcloud CCE DeleteImageCache | 删除镜像缓存                                                                                               | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=DeleteImageCache) |
   
#### 套餐包管理
| API名称   | 命令                                  | 描述      | 操作                                                                                                |
|:---|:---|:---|:---|
| 查询套餐包列表 | hcloud CCE ListPackageProducts      | 查询套餐包列表 | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ListPackageProducts)      |
| 订购套餐包   | hcloud CCE SubscribePackageProducts | 订购套餐包   | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=SubscribePackageProducts) |
   
#### 集群管理（Autopilot）
| API名称                | 命令                                              | 描述                                                    | 操作                                                                                                            |
|:---|:---|:---|:---|
| 获取指定项目下的集群           | hcloud CCE ListAutopilotClusters                | 该API用于获取指定项目下所有集群的详细信息。                               | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ListAutopilotClusters)                |
| 创建集群                 | hcloud CCE CreateAutopilotCluster               | 该API用于创建一个空集群（即只有控制节点Master，没有工作节点Node）。              | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=CreateAutopilotCluster)               |
| 获取指定的集群              | hcloud CCE ShowAutopilotCluster                 | 该API用于获取指定集群的详细信息。                                    | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ShowAutopilotCluster)                 |
| 更新指定的集群              | hcloud CCE UpdateAutopilotCluster               | 该API用于更新指定的集群。                                        | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=UpdateAutopilotCluster)               |
| 删除集群                 | hcloud CCE DeleteAutopilotCluster               | 该API用于删除一个指定的集群。                                      | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=DeleteAutopilotCluster)               |
| 获取集群证书               | hcloud CCE CreateAutopilotKubernetesClusterCert | 该API用于获取指定集群的证书信息。                                    | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=CreateAutopilotKubernetesClusterCert) |
| 获取任务信息               | hcloud CCE ShowAutopilotJob                     | 该API用于获取任务信息。通过某一任务请求下发后返回的jobID来查询指定任务的进度。           | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ShowAutopilotJob)                     |
| 绑定、解绑集群公网apiserver地址 | hcloud CCE UpdateAutopilotClusterEip            | 该API用于通过集群ID绑定、解绑集群公网apiserver地址                      | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=UpdateAutopilotClusterEip)            |
| 获取集群访问的地址            | hcloud CCE ShowAutopilotClusterEndpoints        | 该API用于通过集群ID获取集群访问的地址，包括PrivateIP(HA集群返回VIP)与PublicIP | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ShowAutopilotClusterEndpoints)        |
| 查询集群日志配置信息           | hcloud CCE ShowAutopilotClusterConfig           | 获取集群组件上报的LTS的配置信息                                     | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ShowAutopilotClusterConfig)           |
| 查询特性开关状态             | hcloud CCE ShowAutopilotFeatureGates            | 该API用于查询特性开关状态                                        | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ShowAutopilotFeatureGates)            |
   
#### 插件管理（Autopilot）
| API名称              | 命令                                        | 描述                                                                                                                                                                | 操作                                                                                                      |
|:---|:---|:---|:---|
| 获取AddonInstance列表  | hcloud CCE ListAutopilotAddonInstances    | 获取集群所有已安装插件实例                                                                                                                                                     | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ListAutopilotAddonInstances)    |
| 创建AddonInstance    | hcloud CCE CreateAutopilotAddonInstance   | 根据提供的插件模板，安装插件实例。                                                                                                                                                 | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=CreateAutopilotAddonInstance)   |
| 查询AddonTemplates列表 | hcloud CCE ListAutopilotAddonTemplates    | 插件模板查询接口，查询插件信息。                                                                                                                                                  | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ListAutopilotAddonTemplates)    |
| 获取AddonInstance详情  | hcloud CCE ShowAutopilotAddonInstance     | 获取插件实例详情。                                                                                                                                                         | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ShowAutopilotAddonInstance)     |
| 更新AddonInstance    | hcloud CCE UpdateAutopilotAddonInstance   | 更新插件实例的功能。                                                                                                                                                        | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=UpdateAutopilotAddonInstance)   |
| 删除AddonInstance    | hcloud CCE DeleteAutopilotAddonInstance   | 删除插件实例的功能。                                                                                                                                                        | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=DeleteAutopilotAddonInstance)   |
| 回滚AddonInstance    | hcloud CCE RollbackAutopilotAddonInstance | 将插件实例回滚到升级前的版本。只有在当前插件实例版本支持回滚到升级前的版本（status.isRollbackable为true），且插件实例状态为running（运行中）、available（可用）、abnormal（不可用）、upgradeFailed（升级失败）、rollbackFailed（回滚失败）时支持回滚。 | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=RollbackAutopilotAddonInstance) |
   
#### 集群升级（Autopilot）
| API名称                | 命令                                                 | 描述                                                      | 操作                                                                                                               |
|:---|:---|:---|:---|
| 集群升级                 | hcloud CCE UpgradeAutopilotCluster                 | 集群升级。                                                   | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=UpgradeAutopilotCluster)                 |
| 获取集群升级任务详情           | hcloud CCE ShowAutopilotUpgradeClusterTask         | 获取集群升级任务详情，任务ID由调用集群升级API后从响应体中uid字段获取。                 | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ShowAutopilotUpgradeClusterTask)         |
| 重试集群升级任务             | hcloud CCE RetryAutopilotUpgradeClusterTask        | 重新执行失败的集群升级任务。                                          | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=RetryAutopilotUpgradeClusterTask)        |
| 获取集群升级任务详情列表         | hcloud CCE ListAutopilotUpgradeClusterTasks        | 获取集群升级任务详情列表                                            | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ListAutopilotUpgradeClusterTasks)        |
| 集群升级前检查              | hcloud CCE CreateAutopilotPreCheck                 | 集群升级前检查                                                 | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=CreateAutopilotPreCheck)                 |
| 获取集群升级前检查任务详情        | hcloud CCE ShowAutopilotPreCheck                   | 获取集群升级前检查任务详情，任务ID由调用集群检查API后从响应体中uid字段获取。              | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ShowAutopilotPreCheck)                   |
| 获取集群升级前检查任务详情列表      | hcloud CCE ListAutopilotPreCheckTasks              | 获取集群升级前检查任务详情列表                                         | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ListAutopilotPreCheckTasks)              |
| 集群升级后确认              | hcloud CCE CreateAutopilotPostCheck                | 集群升级后确认，该接口建议配合Console使用，主要用于升级步骤完成后，客户确认集群状态和业务正常后做反馈。 | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=CreateAutopilotPostCheck)                |
| 集群备份                 | hcloud CCE CreateAutopilotClusterMasterSnapshot    | 集群备份                                                    | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=CreateAutopilotClusterMasterSnapshot)    |
| 获取集群备份任务详情列表         | hcloud CCE ListAutopilotClusterMasterSnapshotTasks | 获取集群备份任务详情列表                                            | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ListAutopilotClusterMasterSnapshotTasks) |
| 获取集群升级相关信息           | hcloud CCE ShowAutopilotClusterUpgradeInfo         | 获取集群升级相关信息                                              | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ShowAutopilotClusterUpgradeInfo)         |
| 获取集群升级路径             | hcloud CCE ListAutopilotClusterUpgradePaths        | 获取集群升级路径                                                | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ListAutopilotClusterUpgradePaths)        |
| 获取集群升级特性开关配置         | hcloud CCE ListAutopilotClusterUpgradeFeatureGates | 获取集群升级特性开关配置                                            | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ListAutopilotClusterUpgradeFeatureGates) |
| 开启集群升级流程引导任务         | hcloud CCE CreateAutopilotUpgradeWorkFlow          | 该API用于创建一个集群升级流程引导任务。请在调用本接口完成引导任务创建之后，通过集群升级前检查开始检查任务。 | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=CreateAutopilotUpgradeWorkFlow)          |
| 获取UpgradeWorkFlows列表 | hcloud CCE ListAutopilotUpgradeWorkFlows           | 获取历史集群升级引导任务列表                                          | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ListAutopilotUpgradeWorkFlows)           |
| 获取指定集群升级引导任务详情       | hcloud CCE ShowAutopilotUpgradeWorkFlow            | 该API用于通过升级引导任务ID获取任务的详细信息。                              | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ShowAutopilotUpgradeWorkFlow)            |
| 更新指定集群升级引导任务状态       | hcloud CCE UpgradeAutopilotWorkFlowUpdate          | 该API用于更新指定集群升级引导任务状态，当前仅适用于取消升级流程                       | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=UpgradeAutopilotWorkFlowUpdate)          |
| 获取自动升级计划             | hcloud CCE ListAutopilotUpgradePlans               | 该API用于获取集群自动升级计划。                                       | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ListAutopilotUpgradePlans)               |
| 延期自动升级计划             | hcloud CCE UpdateAutopilotUpgradePlan              | 该API用于延期集群自动升级计划。                                       | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=UpdateAutopilotUpgradePlan)              |
   
#### 配额管理（Autopilot）
| API名称         | 命令                             | 描述                   | 操作                                                                                           |
|:---|:---|:---|:---|
| 查询CCE服务下的资源配额 | hcloud CCE ShowAutopilotQuotas | 该API用于查询CCE服务下的资源配额。 | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ShowAutopilotQuotas) |
   
#### 标签管理（Autopilot）
| API名称         | 命令                                         | 描述                   | 操作                                                                                                       |
|:---|:---|:---|:---|
| 批量添加指定集群的资源标签 | hcloud CCE BatchCreateAutopilotClusterTags | 该API用于批量添加指定集群的资源标签。 | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=BatchCreateAutopilotClusterTags) |
| 批量删除指定集群的资源标签 | hcloud CCE BatchDeleteAutopilotClusterTags | 该API用于批量删除指定集群的资源标签。 | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=BatchDeleteAutopilotClusterTags) |
   
#### 模板管理（Autopilot）
| API名称        | 命令                                       | 描述           | 操作                                                                                                     |
|:---|:---|:---|:---|
| 获取模板列表       | hcloud CCE ListAutopilotCharts           | 获取模板列表       | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ListAutopilotCharts)           |
| 上传模板         | hcloud CCE UploadAutopilotChart          | 上传模板         | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=UploadAutopilotChart)          |
| 获取模板实例列表     | hcloud CCE ListAutopilotReleases         | 获取模板实例列表     | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ListAutopilotReleases)         |
| 创建模板实例       | hcloud CCE CreateAutopilotRelease        | 创建模板实例       | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=CreateAutopilotRelease)        |
| 获取模板         | hcloud CCE ShowAutopilotChart            | 获取模板         | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ShowAutopilotChart)            |
| 更新模板         | hcloud CCE UpdateAutopilotChart          | 更新模板         | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=UpdateAutopilotChart)          |
| 删除模板         | hcloud CCE DeleteAutopilotChart          | 删除模板         | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=DeleteAutopilotChart)          |
| 获取指定模板实例     | hcloud CCE ShowAutopilotRelease          | 获取指定模板实例     | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ShowAutopilotRelease)          |
| 更新指定模板实例     | hcloud CCE UpdateAutopilotRelease        | 更新指定模板实例     | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=UpdateAutopilotRelease)        |
| 删除指定模板实例     | hcloud CCE DeleteAutopilotRelease        | 删除指定模板实例     | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=DeleteAutopilotRelease)        |
| 下载模板         | hcloud CCE DownloadAutopilotChart        | 下载模板         | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=DownloadAutopilotChart)        |
| 获取模板Values   | hcloud CCE ShowAutopilotChartValues      | 获取模板Values   | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ShowAutopilotChartValues)      |
| 查询指定模板实例历史记录 | hcloud CCE ShowAutopilotReleaseHistory   | 查询指定模板实例历史记录 | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ShowAutopilotReleaseHistory)   |
| 获取用户模板配额     | hcloud CCE ShowAutopilotUserChartsQuotas | 获取用户模板配额     | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ShowAutopilotUserChartsQuotas) |
   
#### Job管理（Autopilot）
| API名称   | 命令                            | 描述                    | 操作                                                                                          |
|:---|:---|:---|:---|
| 获取Job列表 | hcloud CCE ListAutopilotJobs  | 该API用于获取指定项目下的所有jobs。 | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=ListAutopilotJobs)  |
| 获取Job详情 | hcloud CCE GetAutopilotOneJob | 该API用于获取指定项目下的Job详情。  | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=GetAutopilotOneJob) |
| 删除Job   | hcloud CCE DeleteAutopilotJob | 该API用于删除指定项目下的Job。    | [去调试](https://console.huaweicloud.com/apiexplorer/#/openapi/CCE/cli?api=DeleteAutopilotJob) |
   
