Deleting nodes in batches
Function
This API is used to delete nodes from a specified resource pool in batches. This API is used when you need to delete redundant nodes, re-allocate resources, or remove faulty nodes from a resource pool. Before using this API, ensure that the resource pool has been created and is available, you have the required permission, and at least one node is retained in the resource pool. After the deletion, the specified nodes are permanently removed, and the remaining nodes in the resource pool continue to work. If the resource pool does not exist, the node does not exist, you do not have the permission to perform the operation, or the number of nodes in the resource pool is insufficient, the API will return an error message.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
POST /v2/{project_id}/pools/{pool_name}/nodes/batch-delete
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition: User project ID. For details, see Obtaining a Project ID and Name. Constraints: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed. Range: N/A Default Value: N/A |
|
pool_name |
Yes |
String |
Definition: Resource pool name. Constraints: N/A Range: N/A Default Value: N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
deleteNodeNames |
Yes |
Array of strings |
Definition: List of names of nodes to be deleted. Constraints: N/A |
Response Parameters
Status code: 200
OK.
Status code: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Range: N/A |
|
error_msg |
String |
Definition: Error message. Range: N/A |
Example Requests
The following is an example of how to delete nodes in batches.
POST /v2/{project_id}/pools/{pool_name}/nodes/batch-delete
{
"deleteNodeNames" : [ "os-node-created-mnmcf" ]
}
Example Responses
Status code: 404
Not Found.
{
"error_code" : "ModelArts.50015001",
"error_msg" : "pool not found"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK. |
|
404 |
Not Found. |
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