集群添加组件
功能介绍
集群添加组件。
URI
POST /v2/{project_id}/clusters/{cluster_id}/components
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
components_install_mode |
是 |
Array of ComponentInstallMode objects |
组件模型详情,具体参数说明请参考表3。 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
component |
是 |
String |
组件名称。 |
node_groups |
是 |
Array of AssignedNodeGroup objects |
该组件的角色部署信息,具体参数说明请参考表4。 |
component_user_password |
否 |
String |
配置组件用户密码,该密码用于ClickHouse组件机机用户连接使用。
|
component_default_password |
否 |
String |
配置组件default用户密码,该密码用于ClickHouse组件人机用户连接使用。
|
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
name |
是 |
String |
节点组名称。 |
assigned_roles |
是 |
Array of strings |
角色部署信息。 可以指定节点组中部署的角色,该参数是一个字符串数组,每个字符串表示一个角色表达式。 角色表达式定义:
|
响应参数
状态码: 200
参数 |
参数类型 |
描述 |
---|---|---|
result |
String |
更新映射请求操作结果,succeeded为操作成功,failed为操作失败。 |
请求示例
- 非安全集群添加请求添加ClickHouse组件:
v2/f77c10d14a544393a24e5f0bf53202b6/clusters/ff879d3a-e5d5-4485-a9b6-c673b52673fa/components { "components_install_mode" : [ { "component" : "ClickHouse", "node_groups" : [ { "name" : "master_node_default_group", "assigned_roles" : [ "ClickHouseServer:1,2" ] }, { "name" : "node_group_1", "assigned_roles" : [ "ClickHouseServer", "ClickHouseBalancer" ] } ], "component_user_password" : "*****", "component_default_password" : "*****" } ] }
- 添加HBase组件:
v2/f77c10d14a544393a24e5f0bf53202b6/clusters/ff879d3a-e5d5-4485-a9b6-c673b52673fa/components { "components_install_mode" : [ { "component" : "HBase", "node_groups" : [ { "name" : "master_node_default_group", "assigned_roles" : [ "RegionServer", "HMaster" ] } ] } ] }
响应示例
状态码: 200
请求处理结果:
{ "result" : "succeeded" }
状态码
状态码请参见状态码。
错误码
请参见错误码。