Removing a Node
Function
This API is used to remove a node from a specified cluster.

URI
PUT /api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/operation/remove
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Details: Project ID. For details about how to obtain the value, see How to Obtain Parameters in the API URI. Constraints: None Options: Project IDs of the account Default value: N/A |
cluster_id |
Yes |
String |
Details: Cluster ID. For details about how to obtain the value, see How to Obtain Parameters in the API URI. Constraints: None Options: Cluster IDs Default value: N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
Details: The request body type or format Constraints: The GET method is not verified. Options:
Default value: N/A |
X-Auth-Token |
Yes |
String |
Details: Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token. For details, see Obtaining a User Token. Constraints: None Options: N/A Default value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
apiVersion |
No |
String |
API version. The value is fixed at v3. |
kind |
No |
String |
API type. The value is fixed at RemoveNodesTask. |
spec |
Yes |
RemoveNodesSpec object |
Configuration information. |
status |
No |
TaskStatus object |
Job status. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
login |
Yes |
Login object |
Node login mode. Either a key pair or password must be used for login. |
nodes |
Yes |
Array of NodeItem objects |
List of nodes to be removed. A maximum of 200 nodes can be removed at a time. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
sshKey |
No |
String |
Details: Name of the key pair used for login Constraints: None Options: N/A Default value: N/A |
userPassword |
No |
UserPassword object |
Details: Password used for node login Constraints: None |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
username |
No |
String |
Details: Login account. The default value is root. Constraints: None Options: N/A Default value: root |
password |
Yes |
String |
Details: Login password. If a username and password are used when a node is created, this field is shielded in the response body. Constraints: The password field must be salted during node creation. For details, see Adding a Salt in the password Field When Creating a Node. Options: A password must:
Default value: N/A |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
apiVersion |
String |
API version. The value is fixed at v3. |
kind |
String |
API type. The value is fixed at RemoveNodesTask. |
spec |
RemoveNodesSpec object |
Configuration information. |
status |
TaskStatus object |
Job status. |
Parameter |
Type |
Description |
---|---|---|
login |
Login object |
Node login mode. Either a key pair or password must be used for login. |
nodes |
Array of NodeItem objects |
List of nodes to be removed. A maximum of 200 nodes can be removed at a time. |
Parameter |
Type |
Description |
---|---|---|
sshKey |
String |
Details: Name of the key pair used for login Constraints: None Options: N/A Default value: N/A |
userPassword |
UserPassword object |
Details: Password used for node login Constraints: None |
Parameter |
Type |
Description |
---|---|---|
username |
String |
Details: Login account. The default value is root. Constraints: None Options: N/A Default value: root |
password |
String |
Details: Login password. If a username and password are used when a node is created, this field is shielded in the response body. Constraints: The password field must be salted during node creation. For details, see Adding a Salt in the password Field When Creating a Node. Options: A password must:
Default value: N/A |
Example Requests
Removing a Node
PUT /api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/operation/remove { "spec" : { "login" : { "sshKey" : "KeyPair-001" }, "nodes" : [ { "uid" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" }, { "uid" : "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy" } ] } }
Example Responses
Status code: 200
The job for removing a node in a specified cluster is successfully delivered.
{ "spec" : { "login" : { "sshKey" : "KeyPair-001" }, "nodes" : [ { "uid" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" }, { "uid" : "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy" } ] }, "status" : { "jobID" : "2ec9b78d-9368-46f3-8f29-d1a95622a568" } }
Status Codes
Status Code |
Description |
---|---|
200 |
The job for removing a node in a specified cluster is successfully delivered. |
Error Codes
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