Adding Components to a Cluster
Function
This API is used to add components to a cluster.
URI
POST /v2/{project_id}/clusters/{cluster_id}/components
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Explanation Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. Constraints N/A Value range The value must consist of 1 to 64 characters. Only letters and digits are allowed. Default value N/A |
cluster_id |
Yes |
String |
Explanation Cluster ID. For details about how to obtain the cluster ID, see Obtaining a Cluster ID. Constraints N/A Value range The value can contain 1 to 64 characters, including only letters, digits, underscores (_), and hyphens (-). Default value N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
components_install_mode |
Yes |
Array of ComponentInstallMode objects |
Explanation Component installation details. For details about the parameters, see Table 3. Constraints N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
component |
Yes |
String |
Explanation Component name Constraints N/A Value range The value can contain 1 to 64 characters, including only letters, digits, underscores (_), and hyphens (-). Default value N/A |
node_groups |
Yes |
Array of AssignedNodeGroup objects |
Explanation Role deployment information of the component. For details, see Table 4. Constraints N/A |
component_user_password |
No |
String |
Explanation User password of the component. The password is used for machine-machine account to connect to the ClickHouse component. The password: Constraints N/A Value range
Default value N/A |
component_default_password |
No |
String |
Explanation Default user password of the component. The password is used for human-machine account to connect to the ClickHouse component. The password: Constraints N/A Value range
Default value N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Explanation Node group name. Constraints N/A Value range The value can contain 1 to 64 characters, including only letters, digits, underscores (_), and hyphens (-). Default value N/A |
assigned_roles |
Yes |
Array of strings |
Explanation Role deployment information. You can specify the roles deployed in a node group. This parameter is a string array. Each string represents a role expression. Role expression definition:
Constraints The number of records cannot exceed 1,000. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
result |
String |
Explanation Result of the request for updating a mapping. Value range
|
Example Request
- Add the ClickHouse component to a cluster in normal mode.
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" : "*****" } ] }
- Add the HBase component.
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" ] } ] } ] }
Example Response
Status code: 200
Processing result of a request:
{ "result" : "succeeded" }
Status Codes
For details, see Status Codes.
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot