调用InstallClusterAddons为指定集群安装组件。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求语法

POST /clusters/ClusterId/components/install HTTP/1.1
Content-Type:application/json

[ {
  "name" : "String",
  "version" : "String",
  "config" : "String"
} ]

请求参数

表 1. 请求Path参数
参数名称 类型 是否必选 示例 说明
ClusterId String c82e6987e2961451182edacd74faf****

集群ID。

表 2. 请求Body参数
参数名称 类型 是否必选 示例 说明
Array

请求体参数。

name String ags-metrics-collector

组件名称。

version String v1.0.0.2-cc3b2d6-aliyun

组件版本。

说明 可以API接口DescribeClusterAddonsVersion通过组件列表查询版本号。
config String {\"IngressDashboardEnabled\":\"true\",\"sls_project_name\":\"your_sls_project_name\"}"}

组件自定义参数,使用JSON字符串编码。

响应体语法

HTTP/1.1 200 OK

响应参数

安装集群组件示例

请求示例

POST /clusters/c82e6987e2961451182edacd74faf****/components/install HTTP/1.1 
Content-Type:application/json
[ {
  "name" : "ags-metrics-collector",
  "version" : "v1.0.0.2-cc3b2d6-aliyun",
  "config" : "{\\\"IngressDashboardEnabled\\\":\\\"true\\\",\\\"sls_project_name\\\":\\\"your_sls_project_name\\\"}\"}"
} ]

请求示例补充说明

POST /clusters/c3fb96524f9274b4495df0f12a6b5****/components/install?RegionId=cn-hangzhou --header "Content-Type=application/json;" --body '[{"name":"ack-node-problem-detector"}]'

正常返回示例

JSON格式

HTTP/1.1 200 OK

错误码

访问错误中心查看更多错误码。